11// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
33import * as Shared from './shared' ;
4+ import * as InferenceAPI from './inference' ;
5+ import * as ToolRuntimeAPI from './tool-runtime/tool-runtime' ;
46
57/**
68 * Configuration for an agent.
@@ -16,7 +18,7 @@ export interface AgentConfig {
1618 */
1719 model : string ;
1820
19- client_tools ?: Array < AgentConfig . ClientTool > ;
21+ client_tools ?: Array < ToolRuntimeAPI . ToolDef > ;
2022
2123 /**
2224 * Optional flag indicating whether session data has to be persisted
@@ -65,63 +67,6 @@ export interface AgentConfig {
6567}
6668
6769export 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-
12570 /**
12671 * Configuration for tool use.
12772 */
@@ -167,34 +112,7 @@ export interface BatchCompletion {
167112 /**
168113 * List of completion responses, one for each input in the batch
169114 */
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 > ;
198116}
199117
200118/**
@@ -209,7 +127,7 @@ export interface ChatCompletionResponse {
209127 /**
210128 * Optional log probabilities for generated tokens
211129 */
212- logprobs ?: Array < SharedTokenLogProbs > ;
130+ logprobs ?: Array < InferenceAPI . TokenLogProbs > ;
213131
214132 /**
215133 * (Optional) List of metrics associated with the API response
@@ -978,16 +896,6 @@ export interface ScoringResult {
978896 score_rows : Array < { [ key : string ] : boolean | number | string | Array < unknown > | unknown | null } > ;
979897}
980898
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-
991899/**
992900 * A system message providing instructions or context to the model.
993901 */
0 commit comments