xinference plugin code undefined #127

Closed
opened 2026-02-16 10:18:10 -05:00 by yindo · 5 comments
Owner

Originally created by @timwenx on GitHub (Mar 26, 2025).

Self Checks

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

Dify version

1.1.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Helper undefined

✔️ Expected Behavior

He can run

Actual Behavior

No response

Originally created by @timwenx on GitHub (Mar 26, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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 this 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. ### Dify version 1.1.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="1052" alt="Image" src="https://github.com/user-attachments/assets/38b66635-5130-471c-9809-1d2b271311fe" /> Helper undefined ### ✔️ Expected Behavior He can run ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:18:10 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 26, 2025):

The issue you're encountering with the helper.dump_model(tool) being undefined in the llm.py file might be due to an incorrect import or missing definition of the helper module. According to the repository, the helper module is defined in api/libs/helper.py [1]. However, in the llm.py file, it is imported from core.model_runtime.utils:

from core.model_runtime.utils import helper

To resolve this, ensure that the helper module is correctly imported from the right path where it is defined. You might need to adjust the import statement in llm.py to match the actual location of the helper module. If the module is indeed located in api/libs/helper.py, you should update the import path accordingly.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 26, 2025): <!-- Answer --> The issue you're encountering with the `helper.dump_model(tool)` being undefined in the `llm.py` file might be due to an incorrect import or missing definition of the `helper` module. According to the repository, the `helper` module is defined in `api/libs/helper.py` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/libs/helper.py)</sup>. However, in the `llm.py` file, it is imported from `core.model_runtime.utils`: ```python from core.model_runtime.utils import helper ``` To resolve this, ensure that the `helper` module is correctly imported from the right path where it is defined. You might need to adjust the import statement in `llm.py` to match the actual location of the `helper` module. If the module is indeed located in `api/libs/helper.py`, you should update the import path accordingly. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/e7fb3165-d1da-4b39-9cf0-aa51de3ad2c6?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/e7fb3165-d1da-4b39-9cf0-aa51de3ad2c6?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/e7fb3165-d1da-4b39-9cf0-aa51de3ad2c6?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/e7fb3165-d1da-4b39-9cf0-aa51de3ad2c6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e7fb3165-d1da-4b39-9cf0-aa51de3ad2c6?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/e7fb3165-d1da-4b39-9cf0-aa51de3ad2c6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e7fb3165-d1da-4b39-9cf0-aa51de3ad2c6?feedback_type=other)</sup>
Author
Owner

@timwenx commented on GitHub (Mar 26, 2025):

            {"type": "function", "function": helper.dump_model(tool)}
@timwenx commented on GitHub (Mar 26, 2025): {"type": "function", "function": helper.dump_model(tool)}
Author
Owner

@timwenx commented on GitHub (Mar 26, 2025):

@crazywoola After I added the code, this error appeared: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"AttributeError","message":"'NoneType' object has no attribute 'model_properties'"}

Image
@timwenx commented on GitHub (Mar 26, 2025): @crazywoola After I added the code, this error appeared: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"AttributeError","message":"'NoneType' object has no attribute 'model_properties'"} <img width="1477" alt="Image" src="https://github.com/user-attachments/assets/1f30c862-e641-4e6e-a716-d1026d5eaadf" />
Author
Owner

@hxujal commented on GitHub (Apr 15, 2025):

请问这个问题解决了吗

@hxujal commented on GitHub (Apr 15, 2025): 请问这个问题解决了吗
Author
Owner

@dosubot[bot] commented on GitHub (Aug 19, 2025):

Hi, @wenxinji. I'm Dosu (https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that the xinference plugin code is undefined in Dify v1.1.2 on a self-hosted Docker setup, causing a "Helper undefined" error.
  • A contributor suggested the problem might be due to an incorrect import path for the helper module in llm.py.
  • After applying the suggested fix, you encountered a new error involving a NoneType object missing 'model_properties'.
  • Another user asked if the issue has been resolved, but no further updates or solutions have been provided.

What's Next:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If I do not hear back within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 19, 2025): Hi, @wenxinji. I'm Dosu (https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that the xinference plugin code is undefined in Dify v1.1.2 on a self-hosted Docker setup, causing a "Helper undefined" error. - A contributor suggested the problem might be due to an incorrect import path for the helper module in llm.py. - After applying the suggested fix, you encountered a new error involving a NoneType object missing 'model_properties'. - Another user asked if the issue has been resolved, but no further updates or solutions have been provided. **What's Next:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - If I do not hear back within 5 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#127