File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,8 @@ type ToolCall struct {
187187type FunctionCall struct {
188188 Name string `json:"name,omitempty"`
189189 // call function with arguments in JSON format
190- Arguments string `json:"arguments,omitempty"`
190+ Arguments string `json:"arguments,omitempty"`
191+ Output * string `json:"output,omitempty"`
191192}
192193
193194type ChatCompletionResponseFormatType string
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ func TestRun(t *testing.T) {
2222 order := "desc"
2323 after := "asst_abc122"
2424 before := "asst_abc124"
25+ functionCallOutput := "test"
2526
2627 client , server , teardown := setupOpenAITestServer ()
2728 defer teardown ()
@@ -52,6 +53,18 @@ func TestRun(t *testing.T) {
5253 Object : "run" ,
5354 CreatedAt : 1234567890 ,
5455 Status : openai .RunStepStatusCompleted ,
56+ StepDetails : openai.StepDetails {
57+ Type : openai .RunStepTypeToolCalls ,
58+ ToolCalls : []openai.ToolCall {
59+ {
60+ Function : openai.FunctionCall {
61+ Name : "test" ,
62+ Arguments : "{}" ,
63+ Output : & functionCallOutput ,
64+ },
65+ },
66+ },
67+ },
5568 },
5669 },
5770 })
You can’t perform that action at this time.
0 commit comments