Closed ishaan-jaff closed 8 months ago
We'll need to add the messages endpoint for claude3 - it fails on their completion endpoint
Error calling model: AnthropicException - {"type":"error","error":{"type":"invalid_request_error","message":"\"claude-3-opus-20240229\" is not supported on this API. Please use the Messages API instead."}}
No bedrock support yet.
I don't think the legacy text completion endpoint supports claude 3. We should move to using the anthropic 2.1 endpoint - https://github.com/BerriAI/litellm/issues/1209
You can also send images in claude 3 - will need to add pricing for this
Action Items:
PR to add initial support : https://github.com/BerriAI/litellm/pull/2315
Model Pricing info here for reference https://docs.anthropic.com/claude/docs/models-overview#meet-claude-3
I'll take care of the image + tool calling cost tracking in my PR
claude-instant-1
on the new messages endpoint
- Each message must alternate between "user" and "assistant"
For v0 PR not addressing no.3
Sorry if this is a silly question but does day 1 support mean you guy are hoping to get this done today? Just wondering if I should attempt to hack something myself.
This project is awesome btw.
@ashot it will be live in 1-2 hours, PR for v0 support is here: https://github.com/BerriAI/litellm/pull/2315/files
love it, thank you!
Wow great one waiting to test Claude-3 in my code interpreter.
Working v0 PR is live here: https://github.com/BerriAI/litellm/commit/14fc8355fb1ce89a143ebb7b3171dfa19cb46d4e
@ishaan-jaff is this ready for me to stack the tool calling + image calling PRs on this?
Yes @krrishdholakia
@ishaan-jaff looks like there's a separate param for system prompt
V1 needs to add:
confirmed 1.28.13 has v0 support working
@ishaan-jaff looks like there's a separate param for system prompt
oh missed this, will your v1 PR cover this @krrishdholakia ? else I can make the fix
yea i'm fixing it for tool calling
FYI Anthropic deprecated the following models on /messages
claude-2.1
)claude-instant-1.2
)Since we moved everything to /messages this means litellm will not support claude-2
and claude-instant-1
That's funny - claude instant 1.2 works
Yup - Lets put a notice on the latest release about this and see if users want us to maintain - Claude-instant-1 and Claude-2
should we just have backwards compatibility for those 2 models? would be a bit weird to suddenly start failing calls
since we have the code, it's just routing no?
if claude-instant-1 or claude-2 route to old_anthropic.py
else route to anthropic.py
i always find it a bit stressful when together ai does this - and randomly kills access to models
would be a bit weird to suddenly start failing calls
agree - bedrock did this to me and I didn't like it
Action item 3: Maintain claude-instant-1 or claude-2 @ishaan-jaff
cool - let's just have a separate file called old anthropic - can you do this? @ishaan-jaff
thanks
does it work with bedrock?
no - bedrock is not yet supported by anthropic
system prompt + tool calling support added - https://github.com/BerriAI/litellm/pull/2320
Now adding vision support
what? it is
@themrzmaster can you share the code snippet to call claude 3 on the AWS console? We don't have access on our AWS account
{
"modelId": "anthropic.claude-3-sonnet-20240229-v1:0",
"contentType": "application/json",
"accept": "application/json",
"body": {
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 1000,
"messages": {
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/jpeg",
"data": "iVBORw..."
}
},
{
"type": "text",
"text": "What's in this image?"
}
]
}
}
}
You're right @themrzmaster seems like claude and bedrock have conflicting info
Will work on adding bedrock support too @themrzmaster
might need some help testing it as i'm still waiting on access
can you help?
@krrishdholakia yep! thanks
Let me finish up the anthropic integration, and i'll cc you on the bedrock pr.
cc: @dleen if you want to test out the bedrock/claude 3 integration as well
Got access to claude 3 - i should be able to test this on my end too
🎢
PR to maintain support for claude-instant-1 and claude-2 is here: https://github.com/BerriAI/litellm/pull/2321
Are you trying to add all these Claude-3 Models Opus and Sonnet
@krrishdholakia may I kindly ask how can we install the draft version and have a test? When I do poetry install
on that repo, it doesn't help
It's on here @xihajun https://github.com/BerriAI/litellm/releases/tag/v1.28.13
The Feature
Motivation, pitch
New model
Twitter / LinkedIn details
No response