IsFinalState 检查是否为最终状态
()
| 233 | |
| 234 | // IsFinalState 检查是否为最终状态 |
| 235 | func (t *Task) IsFinalState() bool { |
| 236 | return t.Status.State == TaskStateCompleted || |
| 237 | t.Status.State == TaskStateFailed || |
| 238 | t.Status.State == TaskStateCanceled |
| 239 | } |
| 240 | |
| 241 | // NewTextMessage 创建文本消息 |
| 242 | func NewTextMessage(messageID, role, text string) Message { |
no outgoing calls
no test coverage detected