Fetch the repository succeeded.
package trace
import "sync"
var _ D = (*Dialog)(nil)
type D interface {
	i()
	AppendResponse(resp *Response)
}
// Dialog 内部调用其它方接口的会话信息;失败时会有retry操作,所以 response 会有多次。
type Dialog struct {
	mux         sync.Mutex
	Request     *Request    `json:"request"`      // 请求信息
	Responses   []*Response `json:"responses"`    // 返回信息
	Success     bool        `json:"success"`      // 是否成功,true 或 false
	CostSeconds float64     `json:"cost_seconds"` // 执行时长(单位秒)
}
func (d *Dialog) i() {}
// AppendResponse 按转的追加response信息
func (d *Dialog) AppendResponse(resp *Response) {
	if resp == nil {
		return
	}
	d.mux.Lock()
	d.Responses = append(d.Responses, resp)
	d.mux.Unlock()
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
 马建仓 AI 助手
马建仓 AI 助手