dify icon indicating copy to clipboard operation
dify copied to clipboard

token count is incorrect in vision mode

Open yuxizhe opened this issue 5 months ago • 1 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.7.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When dealing with vision tasks, dify reports significantly fewer token consumptions than actually used. use OpenAI 4o-mini model iShot2024-08-27 16 40 55

In OpenAI 4o-mini , image processing consumes at least 2833 tokens. image

✔️ Expected Behavior

Display the correct token consumption.

❌ Actual Behavior

token count is incorrect in vision mode, too low

yuxizhe avatar Aug 27 '24 08:08 yuxizhe