MCPcopy Index your code
hub / github.com/docker/docker-agent / AddStopWithUsage

Method AddStopWithUsage

pkg/runtime/runtime_test.go:170–179  ·  view source on GitHub ↗
(input, output int64)

Source from the content-addressed store, hash-verified

168}
169
170func (b *streamBuilder) AddStopWithUsage(input, output int64) *streamBuilder {
171 b.responses = append(b.responses, chat.MessageStreamResponse{
172 Choices: []chat.MessageStreamChoice{{
173 Index: 0,
174 FinishReason: chat.FinishReasonStop,
175 }},
176 Usage: &chat.Usage{InputTokens: input, OutputTokens: output},
177 })
178 return b
179}
180
181func (b *streamBuilder) AddToolCallStopWithUsage(input, output int64) *streamBuilder {
182 b.responses = append(b.responses, chat.MessageStreamResponse{

Calls

no outgoing calls

Tested by

no test coverage detected