Skip to content

Commit a06f969

Browse files
chore(internal): Fix README samples. (#217)
1 parent 3d29c55 commit a06f969

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ client = Writer()
7070
chat_completion = client.chat.chat(
7171
messages=[
7272
{
73-
"content": "Write a poem about Python",
73+
"content": "Write a haiku about programming",
7474
"role": "user",
7575
}
7676
],
@@ -92,7 +92,7 @@ async def main() -> None:
9292
chat_completion = await client.chat.chat(
9393
messages=[
9494
{
95-
"content": "Write a poem about Python",
95+
"content": "Write a haiku about programming",
9696
"role": "user",
9797
}
9898
],
@@ -120,7 +120,7 @@ client = Writer()
120120
stream = client.chat.chat(
121121
messages=[
122122
{
123-
"content": "Write a poem about Python",
123+
"content": "Write a haiku about programming",
124124
"role": "user",
125125
}
126126
],
@@ -148,7 +148,7 @@ client = AsyncWriter()
148148
stream = await client.chat.chat(
149149
messages=[
150150
{
151-
"content": "Write a poem about Python",
151+
"content": "Write a haiku about programming",
152152
"role": "user",
153153
}
154154
],
@@ -284,7 +284,7 @@ try:
284284
client.chat.chat(
285285
messages=[
286286
{
287-
"content": "Write a poem about Python",
287+
"content": "Write a haiku about programming",
288288
"role": "user",
289289
}
290290
],
@@ -335,7 +335,7 @@ client = Writer(
335335
client.with_options(max_retries=5).chat.chat(
336336
messages=[
337337
{
338-
"content": "Write a poem about Python",
338+
"content": "Write a haiku about programming",
339339
"role": "user",
340340
}
341341
],
@@ -367,7 +367,7 @@ client = Writer(
367367
client.with_options(timeout=5.0).chat.chat(
368368
messages=[
369369
{
370-
"content": "Write a poem about Python",
370+
"content": "Write a haiku about programming",
371371
"role": "user",
372372
}
373373
],
@@ -417,7 +417,7 @@ from writerai import Writer
417417
client = Writer()
418418
response = client.chat.with_raw_response.chat(
419419
messages=[{
420-
"content": "Write a poem about Python",
420+
"content": "Write a haiku about programming",
421421
"role": "user",
422422
}],
423423
model="palmyra-x-004",
@@ -440,7 +440,7 @@ To stream the raw response body, use `.with_streaming_response`, which requires
440440
with client.chat.with_streaming_response.chat(
441441
messages=[
442442
{
443-
"content": "Write a poem about Python",
443+
"content": "Write a haiku about programming",
444444
"role": "user",
445445
}
446446
],

tests/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
735735
dict(
736736
messages=[
737737
{
738-
"content": "Write a poem about Python",
738+
"content": "Write a haiku about programming",
739739
"role": "user",
740740
}
741741
],
@@ -764,7 +764,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
764764
dict(
765765
messages=[
766766
{
767-
"content": "Write a poem about Python",
767+
"content": "Write a haiku about programming",
768768
"role": "user",
769769
}
770770
],
@@ -1555,7 +1555,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
15551555
dict(
15561556
messages=[
15571557
{
1558-
"content": "Write a poem about Python",
1558+
"content": "Write a haiku about programming",
15591559
"role": "user",
15601560
}
15611561
],
@@ -1584,7 +1584,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
15841584
dict(
15851585
messages=[
15861586
{
1587-
"content": "Write a poem about Python",
1587+
"content": "Write a haiku about programming",
15881588
"role": "user",
15891589
}
15901590
],

0 commit comments

Comments
 (0)