An error occurred during the operation of the information collection schema in the information collection agent. #10

Closed
opened 2026-02-22 17:15:30 -05:00 by yindo · 5 comments
Owner

Originally created by @fntzhang on GitHub (Mar 17, 2025).

  1. Add an agent node to the chat assistant. After selecting the "information collection" strategy, configure the model, information collection Schema, user input, and storage key-value respectively. The version of dify is 1.0.1. The following error is prompted during runtime:

Image

  1. Among them, the information collection Schema, user input, and storage key-value should refer to the official website of the plugin:https://marketplace.dify.ai/plugins/svcvit/agent
    {
    "fields": [
    {
    "name": "destination",
    "question": "请问您想去哪里旅行?",
    "required": true
    },
    {
    "name": "duration",
    "question": "您计划旅行多长时间?",
    "required": true
    },
    {
    "name": "budget",
    "question": "您的预算大约是多少?",
    "required": true
    }
    ]
    }

  2. The error reported in the dify-api log is as follows:
    [GraphRunFailedEvent] reason: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}2025-03-17 08:02:20.206 DEBUG [Thread-168 (process_request_thread)] [based_generate_task_pipeline.py:45] - error: Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}

  3. I have tried various methods but still can't solve the problem. Could you please provide some examples on how to use this component? @svcvit

Originally created by @fntzhang on GitHub (Mar 17, 2025). 1. Add an agent node to the chat assistant. After selecting the "information collection" strategy, configure the model, information collection Schema, user input, and storage key-value respectively. The version of dify is 1.0.1. The following error is prompted during runtime: ![Image](https://github.com/user-attachments/assets/05067d32-4d63-46eb-b829-1787bee34f0c) 2. Among them, the information collection Schema, user input, and storage key-value should refer to the official website of the plugin:https://marketplace.dify.ai/plugins/svcvit/agent { "fields": [ { "name": "destination", "question": "请问您想去哪里旅行?", "required": true }, { "name": "duration", "question": "您计划旅行多长时间?", "required": true }, { "name": "budget", "question": "您的预算大约是多少?", "required": true } ] } 3. The error reported in the dify-api log is as follows: [GraphRunFailedEvent] reason: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}2025-03-17 08:02:20.206 DEBUG [Thread-168 (process_request_thread)] [based_generate_task_pipeline.py:45] - error: Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"} 4. I have tried various methods but still can't solve the problem. Could you please provide some examples on how to use this component? @svcvit
yindo closed this issue 2026-02-22 17:15:30 -05:00
Author
Owner

@asdf3309 commented on GitHub (Mar 18, 2025):

只能用具体的字符串,但是我也没整明白怎么循环收集数据然后收集成功到下一步,同时能在输出变量中看到该值

@asdf3309 commented on GitHub (Mar 18, 2025): 只能用具体的字符串,但是我也没整明白怎么循环收集数据然后收集成功到下一步,同时能在输出变量中看到该值
Author
Owner

@asdf3309 commented on GitHub (Mar 18, 2025):

Image
好像只能等他自己收集,收集完成后会输出json,但是不能写到会话变量(不知道有没有方法),收集完成前也不会给出json

Image

@asdf3309 commented on GitHub (Mar 18, 2025): ![Image](https://github.com/user-attachments/assets/d289fba7-41b4-45dd-91b0-d4bb94313687) 好像只能等他自己收集,收集完成后会输出json,但是不能写到会话变量(不知道有没有方法),收集完成前也不会给出json ![Image](https://github.com/user-attachments/assets/acba4e88-e21b-4ec9-9eec-25b69b8ed40f)
Author
Owner

@svcvit commented on GitHub (Mar 20, 2025):

The information stored is for keeping the conversation context, not for storing the output results. I have made an example for reference.

Image

Demo-tod_agent.zip

@svcvit commented on GitHub (Mar 20, 2025): The information stored is for keeping the conversation context, not for storing the output results. I have made an example for reference. ![Image](https://github.com/user-attachments/assets/2acaa6d3-c979-4424-9180-a87ac236a233) [Demo-tod_agent.zip](https://github.com/user-attachments/files/19379993/Demo-tod_agent.zip)
Author
Owner

@svcvit commented on GitHub (Mar 20, 2025):

  1. Add an agent node to the chat assistant. After selecting the "information collection" strategy, configure the model, information collection Schema, user input, and storage key-value respectively. The version of dify is 1.0.1. The following error is prompted during runtime:

Image

  1. Among them, the information collection Schema, user input, and storage key-value should refer to the official website of the plugin:https://marketplace.dify.ai/plugins/svcvit/agent
    {
    "fields": [
    {
    "name": "destination",
    "question": "请问您想去哪里旅行?",
    "required": true
    },
    {
    "name": "duration",
    "question": "您计划旅行多长时间?",
    "required": true
    },
    {
    "name": "budget",
    "question": "您的预算大约是多少?",
    "required": true
    }
    ]
    }
  2. The error reported in the dify-api log is as follows:
    [GraphRunFailedEvent] reason: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}2025-03-17 08:02:20.206 DEBUG [Thread-168 (process_request_thread)] [based_generate_task_pipeline.py:45] - error: Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}
  3. I have tried various methods but still can't solve the problem. Could you please provide some examples on how to use this component? @svcvit

The official SDK has been updated to resolve this issue. Please refer to this link: https://github.com/svcvit/dify-plugin-tod_agent/issues/1

There was also an issue with spaces in the scheme, which has been merged and will be updated later. Please refer to this link: https://github.com/langgenius/dify/pull/16297

@svcvit commented on GitHub (Mar 20, 2025): > 1. Add an agent node to the chat assistant. After selecting the "information collection" strategy, configure the model, information collection Schema, user input, and storage key-value respectively. The version of dify is 1.0.1. The following error is prompted during runtime: > > ![Image](https://github.com/user-attachments/assets/05067d32-4d63-46eb-b829-1787bee34f0c) > > 2. Among them, the information collection Schema, user input, and storage key-value should refer to the official website of the plugin:https://marketplace.dify.ai/plugins/svcvit/agent > { > "fields": [ > { > "name": "destination", > "question": "请问您想去哪里旅行?", > "required": true > }, > { > "name": "duration", > "question": "您计划旅行多长时间?", > "required": true > }, > { > "name": "budget", > "question": "您的预算大约是多少?", > "required": true > } > ] > } > 3. The error reported in the dify-api log is as follows: > [GraphRunFailedEvent] reason: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit [https://errors.pydantic.dev/2.8/v/model_type"}2025-03-17](https://errors.pydantic.dev/2.8/v/model_type%22%7D2025-03-17) 08:02:20.206 DEBUG [Thread-168 (process_request_thread)] [based_generate_task_pipeline.py:45] - error: Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for TODParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit [https://errors.pydantic.dev/2.8/v/model_type"}](https://errors.pydantic.dev/2.8/v/model_type%22%7D) > 4. I have tried various methods but still can't solve the problem. Could you please provide some examples on how to use this component? [@svcvit](https://github.com/svcvit) The official SDK has been updated to resolve this issue. Please refer to this link: https://github.com/svcvit/dify-plugin-tod_agent/issues/1 There was also an issue with spaces in the scheme, which has been merged and will be updated later. Please refer to this link: https://github.com/langgenius/dify/pull/16297
Author
Owner

@crazywoola commented on GitHub (Feb 3, 2026):

Hi @fntzhang, thanks for opening this issue.

Why this is being closed

Dify issue tracking requires English-only issue title and description for consistent collaboration.

Next steps

Please open a new issue in English and include clear details so maintainers can help efficiently.

Thanks for understanding and for your support.

@crazywoola commented on GitHub (Feb 3, 2026): Hi @fntzhang, thanks for opening this issue. ### Why this is being closed Dify issue tracking requires English-only issue title and description for consistent collaboration. ### Next steps Please open a new issue in English and include clear details so maintainers can help efficiently. Thanks for understanding and for your support.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugins#10