feat: stabilize rag chat conversations and auto title sync
This commit is contained in:
@@ -4,7 +4,7 @@ import json
|
||||
|
||||
import httpx
|
||||
|
||||
from fastapi_modules.fastapi_leaudit.rag_engine.config import RAG_CONFIG
|
||||
from fastapi_modules.fastapi_leaudit.rag_engine.config import RAG_CONFIG, build_openai_chat_completions_url
|
||||
|
||||
|
||||
async def generate_followups(query: str, answer: str) -> list[str]:
|
||||
@@ -15,7 +15,7 @@ async def generate_followups(query: str, answer: str) -> list[str]:
|
||||
)
|
||||
async with httpx.AsyncClient(timeout=30.0) as client:
|
||||
resp = await client.post(
|
||||
f"{RAG_CONFIG['LLM_BASE_URL'].rstrip('/')}" + "/chat/completions",
|
||||
build_openai_chat_completions_url(RAG_CONFIG["LLM_BASE_URL"]),
|
||||
json={
|
||||
"model": RAG_CONFIG["LLM_MODEL"],
|
||||
"messages": [{"role": "user", "content": prompt}],
|
||||
|
||||
Reference in New Issue
Block a user