Skip to content
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

Switch form open AI to Anthropic #41

Open
sgruhier opened this issue Jun 23, 2024 · 1 comment
Open

Switch form open AI to Anthropic #41

sgruhier opened this issue Jun 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sgruhier
Copy link

Feature request

Is your feature request related to a problem? Please describe.

I tried many ways to switch to Anthropic Sonnet 3.5 but without any luck
Any hints, code snippets would be much appreciated.

@sgruhier sgruhier added the enhancement New feature or request label Jun 23, 2024
@gregnr
Copy link
Collaborator

gregnr commented Jul 5, 2024

Hey @sgruhier! What ways have to you tried switching to Anthropic and what didn't work?

Since Anthropic uses a different API/SDK there will definitely need to be a couple tweaks to get it working (I have not yet tried myself). Your options are most likely either:

  1. Use Anthropic's @anthropic-ai/sdk TypeScript lib and adjust the OpenAI code to use their equivalent APIs accordingly
  2. Upgrade to the latest Vercel AI SDK which offers a unified API across all providers (OpenAI, Anthropic, etc)

My recommendation would probably be 2 for greatest flexibility/future proofing. This repo currently uses an older version of Vercel's AI SDK (v2) while the latest version is v3. I would actually love to see a PR that upgrades to this latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants