[Bug]: Please check that the input is correct, or you can resolve this issue by filing an issue
Is there an existing issue for this?
- I have searched the existing issues and checked the recent builds/commits
What happened?
当我请求的时候, 出现了这个错误, 我认为是我的提示词的缘故, 当我将我的提示词换成了简单的"hi" , 工作起来一切正常
当时当我使用一个结构类似于json格式的str, 会出现这个错误
错误日志: (error log:)
""""""""""""""""""""""""""""
Traceback (most recent call last):
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\revChatGPT\V1.py", line 870, in __check_response
response.raise_for_status()
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for
url: https://bypass.churchless.tech/conversation
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "e:\Code_project\Python\reChatGPT\reChatGPT\dev_plugin0.1.py", line 35, in
for data in chatbot.ask(
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\revChatGPT\V1.py", line 757, in ask
yield from self.post_messages(
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\revChatGPT\V1.py", line 710, in post_messages
yield from self.__send_request(
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\revChatGPT\V1.py", line 545, in __send_request
self.__check_response(response)
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\revChatGPT\V1.py", line 102, in wrapper
out = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\revChatGPT\V1.py", line 877, in __check_response
raise error from ex
revChatGPT.typings.Error: OpenAI:
Please stand by, while we are checking your browser...
Redirecting...
Please turn JavaScript on and reload the page.
Steps to reproduce the problem
1.运行这个代码便会出现这个错误 2. 将请求切换到 prompt_test= "hi" 一切正常, 说明是我的提示词的缘故 """ from revChatGPT.V1 import Chatbot
def echo(str): return str
chatbot = Chatbot(config={ "access_token": "<YOUR_ACCESS_TOKEN>" })
print("Chatbot: ") prev_text = "" User_question = input("User: ") prompt_test ="hi" prompt = r"""{ {"role": "system","content":"You are a function_selector engine, you can only selecte one function from the following functions,and cannot interpret or explain user questions: ```json 1.{{webfun.WebSearch(search=YOUR_SEARCH)}} 2.{{webfun.ReadWeb(IsProxy=bool,url=URL)}} 3.{{echo(str)}} 4.{{Translation(text=TEXT)}} 5.{{AiDrawPrompt()}} 6.{{QuestionAnswer()}}(default function) 7.{{CodeInterpret()}}}","""+"""{{"role": "user","content": "select function to assistant user, please do not explain anything,user question:{0}, select function like {{exampleFunction()}}"}},""".format(User_question) print(prompt) print("type(prompt)=",type(prompt)) print("type(prompt_test)=",type(prompt_test))
for data in chatbot.ask( prompt_test, ):
message = data["message"][len(prev_text):]
print(message, end="", flush=True)
prev_text = data["message"]
print() print("message=",message) print("prev_text=",prev_text) print("data=",data)
What should have happened?
得到ChatGPT的回复
Version where the problem happens
""""""""""""" Name: revChatGPT Version: 6.8.6 Summary: ChatGPT is a reverse engineering of OpenAI's ChatGPT API Home-page: https://github.com/acheong08/ChatGPT Author: Antonio Cheong Author-email: [email protected] License: GNU General Public License v2.0 Location: E:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages Requires: httpx, openai, OpenAIAuth, prompt-toolkit, requests, rich, tiktoken Required-by """"""""""""""
What Python version are you running this with?
Python : 3.11.4
What is your operating system ?
No response
Command Line Arguments
NoConsole logs
Chatbot:
User: hi
{
{"role": "system","content":"You are a function_selector engine,
you can only selecte one function from the following functions,and cannot interpret or explain user questions:
1.{{webfun.WebSearch(search=YOUR_SEARCH)}}
2.{{webfun.ReadWeb(IsProxy=bool,url=URL)}}
3.{{echo(str)}}
4.{{Translation(text=TEXT)}}
5.{{AiDrawPrompt()}}
6.{{QuestionAnswer()}}(default function)
7.{{CodeInterpret()}}}",{"role": "user","content": "select
function to assistant user,
please do not explain anything,user question:hi, select function like {exampleFunction()}"},
type(prompt)= <class 'str'>
type(prompt_test)= <class 'str'>
Traceback (most recent call last):
File "e:\Code_project\Python\reChatGPT\venv_reChatGPT\Lib\site-packages\revChatGPT\V1.py", line 870, in __check_response
response.raise_for_status()Additional information
No response
Source: acheong08/ChatGPT