Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -143,7 +143,6 @@ async def get_models():
|
|
143 |
@app.get("/models")
|
144 |
async def fetch_models():
|
145 |
return await get_models()
|
146 |
-
scraper = cloudscraper.create_scraper() # Create a CloudScraper session
|
147 |
server_status = True
|
148 |
@app.post("/chat/completions")
|
149 |
@app.post("api/v1/chat/completions")
|
@@ -177,8 +176,8 @@ async def get_completion(payload: Payload, request: Request):
|
|
177 |
current_time = (datetime.datetime.utcnow() + datetime.timedelta(hours=5, minutes=30)).strftime("%Y-%m-%d %I:%M:%S %p")
|
178 |
aaip = request.client.host
|
179 |
print(f"Time: {current_time}, {aaip}")
|
180 |
-
print(payload_dict)
|
181 |
-
|
182 |
async def stream_generator(payload_dict):
|
183 |
|
184 |
# Prepare custom headers
|
|
|
143 |
@app.get("/models")
|
144 |
async def fetch_models():
|
145 |
return await get_models()
|
|
|
146 |
server_status = True
|
147 |
@app.post("/chat/completions")
|
148 |
@app.post("api/v1/chat/completions")
|
|
|
176 |
current_time = (datetime.datetime.utcnow() + datetime.timedelta(hours=5, minutes=30)).strftime("%Y-%m-%d %I:%M:%S %p")
|
177 |
aaip = request.client.host
|
178 |
print(f"Time: {current_time}, {aaip}")
|
179 |
+
# print(payload_dict)
|
180 |
+
scraper = cloudscraper.create_scraper()
|
181 |
async def stream_generator(payload_dict):
|
182 |
|
183 |
# Prepare custom headers
|