-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* getting cli and .env to work together for different models * support new models * clean up prints * Add support for cerebras * Fix watson keys
- Loading branch information
1 parent
f50e709
commit 3d44795
Showing
5 changed files
with
263 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,168 @@ | ||
ENV_VARS = { | ||
'openai': ['OPENAI_API_KEY'], | ||
'anthropic': ['ANTHROPIC_API_KEY'], | ||
'gemini': ['GEMINI_API_KEY'], | ||
'groq': ['GROQ_API_KEY'], | ||
'ollama': ['FAKE_KEY'], | ||
"openai": [ | ||
{ | ||
"prompt": "Enter your OPENAI API key (press Enter to skip)", | ||
"key_name": "OPENAI_API_KEY", | ||
} | ||
], | ||
"anthropic": [ | ||
{ | ||
"prompt": "Enter your ANTHROPIC API key (press Enter to skip)", | ||
"key_name": "ANTHROPIC_API_KEY", | ||
} | ||
], | ||
"gemini": [ | ||
{ | ||
"prompt": "Enter your GEMINI API key (press Enter to skip)", | ||
"key_name": "GEMINI_API_KEY", | ||
} | ||
], | ||
"groq": [ | ||
{ | ||
"prompt": "Enter your GROQ API key (press Enter to skip)", | ||
"key_name": "GROQ_API_KEY", | ||
} | ||
], | ||
"watson": [ | ||
{ | ||
"prompt": "Enter your WATSONX URL (press Enter to skip)", | ||
"key_name": "WATSONX_URL", | ||
}, | ||
{ | ||
"prompt": "Enter your WATSONX API Key (press Enter to skip)", | ||
"key_name": "WATSONX_APIKEY", | ||
}, | ||
{ | ||
"prompt": "Enter your WATSONX Project Id (press Enter to skip)", | ||
"key_name": "WATSONX_PROJECT_ID", | ||
}, | ||
], | ||
"ollama": [ | ||
{ | ||
"default": True, | ||
"API_BASE": "http://localhost:11434", | ||
} | ||
], | ||
"bedrock": [ | ||
{ | ||
"prompt": "Enter your AWS Access Key ID (press Enter to skip)", | ||
"key_name": "AWS_ACCESS_KEY_ID", | ||
}, | ||
{ | ||
"prompt": "Enter your AWS Secret Access Key (press Enter to skip)", | ||
"key_name": "AWS_SECRET_ACCESS_KEY", | ||
}, | ||
{ | ||
"prompt": "Enter your AWS Region Name (press Enter to skip)", | ||
"key_name": "AWS_REGION_NAME", | ||
}, | ||
], | ||
"azure": [ | ||
{ | ||
"prompt": "Enter your Azure deployment name (must start with 'azure/')", | ||
"key_name": "model", | ||
}, | ||
{ | ||
"prompt": "Enter your AZURE API key (press Enter to skip)", | ||
"key_name": "AZURE_API_KEY", | ||
}, | ||
{ | ||
"prompt": "Enter your AZURE API base URL (press Enter to skip)", | ||
"key_name": "AZURE_API_BASE", | ||
}, | ||
{ | ||
"prompt": "Enter your AZURE API version (press Enter to skip)", | ||
"key_name": "AZURE_API_VERSION", | ||
}, | ||
], | ||
"cerebras": [ | ||
{ | ||
"prompt": "Enter your Cerebras model name (must start with 'cerebras/')", | ||
"key_name": "model", | ||
}, | ||
{ | ||
"prompt": "Enter your Cerebras API version (press Enter to skip)", | ||
"key_name": "CEREBRAS_API_KEY", | ||
}, | ||
], | ||
} | ||
|
||
PROVIDERS = ['openai', 'anthropic', 'gemini', 'groq', 'ollama'] | ||
|
||
PROVIDERS = [ | ||
"openai", | ||
"anthropic", | ||
"gemini", | ||
"groq", | ||
"ollama", | ||
"watson", | ||
"bedrock", | ||
"azure", | ||
"cerebras", | ||
] | ||
|
||
MODELS = { | ||
'openai': ['gpt-4', 'gpt-4o', 'gpt-4o-mini', 'o1-mini', 'o1-preview'], | ||
'anthropic': ['claude-3-5-sonnet-20240620', 'claude-3-sonnet-20240229', 'claude-3-opus-20240229', 'claude-3-haiku-20240307'], | ||
'gemini': ['gemini-1.5-flash', 'gemini-1.5-pro', 'gemini-gemma-2-9b-it', 'gemini-gemma-2-27b-it'], | ||
'groq': ['llama-3.1-8b-instant', 'llama-3.1-70b-versatile', 'llama-3.1-405b-reasoning', 'gemma2-9b-it', 'gemma-7b-it'], | ||
'ollama': ['llama3.1', 'mixtral'], | ||
"openai": ["gpt-4", "gpt-4o", "gpt-4o-mini", "o1-mini", "o1-preview"], | ||
"anthropic": [ | ||
"claude-3-5-sonnet-20240620", | ||
"claude-3-sonnet-20240229", | ||
"claude-3-opus-20240229", | ||
"claude-3-haiku-20240307", | ||
], | ||
"gemini": [ | ||
"gemini/gemini-1.5-flash", | ||
"gemini/gemini-1.5-pro", | ||
"gemini/gemini-gemma-2-9b-it", | ||
"gemini/gemini-gemma-2-27b-it", | ||
], | ||
"groq": [ | ||
"groq/llama-3.1-8b-instant", | ||
"groq/llama-3.1-70b-versatile", | ||
"groq/llama-3.1-405b-reasoning", | ||
"groq/gemma2-9b-it", | ||
"groq/gemma-7b-it", | ||
], | ||
"ollama": ["ollama/llama3.1", "ollama/mixtral"], | ||
"watson": [ | ||
"watsonx/google/flan-t5-xxl", | ||
"watsonx/google/flan-ul2", | ||
"watsonx/bigscience/mt0-xxl", | ||
"watsonx/eleutherai/gpt-neox-20b", | ||
"watsonx/ibm/mpt-7b-instruct2", | ||
"watsonx/bigcode/starcoder", | ||
"watsonx/meta-llama/llama-2-70b-chat", | ||
"watsonx/meta-llama/llama-2-13b-chat", | ||
"watsonx/ibm/granite-13b-instruct-v1", | ||
"watsonx/ibm/granite-13b-chat-v1", | ||
"watsonx/google/flan-t5-xl", | ||
"watsonx/ibm/granite-13b-chat-v2", | ||
"watsonx/ibm/granite-13b-instruct-v2", | ||
"watsonx/elyza/elyza-japanese-llama-2-7b-instruct", | ||
"watsonx/ibm-mistralai/mixtral-8x7b-instruct-v01-q", | ||
], | ||
"bedrock": [ | ||
"bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0", | ||
"bedrock/anthropic.claude-3-sonnet-20240229-v1:0", | ||
"bedrock/anthropic.claude-3-haiku-20240307-v1:0", | ||
"bedrock/anthropic.claude-3-opus-20240229-v1:0", | ||
"bedrock/anthropic.claude-v2:1", | ||
"bedrock/anthropic.claude-v2", | ||
"bedrock/anthropic.claude-instant-v1", | ||
"bedrock/meta.llama3-1-405b-instruct-v1:0", | ||
"bedrock/meta.llama3-1-70b-instruct-v1:0", | ||
"bedrock/meta.llama3-1-8b-instruct-v1:0", | ||
"bedrock/meta.llama3-70b-instruct-v1:0", | ||
"bedrock/meta.llama3-8b-instruct-v1:0", | ||
"bedrock/amazon.titan-text-lite-v1", | ||
"bedrock/amazon.titan-text-express-v1", | ||
"bedrock/cohere.command-text-v14", | ||
"bedrock/ai21.j2-mid-v1", | ||
"bedrock/ai21.j2-ultra-v1", | ||
"bedrock/ai21.jamba-instruct-v1:0", | ||
"bedrock/meta.llama2-13b-chat-v1", | ||
"bedrock/meta.llama2-70b-chat-v1", | ||
"bedrock/mistral.mistral-7b-instruct-v0:2", | ||
"bedrock/mistral.mixtral-8x7b-instruct-v0:1", | ||
], | ||
} | ||
|
||
JSON_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json" | ||
JSON_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.