Skip to content

Commit

Permalink
chore(internal): minor reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed Jan 7, 2025
1 parent c82f3e8 commit 5a80668
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/anthropic/lib/bedrock/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ def _prepare_options(input_options: FinalRequestOptions) -> FinalRequestOptions:
else:
options.url = f"/model/{model}/invoke"

if options.url.startswith('/v1/messages/batches'):
raise AnthropicError('The Batch API is not supported in Bedrock yet')
if options.url == '/v1/messages/count_tokens':
raise AnthropicError('Token counting is not supported in Bedrock yet')
if options.url.startswith("/v1/messages/batches"):
raise AnthropicError("The Batch API is not supported in Bedrock yet")

if options.url == "/v1/messages/count_tokens":
raise AnthropicError("Token counting is not supported in Bedrock yet")

return options

Expand Down
6 changes: 3 additions & 3 deletions src/anthropic/lib/vertex/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def _prepare_options(input_options: FinalRequestOptions, *, project_id: str | No

options.url = f"/projects/{project_id}/locations/{region}/publishers/anthropic/models/count-tokens:rawPredict"

if options.url.startswith('/v1/messages/batches'):
raise AnthropicError('The Batch API is not supported in the Vertex client yet')
if options.url.startswith("/v1/messages/batches"):
raise AnthropicError("The Batch API is not supported in the Vertex client yet")

return options

0 comments on commit 5a80668

Please sign in to comment.