AFischer1985 commited on
Commit
4a92874
·
verified ·
1 Parent(s): 4cb0924

Update RAG k

Browse files
Files changed (1) hide show
  1. run.py +1 -1
run.py CHANGED
@@ -296,7 +296,7 @@ def multimodal_response(message, history, dropdown, hfToken, request: gr.Request
296
  print(str(client.list_collections()))
297
  x=collection.get(include=[])["ids"]
298
  ragQuery=[format_prompt(query, history) if len(history)>0 else query]
299
- context=collection.query(query_texts=ragQuery, n_results=1)
300
  context=["<Kontext "+str(i)+"> "+str(c)+"</Kontext "+str(i)+">" for i,c in enumerate(context["documents"][0])]
301
  gr.Info("Kontext:\n"+str(context))
302
  generate_kwargs = dict(
 
296
  print(str(client.list_collections()))
297
  x=collection.get(include=[])["ids"]
298
  ragQuery=[format_prompt(query, history) if len(history)>0 else query]
299
+ context=collection.query(query_texts=ragQuery, n_results=3)
300
  context=["<Kontext "+str(i)+"> "+str(c)+"</Kontext "+str(i)+">" for i,c in enumerate(context["documents"][0])]
301
  gr.Info("Kontext:\n"+str(context))
302
  generate_kwargs = dict(