mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(main.py): check for ANTHROPIC_BASE_URL in environment
Fixes https://github.com/BerriAI/litellm/issues/4803
This commit is contained in:
parent
03534bf483
commit
a29be08397
2 changed files with 3 additions and 0 deletions
|
@ -1487,6 +1487,7 @@ def completion(
|
|||
api_base
|
||||
or litellm.api_base
|
||||
or get_secret("ANTHROPIC_API_BASE")
|
||||
or get_secret("ANTHROPIC_BASE_URL")
|
||||
or "https://api.anthropic.com/v1/complete"
|
||||
)
|
||||
response = anthropic_text_completions.completion(
|
||||
|
@ -1512,6 +1513,7 @@ def completion(
|
|||
api_base
|
||||
or litellm.api_base
|
||||
or get_secret("ANTHROPIC_API_BASE")
|
||||
or get_secret("ANTHROPIC_BASE_URL")
|
||||
or "https://api.anthropic.com/v1/messages"
|
||||
)
|
||||
response = anthropic_chat_completions.completion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue