Skip to content
Snippets Groups Projects
Unverified Commit 4fe981a0 authored by Siraj R Aizlewood's avatar Siraj R Aizlewood
Browse files

Linting.

parent aa735fd9
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ class OpenAIEncoder(BaseEncoder): ...@@ -29,7 +29,7 @@ class OpenAIEncoder(BaseEncoder):
super().__init__(name=name, score_threshold=score_threshold) super().__init__(name=name, score_threshold=score_threshold)
api_key = openai_api_key or os.getenv("OPENAI_API_KEY") api_key = openai_api_key or os.getenv("OPENAI_API_KEY")
openai_org_id = openai_org_id or os.getenv("OPENAI_ORG_ID") openai_org_id = openai_org_id or os.getenv("OPENAI_ORG_ID")
if (api_key is None): if api_key is None:
raise ValueError("OpenAI API key cannot be 'None'.") raise ValueError("OpenAI API key cannot be 'None'.")
try: try:
self.client = openai.Client(api_key=api_key, organization=openai_org_id) self.client = openai.Client(api_key=api_key, organization=openai_org_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment