Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 4, 2024
1 parent d779cc4 commit 6ebe199
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### With Rye

We use [Rye](https://rye-up.com/) to manage dependencies so we highly recommend [installing it](https://rye-up.com/guide/installation/) as it will automatically provision a Python environment with the expected Python version.
We use [Rye](https://rye.astral.sh/) to manage dependencies so we highly recommend [installing it](https://rye.astral.sh/guide/installation/) as it will automatically provision a Python environment with the expected Python version.

After installing Rye, you'll just have to run this command:

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ chat = client.chat.chat(
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
)
print(chat.id)
```
Expand Down Expand Up @@ -72,7 +72,7 @@ async def main() -> None:
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
)
print(chat.id)

Expand Down Expand Up @@ -148,7 +148,7 @@ try:
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
)
except writerai.APIConnectionError as e:
print("The server could not be reached")
Expand Down Expand Up @@ -199,7 +199,7 @@ client.with_options(max_retries=5).chat.chat(
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
)
```

Expand Down Expand Up @@ -230,7 +230,7 @@ client.with_options(timeout=5.0).chat.chat(
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
)
```

Expand Down Expand Up @@ -275,7 +275,7 @@ response = client.chat.with_raw_response.chat(
"content": "Hello!",
"role": "user",
}],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
)
print(response.headers.get('X-My-Header'))

Expand All @@ -301,7 +301,7 @@ with client.chat.with_streaming_response.chat(
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
) as response:
print(response.headers.get("X-My-Header"))

Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ echo "==> Installing Python dependencies…"
# experimental uv support makes installations significantly faster
rye config --set-bool behavior.use-uv=true

rye sync
rye sync --all-features
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
),
),
cast_to=httpx.Response,
Expand All @@ -754,7 +754,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
),
),
cast_to=httpx.Response,
Expand Down Expand Up @@ -1459,7 +1459,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
),
),
cast_to=httpx.Response,
Expand All @@ -1485,7 +1485,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
"role": "user",
}
],
model="palmyra-x-chat-v2-32k",
model="palmyra-x-v2",
),
),
cast_to=httpx.Response,
Expand Down

0 comments on commit 6ebe199

Please sign in to comment.