Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chat_service/routers/chat.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from fastapi import APIRouter, HTTPException, Depends
from fastapi.concurrency import run_in_threadpool
from openai import OpenAI, APIError
from shared_utils.client import get_openai_client
from shared_utils.openai_client import get_openai_client
import logging
import os
from models.chat import ChatRequest

router = APIRouter(prefix="/chat")
router = APIRouter()
logger = logging.getLogger(__name__)

_OPENAI_MODEL_DEFAULT = "qwen2.5-0.5b-instruct"
OPENAI_MODEL_NAME = os.getenv("OPENAI_MODEL", _OPENAI_MODEL_DEFAULT)


@router.post("/", status_code=201)
@router.post("/chat", status_code=201)
Comment thread
jun-create marked this conversation as resolved.
async def handle_chat(
chat_request: ChatRequest,
client: OpenAI = Depends(get_openai_client),
Expand Down
File renamed without changes.