Skip to content

Commit 65cef22

Browse files
fix(api): fix the ToolDefParam updates
1 parent 837277d commit 65cef22

File tree

7 files changed

+165
-635
lines changed

7 files changed

+165
-635
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 93
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-41cb5d8049e6ffd933a7ad6bbbb76b2fef2e864d0d857c91799ee16e9a796883.yml
3-
openapi_spec_hash: 5e0bdf64563e020ef14b968ab724d2db
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-f26df77f0800baeaea40407776f6c1e618756037969411e29de209ce961655dd.yml
3+
openapi_spec_hash: e7c2329edc0f9f5aa1c78b6afb996e1c
44
config_hash: 0412cd40c0609550c1a47c69dd104e4f

alphaagent_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ func TestAlphaAgentNewWithOptionalParams(t *testing.T) {
3131
ClientTools: []llamastackclient.ToolDefParam{{
3232
Name: "name",
3333
Description: llamastackclient.String("description"),
34+
InputSchema: map[string]llamastackclient.ToolDefInputSchemaUnionParam{
35+
"foo": {
36+
OfBool: llamastackclient.Bool(true),
37+
},
38+
},
3439
Metadata: map[string]llamastackclient.ToolDefMetadataUnionParam{
3540
"foo": {
3641
OfBool: llamastackclient.Bool(true),
3742
},
3843
},
39-
Parameters: []llamastackclient.ToolDefParameterParam{{
40-
Description: "description",
41-
Name: "name",
42-
ParameterType: "parameter_type",
43-
Required: true,
44-
Default: llamastackclient.ToolDefParameterDefaultUnionParam{
44+
OutputSchema: map[string]llamastackclient.ToolDefOutputSchemaUnionParam{
45+
"foo": {
4546
OfBool: llamastackclient.Bool(true),
4647
},
47-
Items: map[string]interface{}{},
48-
Title: llamastackclient.String("title"),
49-
}},
48+
},
49+
ToolgroupID: llamastackclient.String("toolgroup_id"),
5050
}},
5151
EnableSessionPersistence: llamastackclient.Bool(true),
5252
InputShields: []string{"string"},

alphaagentturn.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -945,20 +945,17 @@ type TurnResponseEventPayloadStepProgressDeltaToolCallToolCallUnion struct {
945945
// This field will be present if the value is a [string] instead of an object.
946946
OfString string `json:",inline"`
947947
// This field is from variant [ToolCall].
948-
Arguments ToolCallArgumentsUnion `json:"arguments"`
948+
Arguments string `json:"arguments"`
949949
// This field is from variant [ToolCall].
950950
CallID string `json:"call_id"`
951951
// This field is from variant [ToolCall].
952952
ToolName ToolCallToolName `json:"tool_name"`
953-
// This field is from variant [ToolCall].
954-
ArgumentsJson string `json:"arguments_json"`
955-
JSON struct {
956-
OfString respjson.Field
957-
Arguments respjson.Field
958-
CallID respjson.Field
959-
ToolName respjson.Field
960-
ArgumentsJson respjson.Field
961-
raw string
953+
JSON struct {
954+
OfString respjson.Field
955+
Arguments respjson.Field
956+
CallID respjson.Field
957+
ToolName respjson.Field
958+
raw string
962959
} `json:"-"`
963960
}
964961

api.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,10 @@ Methods:
4545

4646
# Tools
4747

48-
Response Types:
49-
50-
- <a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ListToolsResponse">ListToolsResponse</a>
51-
- <a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#Tool">Tool</a>
52-
5348
Methods:
5449

55-
- <code title="get /v1/tools">client.Tools.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolListParams">ToolListParams</a>) ([]<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#Tool">Tool</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
56-
- <code title="get /v1/tools/{tool_name}">client.Tools.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, toolName <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#Tool">Tool</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
50+
- <code title="get /v1/tools">client.Tools.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolListParams">ToolListParams</a>) ([]<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolDef">ToolDef</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
51+
- <code title="get /v1/tools/{tool_name}">client.Tools.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, toolName <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go">llamastackclient</a>.<a href="https://pkg.go.dev/github.com/llamastack/llama-stack-client-go#ToolDef">ToolDef</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
5752

5853
# ToolRuntime
5954

0 commit comments

Comments
 (0)