diff --git a/config.py b/config.py index 69f64203..48aaa55d 100644 --- a/config.py +++ b/config.py @@ -23,7 +23,7 @@ from datetime import datetime current_date = datetime.now() Current_Date = current_date.strftime("%Y-%m-%d") -systemprompt = os.environ.get('SYSTEMPROMPT', f"You are ChatGPT, a large language model trained by OpenAI. Respond conversationally in {LANGUAGE}. Knowledge cutoff: 2021-09. Current date: [ {Current_Date} ]") +systemprompt = os.environ.get('SYSTEMPROMPT', f"You are ChatGPT, a large language model trained by OpenAI. Respond conversationally in {LANGUAGE}. Knowledge cutoff: 2023-04. Current date: [ {Current_Date} ]") from utils.chatgpt2api import Chatbot as GPT from utils.chatgpt2api import Imagebot, claudebot diff --git a/utils/chatgpt2api.py b/utils/chatgpt2api.py index 8754e711..a1d38e49 100644 --- a/utils/chatgpt2api.py +++ b/utils/chatgpt2api.py @@ -448,7 +448,7 @@ def get_token_count(self, convo_id: str = "default") -> int: return num_tokens def get_message_token(self, url, json_post): - json_post["max_tokens"] = 5000 + json_post["max_tokens"] = 17000 headers = {"Authorization": f"Bearer {os.environ.get('API', None)}"} response = requests.Session().post( url, @@ -456,6 +456,7 @@ def get_message_token(self, url, json_post): json=json_post, timeout=None, ) + # print(response.text) if response.status_code != 200: json_response = json.loads(response.text) string = json_response["error"]["message"]