script + cpu optimisations

This commit is contained in:
Alex
2023-10-01 19:16:13 +01:00
parent 6045cbbc62
commit 9a33bf2210
6 changed files with 12 additions and 38 deletions

View File

@@ -118,6 +118,8 @@ def complete_stream(question, docsearch, chat_history, api_key, conversation_id)
docs = docsearch.search(question, k=2)
if settings.LLM_NAME == "llama.cpp":
docs = [docs[0]]
# join all page_content together with a newline
docs_together = "\n".join([doc.page_content for doc in docs])
p_chat_combine = chat_combine_template.replace("{summaries}", docs_together)