MCPcopy Create free account
hub / github.com/53AI/53AIHub / SendStartStep

Method SendStartStep

api/controller/relay/relay_process_step.go:331–351  ·  view source on GitHub ↗
(StepCode string, Message string, Data map[string]interface{})

Source from the content-addressed store, hash-verified

329}
330
331func (ps *ProcessSender) SendStartStep(StepCode string, Message string, Data map[string]interface{}) error {
332 step := ProcessStep{
333 StepCode: StepCode,
334 Status: STEP_STATUS_START,
335 Message: Message,
336 Timestamp: time.Now().Unix(),
337 Data: Data,
338 }
339 if ps != nil && ps.chatRequest != nil && ps.chatRequest.EnableProcessSteps {
340 ps.recordProcessStep(step)
341 }
342 if !ps.CheckNeedSend() {
343 return nil
344 }
345
346 if err := sendProcessStep(ps.c, ps.requestId, step); err != nil {
347 logger.SysErrorf("发送处理步骤失败: %s", err.Error())
348 return err
349 }
350 return nil
351}
352
353func (ps *ProcessSender) SendEndStep(StepCode string, Message string, Data map[string]interface{}) error {
354 // ⭐ 在发送前处理 data,截取 content

Callers 6

runAgentLoopFunction · 0.80
HandleRAGFunction · 0.80
HandleKnowledgeSearchRagFunction · 0.80
handleChatRequestFunction · 0.80
RelayTextHelperFunction · 0.80

Calls 4

recordProcessStepMethod · 0.95
CheckNeedSendMethod · 0.95
sendProcessStepFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected