Skip to content

Commit

Permalink
fix: incorrect argument structure in Groq_Client.init() (#1122)
Browse files Browse the repository at this point in the history
when calling BaseLLMModel.init() in Groq_Client.init(), the last argument should be `config={"api_key":api_key}`, instead of `api_key=api_key`
  • Loading branch information
vc12345679 committed May 13, 2024
1 parent 7aee8f2 commit b489e70
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/models/Groq.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@

class Groq_Client(BaseLLMModel):
def __init__(self, model_name, api_key, user_name="") -> None:
super().__init__(model_name=model_name, user=user_name, api_key=api_key)
super().__init__(
model_name=model_name,
user=user_name,
config={
"api_key": api_key
}
)
self.client = Groq(
api_key=os.environ.get("GROQ_API_KEY"),
base_url=self.api_host,
Expand Down

0 comments on commit b489e70

Please sign in to comment.