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
21 changes: 12 additions & 9 deletions spec/tracespec/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ type ModelMessage struct {
Name string `json:"name,omitempty"`
ToolCalls []*ModelToolCall `json:"tool_calls,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
Signature string `json:"signature,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}

type ModelMessagePart struct {
Type ModelMessagePartType `json:"type"` // Required. The type of the content.
Text string `json:"text,omitempty"`
ImageURL *ModelImageURL `json:"image_url,omitempty"`
FileURL *ModelFileURL `json:"file_url,omitempty"`
AudioURL *ModelAudioURL `json:"audio_url,omitempty"`
VideoURL *ModelVideoURL `json:"video_url,omitempty"`
Type ModelMessagePartType `json:"type"` // Required. The type of the content.
Text string `json:"text,omitempty"`
ImageURL *ModelImageURL `json:"image_url,omitempty"`
FileURL *ModelFileURL `json:"file_url,omitempty"`
AudioURL *ModelAudioURL `json:"audio_url,omitempty"`
VideoURL *ModelVideoURL `json:"video_url,omitempty"`
Signature string `json:"signature,omitempty"`
}

type ModelMessagePartType string
Expand Down Expand Up @@ -91,9 +93,10 @@ type ModelVideoURL struct {
URL string `json:"url,omitempty"`
}
type ModelToolCall struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"` // Always be: "function"
Function *ModelToolCallFunction `json:"function"`
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"` // Always be: "function"
Function *ModelToolCallFunction `json:"function"`
Signature string `json:"signature,omitempty"`
}

type ModelToolCallFunction struct {
Expand Down