gpt_academic icon indicating copy to clipboard operation
gpt_academic copied to clipboard

[Feature]: zhipuai相关:GLM-4V支持?

Open wl223600 opened this issue 1 year ago • 2 comments

Class | 类型

大语言模型

Feature Request | 功能请求

现状

  • 目前GPT Academic已具备完善的智谱AI的glm-4glm-3-turbo支持,上述模型没有直接解读图片的能力。
  • 根据GLM-4文档显示,glm-4v可以解读图片(~~虽然glm-4v的上下文长度仅有2k~~)。
  • 目前GPT Academic对glm-4v尚无完整支持。

bridge_zhipu.py (Line 77)

    if llm_kwargs["llm_model"] in ["glm-4v"]:
        have_recent_file, image_paths = have_any_recent_upload_image_files(chatbot)
        if not have_recent_file:
            chatbot.append((inputs, "没有检测到任何近期上传的图像文件,请上传jpg格式的图片,此外,请注意拓展名需要小写"))
            yield from update_ui(chatbot=chatbot, history=history, msg="等待图片") # 刷新界面
            return
        if have_recent_file:
            inputs = make_media_input(inputs, image_paths)
            chatbot[-1] = [inputs, ""]
            yield from update_ui(chatbot=chatbot, history=history)

bridge_all.py

(暂无glm-4v相关代码)

com_zhipuglm.py

(似乎也没有呢)

参考

GLM-4模型文档节选(完整文档

模型编码 描述 上下文长度
glm-4 最新的 GLM-4 、最大支持 128k 上下文、支持 Function Call 、Retreival。 128k tokens
glm-4v 实现了视觉语言特征的深度融合,支持视觉问答、图像字幕、视觉定位、复杂目标检测等各类多模态理解任务。 2k tokens

另:GLM-4V完整文档

wl223600 avatar Apr 08 '24 10:04 wl223600

glm-4v的代码尚未通过测试,这部分我们需要帮助

binary-husky avatar Apr 09 '24 16:04 binary-husky

https://github.com/binary-husky/gpt_academic/pull/1700

Menghuan1918 avatar Apr 11 '24 04:04 Menghuan1918