Skip to content

Commit ba1ebab

Browse files
authored
feat: improve AssistantGenText definition (#577)
1 parent 0844586 commit ba1ebab

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

schema/agentic_message.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ type UserInputFile struct {
166166
type AssistantGenText struct {
167167
Text string
168168

169-
OpenAIAnnotations []*openai.TextAnnotation
170-
ClaudeCitations []*claude.TextCitation
169+
OpenAIExtensions *openai.OutputText
170+
ClaudeExtensions *claude.TextBlock
171+
Extensions any
171172

172173
// Extra stores additional information.
173174
Extra map[string]any
File renamed without changes.

schema/claude/citation.go renamed to schema/claude/content_block.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
package claude
1818

19+
type TextBlock struct {
20+
Citations []*TextCitation `json:"citations"`
21+
}
22+
1923
type TextCitation struct {
2024
Type TextCitationType `json:"type"`
2125

File renamed without changes.
File renamed without changes.

schema/openai/annotation.go renamed to schema/openai/content_block.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
package openai
1818

19+
type OutputText struct {
20+
ItemID string `json:"item_id"`
21+
Annotations []*TextAnnotation `json:"annotations"`
22+
}
23+
1924
type TextAnnotation struct {
2025
Type TextAnnotationType `json:"type"`
2126

0 commit comments

Comments
 (0)