Skip to content
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
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ client = Writer(
chat_completion = client.chat.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -66,7 +66,7 @@ async def main() -> None:
chat_completion = await client.chat.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand All @@ -92,7 +92,7 @@ client = Writer()
stream = client.chat.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand All @@ -113,7 +113,7 @@ client = AsyncWriter()
stream = await client.chat.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -250,7 +250,7 @@ try:
client.chat.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -301,7 +301,7 @@ client = Writer(
client.with_options(max_retries=5).chat.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -332,7 +332,7 @@ client = Writer(
client.with_options(timeout=5.0).chat.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -380,7 +380,7 @@ from writerai import Writer
client = Writer()
response = client.chat.with_raw_response.chat(
messages=[{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}],
model="palmyra-x-004",
Expand All @@ -405,7 +405,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
with client.chat.with_streaming_response.chat(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
dict(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -764,7 +764,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
dict(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -1555,7 +1555,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
dict(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down Expand Up @@ -1584,7 +1584,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
dict(
messages=[
{
"content": "Write a poem about Python",
"content": "Write a haiku about programming",
"role": "user",
}
],
Expand Down