mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
Context extract support value type (#1620)
* perf: chat box components * perf: chatbox context * feat: extract support value type * workflow performance * update doc * feat: error response * feat: error response * oauth sort * perf: logo * fix: update laf account * perf: team permission api * update type
This commit is contained in:
@@ -24,22 +24,26 @@ A2:
|
||||
`
|
||||
};
|
||||
|
||||
export const Prompt_ExtractJson = `你可以从 <对话记录></对话记录> 中提取指定 JSON 信息,你仅需返回 JSON 字符串,无需回答问题。
|
||||
export const Prompt_ExtractJson = `你可以从 <对话记录></对话记录> 中提取指定 Json 信息,你仅需返回 Json 字符串,无需回答问题。
|
||||
<提取要求>
|
||||
{{description}}
|
||||
</提取要求>
|
||||
|
||||
<字段说明>
|
||||
1. 下面的 JSON 字符串均按照 JSON Schema 的规则描述。
|
||||
2. key 代表字段名;description 代表字段的描述;enum 是可选值,代表可选的 value。
|
||||
3. 如果没有可提取的内容,忽略该字段。
|
||||
4. 本次需提取的JSON Schema:{{json}}
|
||||
</字段说明>
|
||||
<提取规则>
|
||||
- 本次需提取的 json 字符串,需符合 JsonSchema 的规则。
|
||||
- type 代表数据类型; key 代表字段名; description 代表字段的描述; enum 是枚举值,代表可选的 value。
|
||||
- 如果没有可提取的内容,忽略该字段。
|
||||
</提取规则>
|
||||
|
||||
<JsonSchema>
|
||||
{{json}}
|
||||
</JsonSchema>
|
||||
|
||||
<对话记录>
|
||||
{{text}}
|
||||
</对话记录>
|
||||
`;
|
||||
|
||||
提取的 json 字符串:`;
|
||||
|
||||
export const Prompt_CQJson = `请帮我执行一个“问题分类”任务,将问题分类为以下几种类型之一:
|
||||
|
||||
|
@@ -31,6 +31,7 @@ export type DispatchNodeResponseType = {
|
||||
runningTime?: number;
|
||||
query?: string;
|
||||
textOutput?: string;
|
||||
error?: Record<string, any>;
|
||||
customInputs?: Record<string, any>;
|
||||
customOutputs?: Record<string, any>;
|
||||
|
||||
|
@@ -56,7 +56,7 @@ export const ContextExtractModule: FlowNodeTemplateType = {
|
||||
label: '',
|
||||
valueType: WorkflowIOValueTypeEnum.any,
|
||||
description: "由 '描述' 和 'key' 组成一个目标字段,可提取多个目标字段",
|
||||
value: [] // {desc: string; key: string; required: boolean; enum: string[]}[]
|
||||
value: [] // {valueType: string; desc: string; key: string; required: boolean; enum: string[]}[]
|
||||
}
|
||||
],
|
||||
outputs: [
|
||||
|
@@ -115,6 +115,7 @@ export type ClassifyQuestionAgentItemType = {
|
||||
key: string;
|
||||
};
|
||||
export type ContextExtractAgentItemType = {
|
||||
valueType: 'string' | 'number' | 'boolean';
|
||||
desc: string;
|
||||
key: string;
|
||||
required: boolean;
|
||||
|
@@ -14,7 +14,6 @@ export type CreateTeamProps = {
|
||||
lafAccount?: LafAccountType;
|
||||
};
|
||||
export type UpdateTeamProps = {
|
||||
teamId: string;
|
||||
name?: string;
|
||||
avatar?: string;
|
||||
teamDomain?: string;
|
||||
|
@@ -11,6 +11,7 @@ export type BillSchemaType = {
|
||||
status: 'SUCCESS' | 'REFUND' | 'NOTPAY' | 'CLOSED';
|
||||
type: `${BillTypeEnum}`;
|
||||
price: number;
|
||||
hasInvoice: boolean;
|
||||
metadata: {
|
||||
payWay: `${BillPayWayEnum}`;
|
||||
subMode?: `${SubModeEnum}`;
|
||||
@@ -20,7 +21,6 @@ export type BillSchemaType = {
|
||||
extraPoints?: number;
|
||||
invoice: boolean;
|
||||
};
|
||||
username: string;
|
||||
};
|
||||
|
||||
export type ChatNodeUsageType = {
|
||||
|
Reference in New Issue
Block a user