Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ system_prompt += (
|
|
21 |
# Initialize OpenAI client with your API key
|
22 |
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
|
23 |
# Set custom base URL if provided, else default to official endpoint
|
24 |
-
client.
|
25 |
|
26 |
# Optional: Secret token for webhook auth, set in environment variables
|
27 |
WEBHOOK_SECRET_TOKEN = os.getenv("WEBHOOK_SECRET_TOKEN")
|
|
|
21 |
# Initialize OpenAI client with your API key
|
22 |
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
|
23 |
# Set custom base URL if provided, else default to official endpoint
|
24 |
+
client.base_url = os.getenv("OPENAI_API_BASE", "https://fast.typegpt.net/v1")
|
25 |
|
26 |
# Optional: Secret token for webhook auth, set in environment variables
|
27 |
WEBHOOK_SECRET_TOKEN = os.getenv("WEBHOOK_SECRET_TOKEN")
|