MCPcopy Create free account
hub / github.com/astercloud/aster / IsFinalResponse

Method IsFinalResponse

pkg/session/session.go:136–149  ·  view source on GitHub ↗

IsFinalResponse 判断是否为最终响应

()

Source from the content-addressed store, hash-verified

134
135// IsFinalResponse 判断是否为最终响应
136func (e *Event) IsFinalResponse() bool {
137 if e.Actions.SkipSummarization || len(e.LongRunningToolIDs) > 0 {
138 return true
139 }
140
141 // 检查是否有工具调用
142 if e.Content.Role == types.RoleAssistant {
143 if len(e.Content.ToolCalls) > 0 {
144 return false
145 }
146 }
147
148 return true
149}
150
151// State 作用域前缀常量
152const (

Calls

no outgoing calls