Fix AI endpoint

This commit is contained in:
Matej Bačo
2023-08-11 10:06:19 +02:00
parent ca24aacd52
commit 29590d66b9
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -24,5 +24,8 @@ module.exports = {
browser: true,
es2017: true,
node: true
},
globals: {
globalThis: false // false means it is not writeable
}
};
+3 -1
View File
@@ -10,8 +10,10 @@
import CoolerAppwrite from '$lib/images/appwrite-cooler.svg';
import { VARS } from '$lib/system';
const endpoint = VARS.APPWRITE_ENDPOINT ?? `${globalThis?.location?.origin}/v1`;
const { input, handleSubmit, completion, isLoading, complete } = useCompletion({
api: VARS.APPWRITE_ENDPOINT + '/console/assistant'
api: endpoint + '/console/assistant'
});
const examples = [