binary-husky / gpt_academic

为GPT/GLM等LLM大语言模型提供实用化交互接口,特别优化论文阅读/润色/写作体验,模块化设计,支持自定义快捷按钮&函数插件,支持Python和C++等项目剖析&自译解功能,PDF/LaTex论文翻译&总结功能,支持并行问询多种LLM模型,支持chatglm3等本地模型。接入通义千问, deepseekcoder, 讯飞星火, 文心一言, llama2, rwkv, claude2, moss等。

Home Page:https://github.com/binary-husky/gpt_academic/wiki/online

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

moxi000 opened this issue · 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值)

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

image