Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
unholad anthropic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patcher9 committed Mar 24, 2024
1 parent c12b9a4 commit afd9513
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions tests/test_anthropic.py.hold → tests/test_anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,18 @@ def test_messages():
"""
Test the 'messages.create' function of the Anthropic client.
"""
message = client.messages.create(
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, Claude",
}
],
model="claude-3-opus-20240229",
)
assert message.type == 'message'
try:
message = client.messages.create(
max_tokens=10,
messages=[
{
"role": "user",
"content": "Hello, Claude",
}
],
model="claude-3-opus-20240229",
)
assert message.type == 'message'

except Exception as e:
print(e)

0 comments on commit afd9513

Please sign in to comment.