Niansuh commited on
Commit
c7a9f55
·
verified ·
1 Parent(s): 9fbd158

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -41,7 +41,7 @@ ALLOWED_MODELS = [
41
  # Configure CORS Middleware
42
  app.add_middleware(
43
  CORSMiddleware,
44
- allow_origins=["https://yourdomain.com"], # Replace with your trusted domains
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/v2/completion/text',
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