MCPcopy Create free account
hub / github.com/cloudwego/eino-ext / parseAgentInput

Method parseAgentInput

callbacks/cozeloop/data_parser.go:791–811  ·  view source on GitHub ↗
(ctx context.Context, info *callbacks.RunInfo, input *adk.AgentCallbackInput)

Source from the content-addressed store, hash-verified

789)
790
791func (d defaultDataParser) parseAgentInput(ctx context.Context, info *callbacks.RunInfo, input *adk.AgentCallbackInput) map[string]any {
792 if info == nil || input == nil {
793 return nil
794 }
795
796 tags := make(spanTags)
797
798 if input.Input != nil {
799 tags.set(attrKeyRunMode, "run")
800 tags.set(tracespec.Input, parseAny(ctx, input.Input.Messages, false))
801 tags.set(tracespec.Stream, input.Input.EnableStreaming)
802 } else if input.ResumeInfo != nil {
803 tags.set(attrKeyRunMode, "resume")
804 tags.set(tracespec.Input, input.ResumeInfo)
805 tags.set(tracespec.Stream, input.ResumeInfo.EnableStreaming)
806 }
807
808 tags.set(attrKeyAgentName, info.Name)
809
810 return tags
811}
812
813func (d defaultDataParser) parseAgentOutput(ctx context.Context, info *callbacks.RunInfo, output *adk.AgentCallbackOutput) map[string]any {
814 if info == nil || output == nil || output.Events == nil {

Callers 1

ParseInputMethod · 0.95

Calls 2

parseAnyFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected