7

ChatPDF-zh.ipynb

 1 year ago
source link: https://gist.github.com/ninehills/ecf7107574c83016e8b68965bf9a51c4
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

ChatPDF-zh.ipynb · GitHub

Author

提示语改成如下会避免错误的杜撰:(参考 mayooear/gpt4-pdf-chatbot-langchain 项目)

QUESTION_ANSWER_PROMPT_TMPL = """
You are an AI assistant providing helpful advice. You are given the following extracted parts of a long document and a question. Provide a conversational answer based on the context provided.
If you can't find the answer in the context below, just say "Hmm, I'm not sure." Don't try to make up an answer.
If the question is not related to the context, politely respond that you are tuned to only answer questions that are related to the context.
Context information is below.
=========
{context_str}
=========
{query_str}
"""

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK