Open Yhozen opened 5 months ago
This is WIP since there's no way to add/edit/delete keys (or other settings i.e: ollama url) for providers
Hi, that's an excellent improvement to the code! This feature is exactly what I need and am working on right now, and I'm also researching this area.
However, when I tested the code on this branch, I noticed that the AI SDK might conflict with the Cross-Origin Resource Sharing (CORS) policy, resulting in a 403 error. I’m unsure of the exact cause, but it seems related to this issue.
A potential solution could be to request with mode: 'no-cors'
. I'm not very familiar with the AI SDK library, so let's work together to figure out this issue :)
Test Platform:
Hi, that's an excellent improvement to the code! This feature is exactly what I need and am working on right now, and I'm also researching this area.
However, when I tested the code on this branch, I noticed that the AI SDK might conflict with the Cross-Origin Resource Sharing (CORS) policy, resulting in a 403 error. I’m unsure of the exact cause, but it seems related to this issue.
A potential solution could be to request with
mode: 'no-cors'
. I'm not very familiar with the AI SDK library, so let's work together to figure out this issue :)Test Platform:
- model: Macbook (M1 pro)
- system: MacOS 14.5 (23F79)
- browser: Chromium Engine Version 126.0.6478.57
- User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
I will give it a try later today!
This PR switches from OpenAI node library to vercel AI sdk, which abstract many AI apis.
I think a settings section would be a nice addition + the persistent storage added in #3
I would do it but I honestly suck at frontend :(
Adding more models/providers is trivial now with the ai sdk (think of it like the orm or prisma of AI apis)
Screenshots