dify icon indicating copy to clipboard operation
dify copied to clipboard

TypeError: argument should be a bytes-like object or ASCII string, not 'list'

Open yuec opened this issue 2 years ago • 5 comments

Self Checks

Dify version

0.4.4

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image

✔️ Expected Behavior

Return recall data normally

❌ Actual Behavior

report an error "typeError: argument should be a bytes-like object or ASCII string, not 'list'"

image

exception traceback: image

According to openai's api documentation, response.data should be an array, but data.embedding used in dify.

Is this a bug caused by version upgrades?

image

image

yuec avatar Jan 08 '24 12:01 yuec

image The embedding is a string encrypted by base64, so there is no problem with the logic here. Are you using the proxied openai interface?

JohnJyong avatar Jan 12 '24 09:01 JohnJyong

Sorry, I just saw this message.

Yes, we used a proxy, and this is indeed a bug caused by the proxy.

yuec avatar Jan 14 '24 04:01 yuec

后来是怎么处理的呢

wangliqing870209 avatar May 30 '24 09:05 wangliqing870209

后来是怎么处理的呢

dify不给修复 也没有给出可选项好像

imxieqing avatar Sep 13 '24 01:09 imxieqing

后来是怎么处理的呢

dify不给修复 也没有给出可选项好像

可以使用 OpenAI-API-compatible 这个模型供应商类型解决 image

shengxiagit avatar Sep 14 '24 05:09 shengxiagit