mirror of
https://github.com/StanGirard/quivr.git
synced 2025-01-01 15:56:53 +03:00
59fe7b089b
* feat(chat): use openai function for answer (backend) * feat(chat): use openai function for answer (frontend) * chore: refacto BrainPicking * feat: update chat creation logic * feat: simplify chat system logic * feat: set default method to gpt-3.5-turbo-0613 * feat: use user own openai key * feat(chat): slightly improve prompts * feat: add global error interceptor * feat: remove unused endpoints * docs: update chat system doc * chore(linter): add unused import remove config * feat: improve dx * feat: improve OpenAiFunctionBasedAnswerGenerator prompt
13 lines
540 B
Python
13 lines
540 B
Python
from langchain.prompts.prompt import PromptTemplate
|
|
|
|
prompt_template = """Your name is Quivr. You are a second brain. A person will ask you a question and you will provide a helpful answer. Write the answer in the same language as the question. If you don't know the answer, just say that you don't know. Don't try to make up an answer. Use the following context to answer the question:
|
|
|
|
|
|
{context}
|
|
|
|
Question: {question}
|
|
Helpful Answer:"""
|
|
QA_PROMPT = PromptTemplate(
|
|
template=prompt_template, input_variables=["context", "question"]
|
|
)
|