-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OctoAI support #1691
OctoAI support #1691
Conversation
d6a8de0
to
12c739a
Compare
embedchain/embedchain/llm/octoai.py
Outdated
@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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check for api_key
from config as well as.
@@ -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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate adding the assert statment. But can you please also add this:
api_key = os.getenv("OCTOAI_API_TOKEN") or self.config.api_key
4251bec
to
23c4001
Compare
Hey @PranavPuranik |
Description
Adds Octo AI with streaming
Fixes #685
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
main.py
output
Checklist:
Maintainer Checklist