Skip to content

Commit

Permalink
feat: update base_url of anthropic
Browse files Browse the repository at this point in the history
  • Loading branch information
yangenfeng committed Mar 6, 2024
1 parent e9b1f4e commit 1d14886
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/partners/anthropic/langchain_anthropic/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def validate_environment(cls, values: Dict) -> Dict:
)
values["anthropic_api_key"] = anthropic_api_key
api_url = values.get("anthropic_api_url")
if not api_url:
api_url = "https://api.anthropic.com"
values["_client"] = anthropic.Client(
api_key=anthropic_api_key.get_secret_value(),
base_url=api_url
Expand Down

0 comments on commit 1d14886

Please sign in to comment.