FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
30.31k stars 15.65k forks source link

[FEATURE] Support JSON Schema #1032

Closed biandayu closed 2 weeks ago

biandayu commented 11 months ago

When an application calls Flowise through the API, it hopes that the returned result is a fixed-format, accurate Json result. To do this, we need to make Json Schema a part of the prompt, just as the TypeChat project does. Currently, Flowise's prompt template already uses a single { } to represent variables, which conflicts with Json Schema, and Format Prompt Values is not enough to express complex Json formats, such as when the value is an object or an enum. Can I use {{ }} to represent variables instead?

biandayu commented 11 months ago

It would be even better if there was a Prompt Template that specifically supports JSON Schema!

https://github.com/microsoft/TypeChat

HenryHengZJ commented 11 months ago

think its also somewhat related to this issue here - https://github.com/FlowiseAI/Flowise/issues/968, for now you can encode the json