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

Feature/backend claude #56

Merged
merged 12 commits into from
Mar 14, 2024

Conversation

aislasq
Copy link
Contributor

@aislasq aislasq commented Mar 11, 2024

Anthropic released the new Claude 3 Models along with their first public API. There is no free tier (maybe we can include this for each model in the readme?).

  • Implement trait for new backend.
  • Update the BackendName enum with your new Backend name.
  • Update the BackendManager to provide your new backend.
  • Write tests
  • Update Readme
  • Update config

Comment on lines +134 to +138
"claude-3-sonnet-20240229".to_string(),
"claude-3-opus-20240229".to_string(),
"claude-2.1".to_string(),
"claude-2.0".to_string(),
];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰 I find it lazy of companies who are not making this available as an endpoint. I'm down to merge this as is, but maybe we consider scraping it from their docs page in the future. I can imagine those first two model names changing somewhat often.

https://docs.anthropic.com/claude/docs/models-overview

[...$('.cm-s-neo')].map(e => e.innerHTML).filter((e, idx, arr) => arr.indexOf(e) === idx) 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an issue for this already:
anthropics/anthropic-sdk-typescript#313

I added a not so elegant solution to read the messages file from the official Typescript SDK, then find and clean the model list with Regex. If this fails I left the backup hardcoded array.

Copy link
Owner

@dustinblackman dustinblackman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work, thanks so much!

@dustinblackman dustinblackman self-requested a review March 14, 2024 00:51
@dustinblackman dustinblackman merged commit 858207e into dustinblackman:main Mar 14, 2024
3 checks passed
@aislasq aislasq deleted the feature/backend-claude branch March 14, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants