Skip to content

Commit c52966a

Browse files
authored
add spec signature (#33)
1 parent 959169a commit c52966a

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

spec/tracespec/model.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@ type ModelMessage struct {
4040
Name string `json:"name,omitempty"`
4141
ToolCalls []*ModelToolCall `json:"tool_calls,omitempty"`
4242
ToolCallID string `json:"tool_call_id,omitempty"`
43+
Signature string `json:"signature,omitempty"`
4344
Metadata map[string]string `json:"metadata,omitempty"`
4445
}
4546

4647
type ModelMessagePart struct {
47-
Type ModelMessagePartType `json:"type"` // Required. The type of the content.
48-
Text string `json:"text,omitempty"`
49-
ImageURL *ModelImageURL `json:"image_url,omitempty"`
50-
FileURL *ModelFileURL `json:"file_url,omitempty"`
51-
AudioURL *ModelAudioURL `json:"audio_url,omitempty"`
52-
VideoURL *ModelVideoURL `json:"video_url,omitempty"`
48+
Type ModelMessagePartType `json:"type"` // Required. The type of the content.
49+
Text string `json:"text,omitempty"`
50+
ImageURL *ModelImageURL `json:"image_url,omitempty"`
51+
FileURL *ModelFileURL `json:"file_url,omitempty"`
52+
AudioURL *ModelAudioURL `json:"audio_url,omitempty"`
53+
VideoURL *ModelVideoURL `json:"video_url,omitempty"`
54+
Signature string `json:"signature,omitempty"`
5355
}
5456

5557
type ModelMessagePartType string
@@ -91,9 +93,10 @@ type ModelVideoURL struct {
9193
URL string `json:"url,omitempty"`
9294
}
9395
type ModelToolCall struct {
94-
ID string `json:"id,omitempty"`
95-
Type string `json:"type,omitempty"` // Always be: "function"
96-
Function *ModelToolCallFunction `json:"function"`
96+
ID string `json:"id,omitempty"`
97+
Type string `json:"type,omitempty"` // Always be: "function"
98+
Function *ModelToolCallFunction `json:"function"`
99+
Signature string `json:"signature,omitempty"`
97100
}
98101

99102
type ModelToolCallFunction struct {

0 commit comments

Comments
 (0)