-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(provider/anthropic): Anthropic web search #6237
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
base: main
Are you sure you want to change the base?
Conversation
I think we have another repo that we have to sync it to, I'm not too sure on the process here cc @lgrammel |
Co-authored-by: Sam Denty <[email protected]>
// New type for web search tool result errors | ||
export interface AnthropicWebSearchToolResultErrorContent { | ||
type: 'web_search_tool_result_error'; | ||
error_code: string; // e.g., 'max_uses_exceeded', 'too_many_requests', etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could add a JSDoc comment pointing to https://docs.anthropic.com/en/docs/build-with-claude/tool-use/web-search-tool#errors
also I know we like to add examples to make it easy to try out something (helps with future testing as well), maybe it would make sense to add one in examples/ai-core? |
Thank you for your quick feedback, I'll look into into it tomorrow |
…ing to intial review
I added that part, it works |
Background
Anthropic just announced the availability of web search in their API. This feature is really exciting to me.
Summary
Added support for what is presented in the documentation.
Verification
I currently just got it to work:
Tasks
pnpm changeset
in the project root)pnpm prettier-fix
in the project root)Disclaimer
I've only contributed to documentation before, I hope this will help. And I'd also understand if it doesn't, I really don't mind if this gets closed for any reason.
I don't know how to write tests my self, must admit these have been wrote by Gemini.