Skip to content

Commit

Permalink
checking config for api_key
Browse files Browse the repository at this point in the history
  • Loading branch information
PranavPuranik committed Aug 31, 2024
1 parent a4e40d4 commit 4251bec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion embedchain/embedchain/llm/octoai.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
@register_deserializable
class OctoAILlm(BaseLlm):
def __init__(self, config: Optional[BaseLlmConfig] = None):
assert "OCTOAI_API_TOKEN" in os.environ, "Please set OCTOAI_API_TOKEN as environment variable."
assert "OCTOAI_API_TOKEN" in os.environ or config.api_key, \
"Please set OCTOAI_API_TOKEN as environment variable."
super().__init__(config=config)

def get_llm_model_answer(self, prompt):
Expand Down

0 comments on commit 4251bec

Please sign in to comment.