Spaces:
Sleeping
Sleeping
AFischer1985
commited on
Update RAG k
Browse files
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=
|
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(
|