New version where the streaming streamlit app is working. Refactoring of the prompt mechanism. New, more efficient prompt with citations of the URL.

This commit is contained in:
2024-01-05 13:34:48 +01:00
parent 62559dcd0f
commit ad9e7d93aa
6 changed files with 616 additions and 105 deletions

21
debug.py Normal file
View File

@@ -0,0 +1,21 @@
from rag import RAG
llm_model_path = '/Users/peportier/llm/a/a/zephyr-7b-beta.Q5_K_M.gguf'
embed_model_name = 'intfloat/multilingual-e5-large'
collection_name = 'cera'
chromadb_path = './chromadb'
rag = RAG(llm_model_path, embed_model_name, collection_name, chromadb_path)
query1 = "Comment aider une entreprise qui rencontre des problèmes de trésorerie ?"
ans1 = rag.chat(query1, stream=True)
query2 = "Pouvez-vous m'en dire plus au sujet du deuxième point ?"
ans2 = rag.chat(query2, stream=True)
# Queries:
#
# Lorsque mon client est en télétravail, quels sont les risques couverts par son assurance habitation ?
#
# Quel est le risque de perte attaché à la détention de Parts Sociales ?
#
# Comment procéder pour déclarer un sinistre habitation ? ou Comment procéder pour déclarer un sinistre Visa Premier ?