openai-auth fix
Browse files
app.py
CHANGED
|
@@ -118,10 +118,10 @@ if __name__ == "__main__":
|
|
| 118 |
# Collect the ENV variables
|
| 119 |
openai_kwargs = {}
|
| 120 |
if api_key := os.getenv("OPENAI_API_KEY"):
|
| 121 |
-
openai_kwargs["
|
| 122 |
-
|
| 123 |
if base_url := os.getenv("OPENAI_BASE_URL"):
|
| 124 |
-
openai_kwargs["
|
| 125 |
|
| 126 |
|
| 127 |
agent, tools_dict = initialize_agent(
|
|
|
|
| 118 |
# Collect the ENV variables
|
| 119 |
openai_kwargs = {}
|
| 120 |
if api_key := os.getenv("OPENAI_API_KEY"):
|
| 121 |
+
openai_kwargs["openai_api_key"] = api_key
|
| 122 |
+
|
| 123 |
if base_url := os.getenv("OPENAI_BASE_URL"):
|
| 124 |
+
openai_kwargs["openai_api_base"] = base_url
|
| 125 |
|
| 126 |
|
| 127 |
agent, tools_dict = initialize_agent(
|