mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
chore: support Zendesk widget (#25517)
This commit is contained in:
@ -173,46 +173,46 @@ export const DEFAULT_AGENT_SETTING = {
|
||||
export const DEFAULT_AGENT_PROMPT = {
|
||||
chat: `Respond to the human as helpfully and accurately as possible.
|
||||
|
||||
{{instruction}}
|
||||
{{instruction}}
|
||||
|
||||
You have access to the following tools:
|
||||
You have access to the following tools:
|
||||
|
||||
{{tools}}
|
||||
{{tools}}
|
||||
|
||||
Use a json blob to specify a tool by providing an {{TOOL_NAME_KEY}} key (tool name) and an {{ACTION_INPUT_KEY}} key (tool input).
|
||||
Valid "{{TOOL_NAME_KEY}}" values: "Final Answer" or {{tool_names}}
|
||||
Use a json blob to specify a tool by providing an {{TOOL_NAME_KEY}} key (tool name) and an {{ACTION_INPUT_KEY}} key (tool input).
|
||||
Valid "{{TOOL_NAME_KEY}}" values: "Final Answer" or {{tool_names}}
|
||||
|
||||
Provide only ONE action per $JSON_BLOB, as shown:
|
||||
Provide only ONE action per $JSON_BLOB, as shown:
|
||||
|
||||
\`\`\`
|
||||
{
|
||||
"{{TOOL_NAME_KEY}}": $TOOL_NAME,
|
||||
"{{ACTION_INPUT_KEY}}": $ACTION_INPUT
|
||||
}
|
||||
\`\`\`
|
||||
\`\`\`
|
||||
{
|
||||
"{{TOOL_NAME_KEY}}": $TOOL_NAME,
|
||||
"{{ACTION_INPUT_KEY}}": $ACTION_INPUT
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
Follow this format:
|
||||
Follow this format:
|
||||
|
||||
Question: input question to answer
|
||||
Thought: consider previous and subsequent steps
|
||||
Action:
|
||||
\`\`\`
|
||||
$JSON_BLOB
|
||||
\`\`\`
|
||||
Observation: action result
|
||||
... (repeat Thought/Action/Observation N times)
|
||||
Thought: I know what to respond
|
||||
Action:
|
||||
\`\`\`
|
||||
{
|
||||
"{{TOOL_NAME_KEY}}": "Final Answer",
|
||||
"{{ACTION_INPUT_KEY}}": "Final response to human"
|
||||
}
|
||||
\`\`\`
|
||||
Question: input question to answer
|
||||
Thought: consider previous and subsequent steps
|
||||
Action:
|
||||
\`\`\`
|
||||
$JSON_BLOB
|
||||
\`\`\`
|
||||
Observation: action result
|
||||
... (repeat Thought/Action/Observation N times)
|
||||
Thought: I know what to respond
|
||||
Action:
|
||||
\`\`\`
|
||||
{
|
||||
"{{TOOL_NAME_KEY}}": "Final Answer",
|
||||
"{{ACTION_INPUT_KEY}}": "Final response to human"
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
Begin! Reminder to ALWAYS respond with a valid json blob of a single action. Use tools if necessary. Respond directly if appropriate. Format is Action:\`\`\`$JSON_BLOB\`\`\`then Observation:.`,
|
||||
Begin! Reminder to ALWAYS respond with a valid json blob of a single action. Use tools if necessary. Respond directly if appropriate. Format is Action:\`\`\`$JSON_BLOB\`\`\`then Observation:.`,
|
||||
completion: `
|
||||
Respond to the human as helpfully and accurately as possible.
|
||||
Respond to the human as helpfully and accurately as possible.
|
||||
|
||||
{{instruction}}
|
||||
|
||||
@ -285,3 +285,12 @@ export const ENABLE_WEBSITE_WATERCRAWL = getBooleanConfig(process.env.NEXT_PUBLI
|
||||
export const VALUE_SELECTOR_DELIMITER = '@@@'
|
||||
|
||||
export const validPassword = /^(?=.*[a-zA-Z])(?=.*\d)\S{8,}$/
|
||||
|
||||
export const ZENDESK_WIDGET_KEY = getStringConfig(process.env.NEXT_PUBLIC_ZENDESK_WIDGET_KEY, DatasetAttr.NEXT_PUBLIC_ZENDESK_WIDGET_KEY, '')
|
||||
export const ZENDESK_FIELD_IDS = {
|
||||
ENVIRONMENT: getStringConfig(process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT, DatasetAttr.NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT, ''),
|
||||
VERSION: getStringConfig(process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION, DatasetAttr.NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION, ''),
|
||||
EMAIL: getStringConfig(process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL, DatasetAttr.NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL, ''),
|
||||
WORKSPACE_ID: getStringConfig(process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID, DatasetAttr.NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID, ''),
|
||||
PLAN: getStringConfig(process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN, DatasetAttr.NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN, ''),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user