🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Working GPT-4 version without memory
  • Loading branch information
santiadavani committed Sep 15, 2023
commit cc5da68dd9c166deebedab1be9bd972333cdb253
7 changes: 1 addition & 6 deletions pgml-apps/pgml-chat/pgml_chat/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def handler(signum, frame):

default_system_prompt_template = """
You are an assistant to answer questions about {topic}.
Your name is {name}. Use the given list of documents to answer user's question.
Your name is {name}. You speak like {persona} in {language}. Use the given list of documents to answer user's question.
Use the following steps:

1. Identify if the user input is really a question.
Expand Down Expand Up @@ -200,11 +200,6 @@ def handler(signum, frame):
User: {question}
###

If the user input is generic then respond with a generic answer. For example: If the user says "Hello" then respond with "Hello". If the user says "Thank you" then respond with "You are welcome".
You speak like {persona} in {language}.

Most importantly, If you don't find any document to answer the question say I don't know! DON'T MAKE UP AN ANSWER! It is very important that you don't make up an answer!

Helpful Answer:"""

openai_api_key = os.environ.get("OPENAI_API_KEY")
Expand Down