diff --git a/func_box.py b/func_box.py index 8ad69ac..a26d641 100644 --- a/func_box.py +++ b/func_box.py @@ -532,7 +532,7 @@ def reuse_chat(result, chatbot, history, pro_numb): i_say = pattern.sub('', chatbot[-1][0]) return chatbot, history, i_say, gr.Tabs.update(selected='chatbot'), '' -@timeStatistics + def num_tokens_from_string(listing: list, encoding_name: str = 'cl100k_base') -> int: """Returns the number of tokens in a text string.""" count_tokens = 0 diff --git a/request_llm/bridge_all.py b/request_llm/bridge_all.py index 44620db..efafa39 100644 --- a/request_llm/bridge_all.py +++ b/request_llm/bridge_all.py @@ -95,6 +95,15 @@ model_info = { "token_cnt": get_token_num_gpt4, }, + "proxy-gpt-35-turbo-version-0301": { + "fn_with_ui": chatgpt_ui, + "fn_without_ui": chatgpt_noui, + "endpoint": proxy_endpoint.replace('%v', 'gpt-35-turbo-version-0301'), + "max_token": 8192, + "tokenizer": tokenizer_gpt4, + "token_cnt": get_token_num_gpt4, + }, + "proxy-gpt-4": { "fn_with_ui": chatgpt_ui, "fn_without_ui": chatgpt_noui,