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

chore(examples): minor formatting changes #633

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions tests/api_resources/test_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def test_method_create_overload_1(self, client: Anthropic) -> None:
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -37,8 +37,8 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -47,16 +47,14 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
stream=False,
system=[
{
"type": "text",
"text": "Today's date is 2024-06-01.",
"type": "text",
}
],
temperature=1,
tool_choice={"type": "auto"},
tools=[
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -70,10 +68,10 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -87,10 +85,10 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -104,6 +102,8 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
],
top_k=5,
Expand All @@ -117,8 +117,8 @@ def test_raw_response_create_overload_1(self, client: Anthropic) -> None:
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -135,8 +135,8 @@ def test_streaming_response_create_overload_1(self, client: Anthropic) -> None:
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -155,8 +155,8 @@ def test_method_create_overload_2(self, client: Anthropic) -> None:
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -170,8 +170,8 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -180,16 +180,14 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
stop_sequences=["string", "string", "string"],
system=[
{
"type": "text",
"text": "Today's date is 2024-06-01.",
"type": "text",
}
],
temperature=1,
tool_choice={"type": "auto"},
tools=[
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -203,10 +201,10 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -220,10 +218,10 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -237,6 +235,8 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
],
top_k=5,
Expand All @@ -250,8 +250,8 @@ def test_raw_response_create_overload_2(self, client: Anthropic) -> None:
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -268,8 +268,8 @@ def test_streaming_response_create_overload_2(self, client: Anthropic) -> None:
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -293,8 +293,8 @@ async def test_method_create_overload_1(self, async_client: AsyncAnthropic) -> N
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -307,8 +307,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -317,16 +317,14 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
stream=False,
system=[
{
"type": "text",
"text": "Today's date is 2024-06-01.",
"type": "text",
}
],
temperature=1,
tool_choice={"type": "auto"},
tools=[
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -340,10 +338,10 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -357,10 +355,10 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -374,6 +372,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
],
top_k=5,
Expand All @@ -387,8 +387,8 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncAnthropic
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -405,8 +405,8 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncAnt
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -425,8 +425,8 @@ async def test_method_create_overload_2(self, async_client: AsyncAnthropic) -> N
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -440,8 +440,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -450,16 +450,14 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
stop_sequences=["string", "string", "string"],
system=[
{
"type": "text",
"text": "Today's date is 2024-06-01.",
"type": "text",
}
],
temperature=1,
tool_choice={"type": "auto"},
tools=[
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -473,10 +471,10 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -490,10 +488,10 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
{
"description": "Get the current weather in a given location",
"name": "x",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -507,6 +505,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
},
},
},
"name": "x",
"description": "Get the current weather in a given location",
},
],
top_k=5,
Expand All @@ -520,8 +520,8 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncAnthropic
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand All @@ -538,8 +538,8 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncAnt
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello, world",
"role": "user",
}
],
model="claude-3-5-sonnet-20240620",
Expand Down
Loading