Skip to content

Parameter of type app-selector not working properly #439

@yzddmr6

Description

@yzddmr6

Self Checks

To make sure we get to you in time, please check the following :)

  • 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."

Versions

  1. dify-plugin-daemon Version 0.2.0
  2. dify-api Version 1.8.0

Describe the bug

The reason is that I developed a plug-in that needs to call the app on dify. I hope to be able to directly check the app instead of manually filling in the appid.

Then I found it seems that in Tool type plugins, parameter of type app-selector not working properly

To Reproduce

Create a Tool type plugin by dify

and the configuration parameters are as follows

parameters:
  - name: app_id
    type: app-selector
    required: true
    label:
      en_US: App ID
      zh_Hans: APP ID
      pt_BR: App ID
    human_description:
      en_US: The app ID of the chatflow to call, can be obtained from the URL of the Chatflow page in Dify
      zh_Hans: 需要调用的Chatflow的APP ID,可以从Dify的Chatflow页面URL中获取
      pt_BR: The app ID of the chatflow to call, can be obtained from the URL of the Chatflow page in Dify
    llm_description: The app ID of the chatflow to call, can be obtained from the URL of the Chatflow page in Dify
    form: llm
...

Or you can directly replace the code in the following link from string to app-selector:

https://github.com/yzddmr6/chatflow_invoker/blob/35209ee21755983b4efef2e4b24f3e4707d58fa6/tools/local_chatflow_invoker.yaml#L16

There are two questions:

  1. I get an error when calling the node.

  2. How do I get the selected app parameters in the plugin? I looked up the documentation and found that only Endpoint plugins support getting the selected result from settings, but Tool plugins don't have this input parameter.

Expected behavior
No Error and I can get the parameter correctly

Screenshots

Image Image Image Image

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions