Move LLM logic to seperate route

This commit is contained in:
Peter Stockings
2025-07-22 20:25:42 +10:00
parent 2c089fcaf7
commit d65495541f
8 changed files with 164 additions and 143 deletions

View File

@@ -74,6 +74,7 @@ const Editor = {
this.naturalLanguageQuery = "";
this.generateLoading = false;
this.showNaturalLanguageQuery = false;
this.generateUrl = vnode.attrs.generateUrl;
},
oncreate() {
@@ -245,7 +246,7 @@ const Editor = {
try {
const resp = await m.request({
method: "POST",
url: "/api/generate_script", // Assuming this is the new endpoint
url: this.generateUrl,
body: { natural_query: this.naturalLanguageQuery },
});