Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions pkg/sdkserver/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ func (r *runInfo) process(e event) map[string]any {
if e.Content != "" {
call.Input = e.Content
}
if e.ToolResults > 0 {
call.ToolResults = e.ToolResults
}

case runner.EventTypeCallSubCalls:
call.setSubCalls(e.ToolSubCalls)
Expand All @@ -185,6 +188,8 @@ func (r *runInfo) process(e event) map[string]any {
call.setOutput(e.Content)

case runner.EventTypeChat:
call.Usage = e.Usage
call.ChatResponseCached = e.ChatResponseCached
if e.ChatRequest != nil {
call.LLMRequest = e.ChatRequest
}
Expand All @@ -210,14 +215,16 @@ func (r *runInfo) processStdout(cs runner.ChatResponse) {
type call struct {
engine.CallContext `json:",inline"`

Type runner.EventType `json:"type"`
Start time.Time `json:"start"`
End time.Time `json:"end"`
Input string `json:"input"`
Output []output `json:"output"`
Usage types.Usage `json:"usage"`
LLMRequest any `json:"llmRequest"`
LLMResponse any `json:"llmResponse"`
Type runner.EventType `json:"type"`
Start time.Time `json:"start"`
End time.Time `json:"end"`
Input string `json:"input"`
Output []output `json:"output"`
Usage types.Usage `json:"usage"`
ChatResponseCached bool `json:"chatResponseCached"`
ToolResults int `json:"toolResults"`
LLMRequest any `json:"llmRequest"`
LLMResponse any `json:"llmResponse"`
}

func (c *call) setSubCalls(subCalls map[string]engine.Call) {
Expand Down