适配网关3.5

This commit is contained in:
w_xiaolizu
2023-06-09 10:33:54 +08:00
parent 955367b0bc
commit f74dd47d01
2 changed files with 10 additions and 1 deletions

View File

@ -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