pvanand commited on
Commit
554d1f2
1 Parent(s): 29b87be

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -189,7 +189,7 @@ def stream_llm_request(api_key: str, llm_request: dict, endpoint_url: str):
189
  async def chat(request: ChatRequest, background_tasks: BackgroundTasks, api_key: str = Depends(get_api_key)):
190
  try:
191
  document_list = load_embeddings(request.index_id)
192
- search_results = embeddings.search(request.query, 5)
193
  context = "\n".join([document_list[idx[0]] for idx in search_results])
194
 
195
  rag_prompt = f"Based on the following context, please answer the user's question:\n\nContext:\n{context}\n\nUser's question: {request.query}\n\nAnswer:"
 
189
  async def chat(request: ChatRequest, background_tasks: BackgroundTasks, api_key: str = Depends(get_api_key)):
190
  try:
191
  document_list = load_embeddings(request.index_id)
192
+ search_results = embeddings.search(request.query, 8)
193
  context = "\n".join([document_list[idx[0]] for idx in search_results])
194
 
195
  rag_prompt = f"Based on the following context, please answer the user's question:\n\nContext:\n{context}\n\nUser's question: {request.query}\n\nAnswer:"