Skip to content
Snippets Groups Projects
Commit 410120aa authored by William Faircloth's avatar William Faircloth
Browse files

test

parent 4d9c5aa9
No related branches found
No related tags found
No related merge requests found
Pipeline #6035 failed
......@@ -8,6 +8,7 @@ export const actions = {
const formData = await event.request.formData();
if (!formData.has('question')) return error(400, 'No question provided');
const question = formData.get('question')?.toString() || 'Something went wrong!';
console.log("Recieved question: " + question);
const useContext = formData.get('useContext')?.toString() === 'on' || false;
const rawContext: Context = JSON.parse(formData.get('context')?.toString() || '') || [];
......@@ -30,6 +31,7 @@ export const actions = {
});
}
console.log("Asking archi with question: " + question);
const response = await askArchi(question, context);
context = [...rawContext, { question, response }];
......
......@@ -11,7 +11,10 @@ const config = {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
adapter: adapter(),
csrf: {
checkOrigin: false
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment