v4.6.4-Outlink (#589)

This commit is contained in:
Archer
2023-12-12 14:42:20 +08:00
committed by GitHub
parent d2d7eac9e0
commit e18c79ca71
79 changed files with 1094 additions and 762 deletions

View File

@@ -44,6 +44,7 @@ export type getHistoriesProps = {
};
export type UpdateHistoryProps = {
appId: string;
chatId: string;
customTitle?: string;
top?: boolean;
@@ -52,6 +53,7 @@ export type UpdateHistoryProps = {
};
export type DelHistoryProps = {
appId: string;
chatId: string;
shareId?: string;
outLinkUid?: string;
@@ -64,6 +66,7 @@ export type ClearHistoriesProps = {
/* -------- chat item ---------- */
export type DeleteChatItemProps = {
appId: string;
chatId: string;
contentId?: string;
shareId?: string;

View File

@@ -18,46 +18,40 @@ A2:
`
};
export const Prompt_ExtractJson = `你可以从 "对话记录" 中提取指定信息,并返回一个 JSON 对象JSON 对象要求:
1. JSON 对象仅包含字段说明中的值。
2. 字段说明中的 required 决定 JSON 对象是否必须存在该字段。
3. 必须存在的字段,值可以为空字符串或根据提取要求来设置,不能随机生成值。
提取要求:
"""
export const Prompt_ExtractJson = `你可以从 <对话记录></对话记录> 中提取指定 JSON 信息,你仅需返回 JSON 字符串,无需回答问题。
<提取要求>
{{description}}
"""
</提取要求>
<字段说明>
1. 下面的 JSON 字符串均按照 JSON Schema 的规则描述。
2. key 代表字段名description 代表字段的描述required 代表字段是否必须。
3. 如果字段内容为空,你可以返回空字符串。
字段说明:
"""
{{json}}
"""
</字段说明>
对话记录:
"""
<对话记录>
{{text}}
"""
</对话记录>
`;
export const Prompt_CQJson = `我会给你几个问题类型,请参考额外的背景知识(可能为空)和对话内容,判断我本次的问题类型,并返回对应类型的 ID格式为 JSON 字符串:
"""
'{"type":"问题类型的 ID"}'
'{"问题类型":"类型的 ID"}'
"""
问题类型
"""
<问题类型>
{{typeList}}
"""
</问题类型>
额外背景知识:
"""
<背景知识>
{{systemPrompt}}
"""
</背景知识>
对话内容
"""
<对话内容>
{{text}}
"""
</对话内容>
`;
export const Prompt_QuestionGuide = `我不太清楚问你什么问题,请帮我生成 3 个问题引导我继续提问。问题的长度应小于20个字符按 JSON 格式返回: ["问题1", "问题2", "问题3"]`;