Skip to content

Commit

Permalink
release: 0.18.1 (#365)
Browse files Browse the repository at this point in the history
* chore(readme): update bedrock example (#364)

* release: 0.18.1
  • Loading branch information
stainless-bot committed Mar 4, 2024
1 parent 1b4f965 commit 1f110a2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.18.0"
".": "0.18.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.18.1 (2024-03-04)

Full Changelog: [v0.18.0...v0.18.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.18.0...v0.18.1)

### Chores

* **readme:** update bedrock example ([#364](https://github.com/anthropics/anthropic-sdk-python/issues/364)) ([81e4d10](https://github.com/anthropics/anthropic-sdk-python/commit/81e4d10f6b7c5e06d5d2844441350731dbddbfad))

## 0.18.0 (2024-03-04)

Full Changelog: [v0.17.0...v0.18.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.17.0...v0.18.0)
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,21 @@ This library also provides support for the [Anthropic Bedrock API](https://aws.a
You can then import and instantiate a separate `AnthropicBedrock` class, the rest of the API is the same.

```py
from anthropic import AI_PROMPT, HUMAN_PROMPT, AnthropicBedrock
from anthropic import AnthropicBedrock

client = AnthropicBedrock()

completion = client.completions.create(
model="anthropic.claude-instant-v1",
prompt=f"{HUMAN_PROMPT} hey!{AI_PROMPT}",
stop_sequences=[HUMAN_PROMPT],
max_tokens_to_sample=500,
temperature=0.5,
top_k=250,
top_p=0.5,
message = client.messages.create(
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Hello!",
}
],
model="anthropic.claude-3-sonnet-20240229-v1:0",
)
print(completion.completion)
print(message)
```

For a more fully fledged example see [`examples/bedrock.py`](https://github.com/anthropics/anthropic-sdk-python/blob/main/examples/bedrock.py).
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "anthropic"
version = "0.18.0"
version = "0.18.1"
description = "The official Python library for the anthropic API"
readme = "README.md"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/anthropic/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless.

__title__ = "anthropic"
__version__ = "0.18.0" # x-release-please-version
__version__ = "0.18.1" # x-release-please-version

0 comments on commit 1f110a2

Please sign in to comment.