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

release: 0.15.0 #333

Merged
merged 2 commits into from
Feb 2, 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
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.14.1"
".": "0.15.0"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.15.0 (2024-02-02)

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

### Features

* **api:** add new usage response fields ([#332](https://github.com/anthropics/anthropic-sdk-python/issues/332)) ([554098e](https://github.com/anthropics/anthropic-sdk-python/commit/554098e544d49575d2d9d24edfb46f2fa0f77ba1))

## 0.14.1 (2024-02-02)

Full Changelog: [v0.14.0...v0.14.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.14.0...v0.14.1)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ from anthropic.types.beta import (
ContentBlockStopEvent,
Message,
MessageDeltaEvent,
MessageDeltaUsage,
MessageParam,
MessageStartEvent,
MessageStopEvent,
MessageStreamEvent,
TextBlock,
TextDelta,
Usage,
)
```

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.14.1"
version = "0.15.0"
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.14.1" # x-release-please-version
__version__ = "0.15.0" # x-release-please-version
114 changes: 96 additions & 18 deletions src/anthropic/resources/beta/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ def create(
"""
Create a Message.

The Messages API is currently in beta.
Send a structured list of input messages, and the model will generate the next
message in the conversation.

Messages can be used for either single queries to the model or for multi-turn
conversations.

The Messages API is currently in beta. During beta, you must send the
`anthropic-beta: messages-2023-12-15` header in your requests. If you are using
our client SDKs, this is handled for you automatically.

Args:
max_tokens: The maximum number of tokens to generate before stopping.
Expand Down Expand Up @@ -136,6 +144,11 @@ def create(
[guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
for more details on how to best construct prompts.

Note that if you want to include a
[system prompt](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts),
you can use the top-level `system` parameter — there is no `"system"` role for
input messages in the Messages API.

model: The model that will complete your prompt.

As we improve Claude, we develop new versions of it that you can query. The
Expand All @@ -161,8 +174,8 @@ def create(

stream: Whether to incrementally stream the response using server-sent events.

See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
details.
See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
for details.

system: System prompt.

Expand Down Expand Up @@ -221,7 +234,15 @@ def create(
"""
Create a Message.

The Messages API is currently in beta.
Send a structured list of input messages, and the model will generate the next
message in the conversation.

Messages can be used for either single queries to the model or for multi-turn
conversations.

The Messages API is currently in beta. During beta, you must send the
`anthropic-beta: messages-2023-12-15` header in your requests. If you are using
our client SDKs, this is handled for you automatically.

Args:
max_tokens: The maximum number of tokens to generate before stopping.
Expand Down Expand Up @@ -293,6 +314,11 @@ def create(
[guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
for more details on how to best construct prompts.

Note that if you want to include a
[system prompt](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts),
you can use the top-level `system` parameter — there is no `"system"` role for
input messages in the Messages API.

model: The model that will complete your prompt.

As we improve Claude, we develop new versions of it that you can query. The
Expand All @@ -306,8 +332,8 @@ def create(

stream: Whether to incrementally stream the response using server-sent events.

See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
details.
See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
for details.

metadata: An object describing metadata about the request.

Expand Down Expand Up @@ -378,7 +404,15 @@ def create(
"""
Create a Message.

The Messages API is currently in beta.
Send a structured list of input messages, and the model will generate the next
message in the conversation.

Messages can be used for either single queries to the model or for multi-turn
conversations.

The Messages API is currently in beta. During beta, you must send the
`anthropic-beta: messages-2023-12-15` header in your requests. If you are using
our client SDKs, this is handled for you automatically.

Args:
max_tokens: The maximum number of tokens to generate before stopping.
Expand Down Expand Up @@ -450,6 +484,11 @@ def create(
[guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
for more details on how to best construct prompts.

Note that if you want to include a
[system prompt](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts),
you can use the top-level `system` parameter — there is no `"system"` role for
input messages in the Messages API.

model: The model that will complete your prompt.

As we improve Claude, we develop new versions of it that you can query. The
Expand All @@ -463,8 +502,8 @@ def create(

stream: Whether to incrementally stream the response using server-sent events.

See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
details.
See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
for details.

metadata: An object describing metadata about the request.

Expand Down Expand Up @@ -693,7 +732,15 @@ async def create(
"""
Create a Message.

The Messages API is currently in beta.
Send a structured list of input messages, and the model will generate the next
message in the conversation.

Messages can be used for either single queries to the model or for multi-turn
conversations.

The Messages API is currently in beta. During beta, you must send the
`anthropic-beta: messages-2023-12-15` header in your requests. If you are using
our client SDKs, this is handled for you automatically.

Args:
max_tokens: The maximum number of tokens to generate before stopping.
Expand Down Expand Up @@ -765,6 +812,11 @@ async def create(
[guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
for more details on how to best construct prompts.

Note that if you want to include a
[system prompt](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts),
you can use the top-level `system` parameter — there is no `"system"` role for
input messages in the Messages API.

model: The model that will complete your prompt.

As we improve Claude, we develop new versions of it that you can query. The
Expand All @@ -790,8 +842,8 @@ async def create(

stream: Whether to incrementally stream the response using server-sent events.

See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
details.
See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
for details.

system: System prompt.

Expand Down Expand Up @@ -850,7 +902,15 @@ async def create(
"""
Create a Message.

The Messages API is currently in beta.
Send a structured list of input messages, and the model will generate the next
message in the conversation.

Messages can be used for either single queries to the model or for multi-turn
conversations.

The Messages API is currently in beta. During beta, you must send the
`anthropic-beta: messages-2023-12-15` header in your requests. If you are using
our client SDKs, this is handled for you automatically.

Args:
max_tokens: The maximum number of tokens to generate before stopping.
Expand Down Expand Up @@ -922,6 +982,11 @@ async def create(
[guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
for more details on how to best construct prompts.

Note that if you want to include a
[system prompt](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts),
you can use the top-level `system` parameter — there is no `"system"` role for
input messages in the Messages API.

model: The model that will complete your prompt.

As we improve Claude, we develop new versions of it that you can query. The
Expand All @@ -935,8 +1000,8 @@ async def create(

stream: Whether to incrementally stream the response using server-sent events.

See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
details.
See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
for details.

metadata: An object describing metadata about the request.

Expand Down Expand Up @@ -1007,7 +1072,15 @@ async def create(
"""
Create a Message.

The Messages API is currently in beta.
Send a structured list of input messages, and the model will generate the next
message in the conversation.

Messages can be used for either single queries to the model or for multi-turn
conversations.

The Messages API is currently in beta. During beta, you must send the
`anthropic-beta: messages-2023-12-15` header in your requests. If you are using
our client SDKs, this is handled for you automatically.

Args:
max_tokens: The maximum number of tokens to generate before stopping.
Expand Down Expand Up @@ -1079,6 +1152,11 @@ async def create(
[guide to prompt design](https://docs.anthropic.com/claude/docs/introduction-to-prompt-design)
for more details on how to best construct prompts.

Note that if you want to include a
[system prompt](https://docs.anthropic.com/claude/docs/how-to-use-system-prompts),
you can use the top-level `system` parameter — there is no `"system"` role for
input messages in the Messages API.

model: The model that will complete your prompt.

As we improve Claude, we develop new versions of it that you can query. The
Expand All @@ -1092,8 +1170,8 @@ async def create(

stream: Whether to incrementally stream the response using server-sent events.

See [streaming](https://docs.anthropic.com/claude/reference/streaming) for
details.
See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
for details.

metadata: An object describing metadata about the request.

Expand Down
Loading
Loading