mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
Add support for OpenAI organization in the secrets file
This commit is contained in:
@ -12,6 +12,8 @@ class AiHandler:
|
||||
def __init__(self):
|
||||
try:
|
||||
openai.api_key = settings.openai.key
|
||||
if settings.get("OPENAI.ORG", None):
|
||||
openai.organization = settings.openai.org
|
||||
except AttributeError as e:
|
||||
raise ValueError("OpenAI key is required") from e
|
||||
|
||||
|
Reference in New Issue
Block a user