Update app.py
Browse files
app.py
CHANGED
@@ -50,21 +50,21 @@ def respond(
|
|
50 |
prompt_fr = client.text_generation(prompt_template.format(language="French") + message)
|
51 |
prompt_it = client.text_generation(prompt_template.format(language="Italian") + message)
|
52 |
|
53 |
-
print(prompt_en)
|
54 |
-
print(prompt_de)
|
55 |
-
print(prompt_fr)
|
56 |
-
print(prompt_it)
|
57 |
-
|
58 |
-
|
59 |
# retriever = vector_db.as_retriever(search_type="similarity_score_threshold", search_kwargs={"score_threshold": score, "k": 10})
|
60 |
# retriever = vector_db.as_retriever(search_type="similarity", search_kwargs={"k": 10})
|
61 |
# retriever = vector_db.as_retriever(search_type="mmr")
|
62 |
# documents = retriever.invoke(message)
|
63 |
|
64 |
documents_en = vector_db.similarity_search_with_score(prompt_en, k=4)
|
|
|
|
|
65 |
documents_de = vector_db.similarity_search_with_score(prompt_de, k=4)
|
|
|
66 |
documents_fr = vector_db.similarity_search_with_score(prompt_fr, k=4)
|
|
|
|
|
67 |
documents_it = vector_db.similarity_search_with_score(prompt_it, k=4)
|
|
|
68 |
|
69 |
documents = documents_en + documents_de + documents_fr + documents_it
|
70 |
|
|
|
50 |
prompt_fr = client.text_generation(prompt_template.format(language="French") + message)
|
51 |
prompt_it = client.text_generation(prompt_template.format(language="Italian") + message)
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
# retriever = vector_db.as_retriever(search_type="similarity_score_threshold", search_kwargs={"score_threshold": score, "k": 10})
|
54 |
# retriever = vector_db.as_retriever(search_type="similarity", search_kwargs={"k": 10})
|
55 |
# retriever = vector_db.as_retriever(search_type="mmr")
|
56 |
# documents = retriever.invoke(message)
|
57 |
|
58 |
documents_en = vector_db.similarity_search_with_score(prompt_en, k=4)
|
59 |
+
print(prompt_en)
|
60 |
+
|
61 |
documents_de = vector_db.similarity_search_with_score(prompt_de, k=4)
|
62 |
+
print(prompt_de)
|
63 |
documents_fr = vector_db.similarity_search_with_score(prompt_fr, k=4)
|
64 |
+
print(prompt_fr)
|
65 |
+
|
66 |
documents_it = vector_db.similarity_search_with_score(prompt_it, k=4)
|
67 |
+
print(prompt_it)
|
68 |
|
69 |
documents = documents_en + documents_de + documents_fr + documents_it
|
70 |
|