zhaoyingbo d64d6211c0
All checks were successful
Egg Server CI/CD / build-image (push) Successful in 50s
Egg Server CI/CD / refresh-image (push) Successful in 12s
Egg Server CI/CD / fast-deploy (push) Successful in 3s
feat(group-agent): 支持大模型语义化理解用户输入
2024-10-16 12:20:25 +00:00

167 lines
3.0 KiB
TypeScript

import { cardComponent } from "@egg/lark-msg-tool"
const groupSelector = {
config: {
update_multi: true,
},
elements: [
{
tag: "markdown",
content: "请选择要对话的群聊",
},
{
tag: "action",
actions: [
{
tag: "select_static",
placeholder: {
tag: "plain_text",
content: "请选择群名称",
},
value: {
cardGroup: "groupAgent",
cardName: "groupSelector",
},
options: "${groupOptions}",
},
],
},
{
tag: "hr",
},
cardComponent.commonNote,
],
header: cardComponent.pendingHeader,
}
const functionSelector = {
config: {
update_multi: true,
},
elements: [
{
tag: "action",
actions: [
{
tag: "select_static",
placeholder: {
tag: "plain_text",
content: "请选择功能",
},
value: {
cardGroup: "groupAgent",
cardName: "functionSelector",
},
options: "${functionOptions}",
},
],
},
{
tag: "hr",
},
cardComponent.commonNote,
],
header: cardComponent.pendingHeader,
}
const timeScopeSelector = {
config: {
update_multi: true,
},
elements: [
{
tag: "markdown",
content: "请选择时间范围",
},
{
tag: "action",
actions: [
{
tag: "button",
text: {
tag: "plain_text",
content: "过去一天",
},
type: "default",
value: {
cardGroup: "groupAgent",
cardName: "timeScopeSelector",
timeScope: "1",
},
},
{
tag: "button",
text: {
tag: "plain_text",
content: "过去三天",
},
type: "default",
value: {
cardGroup: "groupAgent",
cardName: "timeScopeSelector",
timeScope: "3",
},
},
{
tag: "button",
text: {
tag: "plain_text",
content: "过去七天",
},
type: "default",
value: {
cardGroup: "groupAgent",
cardName: "timeScopeSelector",
timeScope: "7",
},
},
],
},
{
tag: "hr",
},
cardComponent.commonNote,
],
header: cardComponent.pendingHeader,
}
const resultReport = {
config: {
update_multi: true,
},
elements: [
{
tag: "markdown",
content: "${content}",
},
{
tag: "hr",
},
{
tag: "markdown",
content: "${llmRes}",
},
{
tag: "hr",
},
cardComponent.commonNote,
],
header: cardComponent.successHeader,
}
export const functionOptionList = [
{
id: "summary-qwen-72b-instruct-int4",
name: "总结消息",
},
]
const cardMap = {
functionSelector,
timeScopeSelector,
resultReport,
groupSelector,
}
export default cardMap