mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
Add support for OpenAI organization in the secrets file
This commit is contained in:
parent
4b4d91dfe9
commit
b94734e69a
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
# See README for details about GitHub App deployment.
|
||||
|
||||
[openai]
|
||||
key = "<API_KEY>"
|
||||
key = "<API_KEY>" # Acquire through https://platform.openai.com
|
||||
org = "<ORGANIZATION>" # Optional, may be commented out.
|
||||
|
||||
[github]
|
||||
# The type of deployment to create. Valid values are 'app' or 'user'.
|
||||
|
|
|
|||
Loading…
Reference in a new issue