fix: get config from config value first then environment variable (#1815)
This commit is contained in:
@@ -30,7 +30,7 @@ class GroqLLM(LLMBase):
|
||||
self.config.model = "llama3-70b-8192"
|
||||
self.client = Groq()
|
||||
|
||||
api_key = os.getenv("GROQ_API_KEY") or self.config.api_key
|
||||
api_key = self.config.api_key or os.getenv("GROQ_API_KEY")
|
||||
self.client = Groq(api_key=api_key)
|
||||
|
||||
def _parse_response(self, response, tools):
|
||||
|
||||
Reference in New Issue
Block a user