This commit is contained in:
Timothy J. Baek 2024-06-18 15:48:25 -07:00
parent 35026849df
commit bcc27e3852

View File

@ -357,7 +357,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
if "files" in data: if "files" in data:
data = {**data} data = {**data}
rag_context, citations = get_rag_context( rag_context, citations = get_rag_context(
docs=data["files"], files=data["files"],
messages=data["messages"], messages=data["messages"],
embedding_function=rag_app.state.EMBEDDING_FUNCTION, embedding_function=rag_app.state.EMBEDDING_FUNCTION,
k=rag_app.state.config.TOP_K, k=rag_app.state.config.TOP_K,