mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
fix: behave correctly when user is not talking Dify
This commit is contained in:
@ -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}
|
||||
|
||||
@ -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 = """You’re a helpful AI assistant. You could answer questions and output in JSON format.
|
||||
STRUCTURED_OUTPUT_PROMPT = """You’re 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:
|
||||
|
||||
Reference in New Issue
Block a user