1
1
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
3
3
import * as Shared from './shared' ;
4
+ import * as InferenceAPI from './inference' ;
5
+ import * as ToolRuntimeAPI from './tool-runtime/tool-runtime' ;
4
6
5
7
/**
6
8
* Configuration for an agent.
@@ -16,7 +18,7 @@ export interface AgentConfig {
16
18
*/
17
19
model : string ;
18
20
19
- client_tools ?: Array < AgentConfig . ClientTool > ;
21
+ client_tools ?: Array < ToolRuntimeAPI . ToolDef > ;
20
22
21
23
/**
22
24
* Optional flag indicating whether session data has to be persisted
@@ -65,63 +67,6 @@ export interface AgentConfig {
65
67
}
66
68
67
69
export namespace AgentConfig {
68
- /**
69
- * Tool definition used in runtime contexts.
70
- */
71
- export interface ClientTool {
72
- /**
73
- * Name of the tool
74
- */
75
- name : string ;
76
-
77
- /**
78
- * (Optional) Human-readable description of what the tool does
79
- */
80
- description ?: string ;
81
-
82
- /**
83
- * (Optional) Additional metadata about the tool
84
- */
85
- metadata ?: { [ key : string ] : boolean | number | string | Array < unknown > | unknown | null } ;
86
-
87
- /**
88
- * (Optional) List of parameters this tool accepts
89
- */
90
- parameters ?: Array < ClientTool . Parameter > ;
91
- }
92
-
93
- export namespace ClientTool {
94
- /**
95
- * Parameter definition for a tool.
96
- */
97
- export interface Parameter {
98
- /**
99
- * Human-readable description of what the parameter does
100
- */
101
- description : string ;
102
-
103
- /**
104
- * Name of the parameter
105
- */
106
- name : string ;
107
-
108
- /**
109
- * Type of the parameter (e.g., string, integer)
110
- */
111
- parameter_type : string ;
112
-
113
- /**
114
- * Whether this parameter is required for tool invocation
115
- */
116
- required : boolean ;
117
-
118
- /**
119
- * (Optional) Default value for the parameter if not provided
120
- */
121
- default ?: boolean | number | string | Array < unknown > | unknown | null ;
122
- }
123
- }
124
-
125
70
/**
126
71
* Configuration for tool use.
127
72
*/
@@ -167,34 +112,7 @@ export interface BatchCompletion {
167
112
/**
168
113
* List of completion responses, one for each input in the batch
169
114
*/
170
- batch : Array < BatchCompletion . Batch > ;
171
- }
172
-
173
- export namespace BatchCompletion {
174
- /**
175
- * Response from a completion request.
176
- */
177
- export interface Batch {
178
- /**
179
- * The generated completion text
180
- */
181
- content : string ;
182
-
183
- /**
184
- * Reason why generation stopped
185
- */
186
- stop_reason : 'end_of_turn' | 'end_of_message' | 'out_of_tokens' ;
187
-
188
- /**
189
- * Optional log probabilities for generated tokens
190
- */
191
- logprobs ?: Array < Shared . SharedTokenLogProbs > ;
192
-
193
- /**
194
- * (Optional) List of metrics associated with the API response
195
- */
196
- metrics ?: Array < Shared . Metric > ;
197
- }
115
+ batch : Array < InferenceAPI . CompletionResponse > ;
198
116
}
199
117
200
118
/**
@@ -209,7 +127,7 @@ export interface ChatCompletionResponse {
209
127
/**
210
128
* Optional log probabilities for generated tokens
211
129
*/
212
- logprobs ?: Array < SharedTokenLogProbs > ;
130
+ logprobs ?: Array < InferenceAPI . TokenLogProbs > ;
213
131
214
132
/**
215
133
* (Optional) List of metrics associated with the API response
@@ -978,16 +896,6 @@ export interface ScoringResult {
978
896
score_rows : Array < { [ key : string ] : boolean | number | string | Array < unknown > | unknown | null } > ;
979
897
}
980
898
981
- /**
982
- * Log probabilities for generated tokens.
983
- */
984
- export interface SharedTokenLogProbs {
985
- /**
986
- * Dictionary mapping tokens to their log probabilities
987
- */
988
- logprobs_by_token : { [ key : string ] : number } ;
989
- }
990
-
991
899
/**
992
900
* A system message providing instructions or context to the model.
993
901
*/
0 commit comments