removed proxies
Browse files
main.py
CHANGED
|
@@ -2,7 +2,6 @@ import logging
|
|
| 2 |
import json
|
| 3 |
import uvicorn
|
| 4 |
import nest_asyncio
|
| 5 |
-
import random
|
| 6 |
|
| 7 |
from fastapi import FastAPI, Response, Request
|
| 8 |
from fastapi.responses import StreamingResponse, RedirectResponse, HTMLResponse, JSONResponse
|
|
@@ -27,9 +26,6 @@ class ChatCompletionsConfig(BaseModel):
|
|
| 27 |
stop: Union[list[str], str, None] = None
|
| 28 |
api_key: Union[str, None] = None
|
| 29 |
|
| 30 |
-
with open("./p.txt", "r", encoding="utf-8") as f:
|
| 31 |
-
pr = f.readlines()
|
| 32 |
-
|
| 33 |
class Api:
|
| 34 |
def __init__(self, engine: g4f, debug: bool = True, sentry: bool = False,
|
| 35 |
list_ignored_providers: List[str] = None) -> None:
|
|
@@ -52,7 +48,7 @@ class Api:
|
|
| 52 |
|
| 53 |
def mkclient(self):
|
| 54 |
if self.n >= 5:
|
| 55 |
-
self.client = Client(
|
| 56 |
self.n = 0
|
| 57 |
|
| 58 |
self.n += 1
|
|
|
|
| 2 |
import json
|
| 3 |
import uvicorn
|
| 4 |
import nest_asyncio
|
|
|
|
| 5 |
|
| 6 |
from fastapi import FastAPI, Response, Request
|
| 7 |
from fastapi.responses import StreamingResponse, RedirectResponse, HTMLResponse, JSONResponse
|
|
|
|
| 26 |
stop: Union[list[str], str, None] = None
|
| 27 |
api_key: Union[str, None] = None
|
| 28 |
|
|
|
|
|
|
|
|
|
|
| 29 |
class Api:
|
| 30 |
def __init__(self, engine: g4f, debug: bool = True, sentry: bool = False,
|
| 31 |
list_ignored_providers: List[str] = None) -> None:
|
|
|
|
| 48 |
|
| 49 |
def mkclient(self):
|
| 50 |
if self.n >= 5:
|
| 51 |
+
self.client = Client()
|
| 52 |
self.n = 0
|
| 53 |
|
| 54 |
self.n += 1
|