We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c93c23 + 70b2c0d commit c6c2b93Copy full SHA for c6c2b93
server/backend.py
@@ -14,8 +14,8 @@
14
class Backend_Api:
15
def __init__(self, app, config: dict) -> None:
16
self.app = app
17
- self.openai_key = os.environ["OPENAI_API_KEY"] or config['openai_key']
18
- self.openai_api_base = os.environ["OPENAI_API_BASE"] or config['openai_api_base']
+ self.openai_key = os.getenv("OPENAI_API_KEY") or config['openai_key']
+ self.openai_api_base = os.getenv("OPENAI_API_BASE") or config['openai_api_base']
19
self.routes = {
20
'/backend-api/v2/conversation': {
21
'function': self._conversation,
0 commit comments