-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dangerouslyAllowBrowser for Anthropic #3041
Comments
This is not the Anthropic SDK. You can use the Anthropic AI SDK provider in the browser. |
Sorry I'm not sure I understand your reply. Yes I know this is the
|
@maybebansky your question was referring to unrelated comments from the anthropic ai sdk. |
@lgrammel sorry if I'm dragging this out but I'm still confused. Hopefully this is a clearer code example:
The above code works with OpenAI but not for Anthropic. The error I get with Anthropic is:
I do need to make the request from the browser. My understanding is that if I were using the Anthropic SDK I could fix this by setting |
Thanks that clarifies it. |
Feature Description
I need to set
dangerouslyAllowBrowser
totrue
which you're able to do with the Anthropic SKD. However I don't think you can do this with theai
library?anthropics/anthropic-sdk-typescript#248 (comment)
There are legitimate reasons for needing to do this: https://simonwillison.net/2024/Aug/23/anthropic-dangerous-direct-browser-access/
Use Case
For internal tools exposed to trusted users, or you can implement a “bring your own API key” pattern where users supply their own key to use with your client-side app.
Additional context
No response
The text was updated successfully, but these errors were encountered: