Move LLM logic to seperate route
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user