跳到主要内容

chat-stream

<ai-portal.chat-stream>

构件 ai-portal.chat-stream

Examples​

Basic​

Playground

Properties​

NameDescriptionTypeDefaultRequired
conversationIdstring
initialRequest

初始请求数据。仅初始设置有效。

RequestStore | null
replay

是否启用回放。仅初始设置有效。

boolean
replayDelay

设置回放时消息之间的时间间隔,单位为秒。仅初始设置有效。

number 2
supportsRecord<string, boolean>
showHumanActionsboolean
showFeedbackboolean
showFeedbackAfterFailedboolean
showFeedbackOnViewboolean
showUiSwitchboolean
hideMermaidboolean
previewUrlTemplatestring
showCasesShowCaseType[]
exampleProjectsExampleProject[]
tryItOutUrlstring
aiEmployeesAIEmployee[]
commandsCommand[]
uploadOptionsUploadOptions

Events​

NameDescriptionEvent Detail
sharevoid
terminatevoid
feedback.submitFeedbackDetail
feedback.on.viewstring
ui.switch"canvas"
detail.changeConversationDetail
split.changeboolean

Methods​

NameDescriptionParamsReturns
resumed
feedbackSubmitDone
feedbackSubmitFailed
feedbackOnViewDoneviewId: string

Type references​

RequestStore​

extends ChatPayload
NameDescriptionTypeDefaultRequired
conversationIdstring✅

ChatPayload​

extends ExtraChatPayload
NameDescriptionTypeDefaultRequired
contentstring✅

ExtraChatPayload​

NameDescriptionTypeDefaultRequired
filesUploadFileInfo[]
cmdCommandPayload | null
aiEmployeeIdstring | null
agentIdstring
spaceIdstring

UploadFileInfo​

NameDescriptionTypeDefaultRequired
fileIdstring✅

CommandPayloadServiceFlowStart​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceflow-start"✅
payload{ spaceInstanceId: string; spaceName?: string; flowInstanceId?: string; flowName?: string }✅

BaseCommandPayload​

NameDescriptionTypeDefaultRequired
typestring✅
payloadunknown

CommandPayloadServiceFlowCreate​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceflow-create"✅
payload{ spaceInstanceId: string; spaceName?: string }✅

CommandPayloadServiceFlowEdit​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceflow-edit"✅
payload{ spaceInstanceId: string; spaceName?: string; flowInstanceId: string; flowName?: string }✅

CommandPayloadGoalPlan​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"goal-plan"✅
payload{ goalId: string; goalName?: string; description?: string }✅

CommandPayloadBusinessObjectManagement​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceObject-createOrEdit"✅
payload{ spaceInstanceId: string; serviceObjectId?: string }✅

CommandPayloadBusinessInstanceManagement​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"serviceObjectInstance-createOrEdit"✅
payload{ spaceInstanceId: string; serviceObjectId: string; instanceId?: string }✅

CommandPayloadSpaceConfig​

extends BaseCommandPayload
NameDescriptionTypeDefaultRequired
type"space-config"✅
payload{ spaceInstanceId: string; ServiceObjectId?: string; InstanceId?: string }✅

LegacyCommandPayloadServiceFlowStarting​

NameDescriptionTypeDefaultRequired
type"serviceFlowStarting"✅
serviceFlowStarting{ spaceInstanceId?: string; spaceName?: string; flowInstanceId?: string; flowName?: string }✅

ShowCaseType​

NameDescriptionTypeDefaultRequired
conversationIdstring✅
titlestring✅
summarystring✅
scenariostring✅
urlstring

ExampleProject​

NameDescriptionTypeDefaultRequired
instanceIdstring✅
namestring✅
urlstring

AIEmployee​

NameDescriptionTypeDefaultRequired
employeeIdstring✅
namestring✅

Command​

NameDescriptionTypeDefaultRequired
labelstring✅
valuestring✅
groupKeystring
groupLabelstring
subCommandsCommand[]
payloadCommandPayload

UploadOptions​

NameDescriptionTypeDefaultRequired
enabledboolean
dragDisabledboolean
dragTipsstring
acceptstring
maxFilesnumber
maxSize

In bytes

number
readableAcceptstring
readableMaxSizestring

FeedbackDetail​

NameDescriptionTypeDefaultRequired
planstring[]✅
resultstring[]✅
feedbackstring✅

ConversationDetail​

NameDescriptionTypeDefaultRequired
projectIdstring

CommandPayload​

CommandPayloadServiceFlowStart | CommandPayloadServiceFlowCreate | CommandPayloadServiceFlowEdit | CommandPayloadGoalPlan | CommandPayloadBusinessObjectManagement | CommandPayloadBusinessInstanceManagement | CommandPayloadSpaceConfig | LegacyCommandPayloadServiceFlowStarting