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

Disable Vertex AI Anthropic #4

Open
wants to merge 3 commits into
base: add-litellm-router
Choose a base branch
from
Open
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
33 changes: 17 additions & 16 deletions compextAI-executor/litellm_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,29 @@ def get_model_list(api_keys:dict):
"api_key": api_keys.get("openai", "")
}
},
{
"model_name": "gpt-4o",
"litellm_params": {
"model": "azure/gpt-4o",
"api_key": api_keys.get("azure", ""),
"api_base": api_keys.get("azure_endpoint", ""),
"api_version": AZURE_VERSION
}
},
# {
# "model_name": "gpt-4o",
# "litellm_params": {
# "model": "azure/gpt-4o",
# "api_key": api_keys.get("azure", ""),
# "api_base": api_keys.get("azure_endpoint", ""),
# "api_version": AZURE_VERSION
# }
# },
{
"model_name": "gpt-4o",
"litellm_params": {
"model": "gpt-4o",
"api_key": api_keys.get("openai", "")
}
},
{
"model_name": "claude-3-5-sonnet",
"litellm_params": {
"model": "vertex_ai/claude-3-5-sonnet-v2@20241022",
"vertex_credentials": json.dumps(api_keys.get("google_service_account_creds", {})),
}
},
# {
# "model_name": "claude-3-5-sonnet",
# "litellm_params": {
# "model": "vertex_ai/claude-3-5-sonnet-v2@20241022",
# "vertex_credentials": json.dumps(api_keys.get("google_service_account_creds", {})),
# }
# },
{
"model_name": "claude-3-5-sonnet",
"litellm_params": {
Expand Down Expand Up @@ -132,6 +132,7 @@ def chat_completion(api_keys:dict, model_name:str, messages:list, temperature:fl
model=model_name,
messages=messages,
temperature=temperature,
num_retries=3,
timeout=timeout,
max_completion_tokens=max_completion_tokens if max_completion_tokens else None,
response_format=response_format if response_format else None,
Expand Down