Skip to content

Commit 14a861d

Browse files
authored
Merge pull request #58 from thedadams/add-prompt-metadata
feat: add prompt metadata field
2 parents d4e7a14 + b193865 commit 14a861d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

frame.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,18 @@ type InputContext struct {
104104
}
105105

106106
type PromptFrame struct {
107-
ID string `json:"id,omitempty"`
108-
Type EventType `json:"type,omitempty"`
109-
Time time.Time `json:"time,omitempty"`
110-
Message string `json:"message,omitempty"`
111-
Fields []string `json:"fields,omitempty"`
112-
Sensitive bool `json:"sensitive,omitempty"`
107+
ID string `json:"id,omitempty"`
108+
Type EventType `json:"type,omitempty"`
109+
Time time.Time `json:"time,omitempty"`
110+
Message string `json:"message,omitempty"`
111+
Fields []string `json:"fields,omitempty"`
112+
Sensitive bool `json:"sensitive,omitempty"`
113+
Metadata map[string]string `json:"metadata,omitempty"`
113114
}
114115

115116
func (p *PromptFrame) String() string {
116117
return fmt.Sprintf(`Message: %s
117118
Fields: %v
118-
Sensitive: %v`, p.Message, p.Fields, p.Sensitive)
119+
Sensitive: %v`, p.Message, p.Fields, p.Sensitive,
120+
)
119121
}

0 commit comments

Comments
 (0)