Array[Object] not usable in LLM nodes #6018

Closed
opened 2026-02-21 18:13:42 -05:00 by yindo · 1 comment
Owner

Originally created by @Namec999 on GitHub (Oct 10, 2024).

Self Checks

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

Provide a description of requested docs changes

Hello,

when using my tools i can get back variables as text or array of objects

when using text the next llm can use it via context, and respond well, but when using array of objects as context it doesnt work ??

any help plz

Originally created by @Namec999 on GitHub (Oct 10, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Provide a description of requested docs changes Hello, when using my tools i can get back variables as text or array of objects when using text the next llm can use it via context, and respond well, but when using array of objects as context it doesnt work ?? any help plz
yindo closed this issue 2026-02-21 18:13:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 10, 2024):

When using an array of objects as context in LLM nodes, each object must have a "content" key. The context is processed by concatenating these "content" values into a single string. If the objects aren't structured with a "content" key, it won't work and will raise a ValueError [1]. Make sure your array of objects is formatted correctly.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 10, 2024): <!-- Answer --> When using an array of objects as context in LLM nodes, each object must have a "content" key. The context is processed by concatenating these "content" values into a single string. If the objects aren't structured with a "content" key, it won't work and will raise a `ValueError` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/llm/llm_node.py)</sup>. Make sure your array of objects is formatted correctly. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6018