Skip to content

Commit

Permalink
Add pinned server version, fix sdk version header, bump local version. (
Browse files Browse the repository at this point in the history
  • Loading branch information
jenan-anthropic authored Jun 2, 2023
1 parent d6e51ae commit 2e4560f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Binary file added .hypothesis/unicode_data/13.0.0/charmap.json.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion anthropic/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def _request_params(
abs_url = urllib.parse.urljoin(self.api_url, path)
final_headers: dict[str, str] = {
"Accept": "application/json",
"Client": constants.ANTHROPIC_CLIENT_VERSION,
"Anthropic-SDK": constants.ANTHROPIC_CLIENT_VERSION,
"Anthropic-Version": constants.ANTHROPIC_VERSION,
"X-API-Key": self.api_key,
**(headers or {}),
}
Expand Down
2 changes: 2 additions & 0 deletions anthropic/constants.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import importlib.metadata


try:
_pkg_version = importlib.metadata.version('anthropic')
except importlib.metadata.PackageNotFoundError:
_pkg_version = 'development'

ANTHROPIC_CLIENT_VERSION = "anthropic-python/" + _pkg_version
ANTHROPIC_VERSION = "2023-01-01"

HUMAN_PROMPT = '\n\nHuman:'

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "anthropic"
version = "0.2.9"
version = "0.2.10"
description = "Library for accessing the anthropic API"
readme = "README.md"
requires-python = ">=3.8"
Expand Down

0 comments on commit 2e4560f

Please sign in to comment.