langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
49.45k stars 7.07k forks source link

"BOOL" type is not supported #9856

Open Jalen-Zhong opened 3 hours ago

Jalen-Zhong commented 3 hours ago

Self Checks

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Thanks for you nice works! I got a issuse about input type: I define myself's tools with Schema like:

        content:
          application/json:
            schema:
              type: object
              properties:
                fs:
                  type: integer
                  description: Sample rate of the audio file
                wav:
                  type: array
                  items:
                    type: number
                  description: Audio samples as a list of numbers
                language:
                  type: string
                  description: Language type of the speech
                show_emo:
                  type: boolean
                  description: Whether to display emotion information
                show_event:
                  type: boolean
                  description: Whether to display event information

When I use this self-define tool in my workflow. I found input type of the dify given is not support bool type.

2. Additional context or comments

How can I define bool type as input? or Could you consider this issuse?

3. Can you help us with this feature?

crazywoola commented 3 hours ago

https://github.com/langgenius/dify/blob/e61752bd3a5b48e2c4b390d78cf7d384d2b8a988/api/core/tools/entities/tool_entities.py#L140-L147

This one?

Jalen-Zhong commented 2 hours ago

https://github.com/langgenius/dify/blob/e61752bd3a5b48e2c4b390d78cf7d384d2b8a988/api/core/tools/entities/tool_entities.py#L140-L147

This one?

Thanks for your source code, but may I ask the task is be planning or done? Becourse I find Version: 0.10.1 is not support. image image