Skip to content

Commit

Permalink
Use self.get_key() in OpenAI Chat class, refs #552
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Aug 19, 2024
1 parent d075336 commit 24cc042
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llm/default_plugins/openai_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ def get_client(self):
if self.api_engine:
kwargs["engine"] = self.api_engine
if self.needs_key:
if self.key:
kwargs["api_key"] = self.key
kwargs["api_key"] = self.get_key()
else:
# OpenAI-compatible models don't need a key, but the
# openai client library requires one
Expand Down

0 comments on commit 24cc042

Please sign in to comment.