Skip to content

Commit

Permalink
Правки в /models endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
neurogen-dev committed Sep 1, 2023
1 parent 35f4b62 commit d562bd1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from starlette.middleware.cors import CORSMiddleware
from typing import Any
import g4f
from g4f import ChatCompletion, Provider, BaseProvider, models
from g4f import ChatCompletion, Provider, BaseProvider
from g4f.models import ModelUtils
from cachetools import LRUCache

import aiofiles
Expand Down Expand Up @@ -216,7 +217,7 @@ async def billing_usage():
@app.get("/models")
async def get_models():
models_data = {"data": []}
for model_name, model in models.ModelUtils.convert.items():
for model_name, model in ModelUtils.convert.items():
models_data['data'].append({
"id": model_name,
"object": "model",
Expand Down

0 comments on commit d562bd1

Please sign in to comment.