Skip to content

Commit

Permalink
feat: add prompt metadata field
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Aug 19, 2024
1 parent d4e7a14 commit b193865
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}

0 comments on commit b193865

Please sign in to comment.