OpenAI Adapter: Support dangerouslyAllowBrowser configuration #197
adrianliechti
started this conversation in
Ideas
Replies: 3 comments
-
|
Same problem here. createOpenAIClient only allows to set apiKey, organization and baseURL via the config param. Would be great if all openai ClientOptions (including dangerouslyAllowBrowser) could be set via the config param. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I will see to add this in soon, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Had the same use case - since it seems pretty minor in terms of a change, took the liberty to open a PR |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ciao TanStack Team,
I migrated my application today to your beautiful stack (table, query, router) - and with that good feeling, I also wanted to test the AI stack. I use a BFF which acts as a secure OpenAI Proxy
In my current implementation, I used the
dangerouslyAllowBrowser: truesetting on the OpenAI client.Unfortunately it seems not possible to set this on your construction for ai-openai. I understand if this was on purpose.
Could you think of allowing to set the OpenAI Config directly in the construction?
Currently I have a pretty dirty hack in this experimental branch, where I overwrite the OpenAI Client:
Implementing a copy of the OpenAI connector seems a bit over the top
src/lib/openai-browser.ts:
vite.config.ts:
Thank you for any hints! Thanks a ton, Adrian
Beta Was this translation helpful? Give feedback.
All reactions