langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.11k stars 7.36k forks source link

The image size parameter in the cogvlm tool does not match the parameter provided on the official Zhipu website, which can cause interface errors. #8315

Closed jiaolongxue closed 1 month ago

jiaolongxue commented 1 month ago

Self Checks

Dify version

0.7.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The image size parameter in the cogvlm tool does not match the parameter provided on the official Zhipu website, which can cause interface errors.

cogvlm tool

image

zhipu website

image

error

image

✔️ Expected Behavior

success

❌ Actual Behavior

image

dosubot[bot] commented 1 month ago

The image size parameter in the cogvlm tool does not match the parameter provided on the official Zhipu website because the CogView3Tool class in the cogview3.py file uses a predefined size_mapping dictionary to map size options to specific dimensions:

size_mapping = {
    "square": "1024x1024",
    "vertical": "1024x1792",
    "horizontal": "1792x1024",
}

This mapping may differ from the size parameters specified on the official Zhipu website, leading to interface errors. Additionally, the stepfun tool, as described in the image.yaml file, offers a different set of predefined image sizes:

options:
  - value: 256x256
    label:
      en_US: 256x256
  - value: 512x512
    label:
      en_US: 512x512
  - value: 768x768
    label:
      en_US: 768x768
  - value: 1024x1024
    label:
      en_US: 1024x1024
  - value: 1280x800
    label:
      en_US: 1280x800
  - value: 800x1280
    label:
      en_US: 800x1280

The discrepancy between these predefined sizes and the ones used in the cogvlm tool can cause interface errors when the expected parameters do not align [1][2].

To continue talking to Dosu, mention @dosu.

crazywoola commented 1 month ago

@ox01024 Hello can you update this tool?

ox01024 commented 1 month ago

Leave it to me. I'll take care of him as soon as possible. Don't worry.

@ox01024 Hello can you update this tool?

Leave it to me. I'll take care of him as soon as possible. Don't worry.