From b193865f5cf49a966f07f5e48c408dc69eef689a Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Mon, 19 Aug 2024 17:14:01 -0400 Subject: [PATCH] feat: add prompt metadata field Signed-off-by: Donnie Adams --- frame.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frame.go b/frame.go index e3f37f8..d4dfd26 100644 --- a/frame.go +++ b/frame.go @@ -104,16 +104,18 @@ type InputContext struct { } type PromptFrame struct { - ID string `json:"id,omitempty"` - Type EventType `json:"type,omitempty"` - Time time.Time `json:"time,omitempty"` - Message string `json:"message,omitempty"` - Fields []string `json:"fields,omitempty"` - Sensitive bool `json:"sensitive,omitempty"` + ID string `json:"id,omitempty"` + Type EventType `json:"type,omitempty"` + Time time.Time `json:"time,omitempty"` + Message string `json:"message,omitempty"` + Fields []string `json:"fields,omitempty"` + Sensitive bool `json:"sensitive,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` } func (p *PromptFrame) String() string { return fmt.Sprintf(`Message: %s Fields: %v -Sensitive: %v`, p.Message, p.Fields, p.Sensitive) +Sensitive: %v`, p.Message, p.Fields, p.Sensitive, + ) }