Update main.py
Browse files
main.py
CHANGED
@@ -41,7 +41,7 @@ ALLOWED_MODELS = [
|
|
41 |
# Configure CORS Middleware
|
42 |
app.add_middleware(
|
43 |
CORSMiddleware,
|
44 |
-
allow_origins=["
|
45 |
allow_credentials=True,
|
46 |
allow_methods=["POST", "OPTIONS"],
|
47 |
allow_headers=["Content-Type", "Authorization"],
|
@@ -167,7 +167,7 @@ async def chat_completions(
|
|
167 |
try:
|
168 |
async with client.stream(
|
169 |
'POST',
|
170 |
-
'https://sider.ai/api/
|
171 |
headers=headers,
|
172 |
json=json_data,
|
173 |
timeout=120.0
|
|
|
41 |
# Configure CORS Middleware
|
42 |
app.add_middleware(
|
43 |
CORSMiddleware,
|
44 |
+
allow_origins=["*"], # Replace with your trusted domains
|
45 |
allow_credentials=True,
|
46 |
allow_methods=["POST", "OPTIONS"],
|
47 |
allow_headers=["Content-Type", "Authorization"],
|
|
|
167 |
try:
|
168 |
async with client.stream(
|
169 |
'POST',
|
170 |
+
'https://sider.ai/api/v3/completion/text',
|
171 |
headers=headers,
|
172 |
json=json_data,
|
173 |
timeout=120.0
|