适配网关3.5
This commit is contained in:
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user