fix: behave correctly when user is not talking Dify

This commit is contained in:
Stream
2026-01-27 00:33:32 +08:00
parent bf12445960
commit 6b439b1699
2 changed files with 3 additions and 1 deletions

View File

@ -654,6 +654,7 @@ class LLMGenerator:
return f"""You are a code generator for Dify workflow automation.
Generate {language} code to extract/transform available variables for the target parameter.
If user is not talking about the code node, provide the existing data or blank data for user, following the schema.
## Target Parameter
{parameter_block}

View File

@ -304,9 +304,10 @@ Your task is to convert simple user descriptions into properly formatted JSON Sc
Now, generate a JSON Schema based on my description
""" # noqa: E501
STRUCTURED_OUTPUT_PROMPT = """Youre a helpful AI assistant. You could answer questions and output in JSON format.
STRUCTURED_OUTPUT_PROMPT = """Youre an AI that accepts any input but only output in JSON. You must always output in JSON format.
constraints:
- You must output in JSON format.
- You mustn't output in plain text.
- Do not output boolean value, use string type instead.
- Do not output integer or float value, use number type instead.
eg: