Skip to content

Commit

Permalink
feat: use model name in openai endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ceerRep committed Feb 16, 2025
1 parent 5ac2660 commit c7fdb62
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ktransformers/server/api/openai/endpoints/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
from ktransformers.server.schemas.assistants.streaming import chat_stream_response
from ktransformers.server.schemas.endpoints.chat import ChatCompletionCreate,ChatCompletionChunk,ChatCompletionObject
from ktransformers.server.backend.base import BackendInterfaceBase
from ktransformers.server.config.config import Config

router = APIRouter()

models = [
{"id": "0", "name": "ktranformers-model"},
]

@router.get('/models', tags=['openai'])
async def list_models():
return models
return {"id": Config().model_name, "name": Config().model_name}


@router.post('/chat/completions', tags=['openai'])
Expand Down

0 comments on commit c7fdb62

Please sign in to comment.