gpt_academic icon indicating copy to clipboard operation
gpt_academic copied to clipboard

[Feature]: 增加其他第三方模型的多线程支持,附上修改方法:

Open moxi000 opened this issue 1 year ago • 1 comments

Class | 类型

程序主体

Feature Request | 功能请求

1c8ca1fb3fd1dba0a31b799d911b19e7 def can_multi_process(llm) -> bool: from request_llms.bridge_all import model_info

def default_condition(llm) -> bool:
    # legacy condition
    if llm.startswith('gpt-'): return True
    if llm.startswith('api2d-'): return True
    if llm.startswith('azure-'): return True
    if llm.startswith('spark'): return True
    if llm.startswith('qianfan'): return True
    if llm.startswith('gemini-'): return True
    if llm.startswith('moonshot-'): return True
    if llm.startswith('one-'): return True
    if llm.startswith('zhipuai') or llm.startswith('glm-'): return True
    return False

在/gpt_academic/crazy_functions/crazy_utils.py这个文件夹下增加以上代码(通过模型前缀判断是否开启多线程的bool值)

moxi000 avatar May 07 '24 02:05 moxi000

还有一种方法是在bridge_all.py里面加上can_multi_thread标志位

image

binary-husky avatar May 07 '24 02:05 binary-husky