IsFinalResponse 判断是否为最终响应
()
| 134 | |
| 135 | // IsFinalResponse 判断是否为最终响应 |
| 136 | func (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 作用域前缀常量 |
| 152 | const ( |
no outgoing calls