Skip to content

Commit 89bd6aa

Browse files
authored
tracespec prompt add arg type (#14)
1. tracespec modify: prompt add arg type
1 parent 36af1c3 commit 89bd6aa

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

spec/tracespec/prompt.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@ type PromptInput struct {
1010
}
1111

1212
type PromptArgument struct {
13-
Key string `json:"key"`
14-
Value any `json:"value"`
15-
Source string `json:"source"` // from enum VPromptArgSource in span_value.go
13+
Key string `json:"key"`
14+
Value any `json:"value"`
15+
Source string `json:"source"` // from enum VPromptArgSource in span_value.go
16+
ValueType PromptArgumentValueType `json:"value_type"`
1617
}
1718

19+
type PromptArgumentValueType string
20+
21+
var (
22+
PromptArgumentValueTypeText PromptArgumentValueType = "text"
23+
PromptArgumentValueTypeModelMessage PromptArgumentValueType = "model_message"
24+
PromptArgumentValueTypeMessagePart PromptArgumentValueType = "model_message_part"
25+
)
26+
1827
// PromptOutput is the output of prompt span, for tag key: output
1928
type PromptOutput struct {
2029
Prompts []*ModelMessage `json:"prompts"`

0 commit comments

Comments
 (0)