File tree Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11MISTRAL_API_KEY = " "
22OPENAI_API_KEY = " "
33GROK_API_KEY = " "
4+ CEREBRAS_API_KEY = " "
45DISABLE_LLM = " False"
56
67# AWS credentials
Original file line number Diff line number Diff line change 1717 },
1818 "GROQ" : {"groq:gemma-7b-it" },
1919 "ANTHROPIC" : {"anthropic:claude-3-haiku-20240307" },
20+ "CEREBRAS" : {"cerebras:llama3.1-8b" ,
21+ "cerebras:llama3.1-70b" }
2022}
2123
2224
Original file line number Diff line number Diff line change @@ -32,3 +32,8 @@ def get_client(model_str):
3232 from llama_index .llms .bedrock import Bedrock
3333
3434 return Bedrock (model = model_name )
35+ elif provider == "cerebras" :
36+ from llama_index .llms .cerebras import Cerebras
37+
38+ return Cerebras (model = model_name )
39+
Original file line number Diff line number Diff line change @@ -47,7 +47,10 @@ def verify_provider_name(self):
4747 assert (
4848 os .environ .get ("MISTRAL_API_KEY" ) is not None
4949 ), "Mistral API key not set"
50-
50+ if self .model .startswith ("cerebras" ):
51+ assert (
52+ os .environ .get ("CEREBRAS_API_KEY" ) is not None
53+ ), "Cerebras API key not set"
5154
5255class Player1 (Player ):
5356 def __init__ (
Original file line number Diff line number Diff line change @@ -53,3 +53,4 @@ llama-index-llms-anthropic
5353llama-index-llms-groq
5454llama-index-llms-ollama
5555llama-index-llms-bedrock
56+ llama-index-llms-cerebras
You can’t perform that action at this time.
0 commit comments