Skip to content

Commit d562bd1

Browse files
committed
Правки в /models endpoint
1 parent 35f4b62 commit d562bd1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
from starlette.middleware.cors import CORSMiddleware
1717
from typing import Any
1818
import g4f
19-
from g4f import ChatCompletion, Provider, BaseProvider, models
19+
from g4f import ChatCompletion, Provider, BaseProvider
20+
from g4f.models import ModelUtils
2021
from cachetools import LRUCache
2122

2223
import aiofiles
@@ -216,7 +217,7 @@ async def billing_usage():
216217
@app.get("/models")
217218
async def get_models():
218219
models_data = {"data": []}
219-
for model_name, model in models.ModelUtils.convert.items():
220+
for model_name, model in ModelUtils.convert.items():
220221
models_data['data'].append({
221222
"id": model_name,
222223
"object": "model",

0 commit comments

Comments
 (0)