forked from phoenix/litellm-mirror
(feat) maintain anthropic text completion
This commit is contained in:
parent
9094be7fbd
commit
1183e5f2e5
4 changed files with 59 additions and 25 deletions
|
@ -56,7 +56,7 @@ def test_completion_custom_provider_model_name():
|
|||
def test_completion_claude():
|
||||
litellm.set_verbose = True
|
||||
litellm.cache = None
|
||||
litellm.AnthropicConfig(max_tokens=200, metadata={"user_id": "1224"})
|
||||
litellm.AnthropicTextConfig(max_tokens_to_sample=200, metadata={"user_id": "1224"})
|
||||
messages = [
|
||||
{
|
||||
"role": "system",
|
||||
|
@ -67,9 +67,10 @@ def test_completion_claude():
|
|||
try:
|
||||
# test without max tokens
|
||||
response = completion(
|
||||
model="claude-instant-1.2",
|
||||
model="claude-instant-1",
|
||||
messages=messages,
|
||||
request_timeout=10,
|
||||
max_tokens=10,
|
||||
)
|
||||
# Add any assertions, here to check response args
|
||||
print(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue