Skip to content

Commit

Permalink
Lock the openai python package version to 0.28.1.
Browse files Browse the repository at this point in the history
Modify the search prompt and fix the error caused by closing tag mistakes.

Optimize the search prompt to generate output that aligns better with Markdown syntax.

modify README
  • Loading branch information
yym68686 committed Nov 7, 2023
1 parent edcd22f commit bd2bbeb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ https://api.telegram.org/bot<token>/getWebhookInfo
Start the container

```bash
docker run -p 80:8080 -dit \
docker run -p 80:8080 --name chatbot -dit \
-e BOT_TOKEN="telegram bot token" \
-e WEB_HOOK="https://your_host.com/" \
-e API="" \
Expand Down
2 changes: 1 addition & 1 deletion chatgpt2api/chatgpt2api.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def search_summary(
input_variables=["web_summary", "question"],
template=(
# "You are a text analysis expert who can use a search engine. You need to response the following question: {question}. Search results: {web_summary}. Your task is to thoroughly digest all search results provided above and provide a detailed and in-depth response in Simplified Chinese to the question based on the search results. The response should meet the following requirements: 1. Be rigorous, clear, professional, scholarly, logical, and well-written. 2. If the search results do not mention relevant content, simply inform me that there is none. Do not fabricate, speculate, assume, or provide inaccurate response. 3. Use markdown syntax to format the response. Enclose any single or multi-line code examples or code usage examples in a pair of ``` symbols to achieve code formatting. 4. Detailed, precise and comprehensive response in Simplified Chinese and extensive use of the search results is required."
"You need to response the following question: {question}. Search results: {web_summary}. Your task is to think about the question step by step and then answer the above question in simplified Chinese based on the Search results provided. Please response in simplified Chinese and adopt a style that is logical, in-depth, and detailed. Note: In order to make the answer appear highly professional, you should be an expert in textual analysis, aiming to make the answer precise and comprehensive. Use markdown syntax to format the response. Enclose any single or multi-line code examples or code usage examples in a pair of ``` symbols to achieve code formatting."
"You need to response the following question: {question}. Search results: {web_summary}. Your task is to think about the question step by step and then answer the above question in simplified Chinese based on the Search results provided. Please response in simplified Chinese and adopt a style that is logical, in-depth, and detailed. Note: In order to make the answer appear highly professional, you should be an expert in textual analysis, aiming to make the answer precise and comprehensive. Response in accordance with markdown format."
# "You need to response the following question: {question}. Search results: {web_summary}. Your task is to thoroughly digest the search results provided above, dig deep into search results for thorough exploration and analysis and provide a response to the question based on the search results. The response should meet the following requirements: 1. You are a text analysis expert, extensive use of the search results is required and carefully consider all the Search results to make the response be in-depth, rigorous, clear, organized, professional, detailed, scholarly, logical, precise, accurate, comprehensive, well-written and speak in Simplified Chinese. 2. If the search results do not mention relevant content, simply inform me that there is none. Do not fabricate, speculate, assume, or provide inaccurate response. 3. Use markdown syntax to format the response. Enclose any single or multi-line code examples or code usage examples in a pair of ``` symbols to achieve code formatting."
),
)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ flask[async]
python-telegram-bot==20.4

# langchain
openai
openai==0.28.1
chromadb
wikipedia
fake_useragent
Expand Down

0 comments on commit bd2bbeb

Please sign in to comment.