@@ -47,8 +47,8 @@ public data class MessageCreation(
47
47
public data class ToolCallStepDetails (
48
48
/* *
49
49
* An array of tool calls the run step was involved in.
50
- * These can be associated with one of three types of tools:
51
- * [ToolCallStep.CodeInterpreter], [ToolCallStep.RetrievalTool], or [ToolCallStep.FunctionTool ].
50
+ * These can be associated with one of four types of tools:
51
+ * [ToolCallStep.CodeInterpreter], [ToolCallStep.RetrievalTool], [ToolCallStep.FunctionTool], or [ToolCallStep.FileSearchTool ].
52
52
*/
53
53
@SerialName(" tool_calls" ) public val toolCalls : List <ToolCallStep >? = null ,
54
54
) : RunStepDetails
@@ -98,6 +98,20 @@ public sealed interface ToolCallStep {
98
98
*/
99
99
@SerialName(" function" ) public val function : FunctionToolCallStep ,
100
100
) : ToolCallStep
101
+
102
+ @BetaOpenAI
103
+ @Serializable
104
+ @SerialName(" file_search" )
105
+ public data class FileSearchTool (
106
+ /* *
107
+ * The ID of the tool call object.
108
+ */
109
+ @SerialName(" id" ) public val id : ToolCallStepId ,
110
+ /* *
111
+ * The options and results of the file search.
112
+ */
113
+ @SerialName(" file_search" ) public val fileSearch : FileSearchToolCallStep ,
114
+ ) : ToolCallStep
101
115
}
102
116
103
117
@BetaOpenAI
@@ -119,6 +133,53 @@ public data class FunctionToolCallStep(
119
133
@SerialName(" output" ) public val output : String? = null ,
120
134
)
121
135
136
+ @BetaOpenAI
137
+ @Serializable
138
+ public data class FileSearchToolCallStep (
139
+ /* *
140
+ * The configured options for ranking.
141
+ */
142
+ @SerialName(" ranking_options" ) public val rankingOptions : FileSearchToolCallRankingOptions ,
143
+
144
+ /* *
145
+ * The returned results of the file search, ordered by score.
146
+ */
147
+ @SerialName(" results" ) public val results : List <FileSearchToolCallResult >,
148
+ )
149
+
150
+ @BetaOpenAI
151
+ @Serializable
152
+ public data class FileSearchToolCallRankingOptions (
153
+ /* *
154
+ * The configured ranker.
155
+ */
156
+ @SerialName(" ranker" ) public val ranker : String ,
157
+
158
+ /* *
159
+ * The configured score threshold.
160
+ */
161
+ @SerialName(" score_threshold" ) public val scoreThreshold : Double ,
162
+ )
163
+
164
+ @BetaOpenAI
165
+ @Serializable
166
+ public data class FileSearchToolCallResult (
167
+ /* *
168
+ * The ID of the file object.
169
+ */
170
+ @SerialName(" file_id" ) public val fileId : FileId ,
171
+
172
+ /* *
173
+ * The original filename of the file object.
174
+ */
175
+ @SerialName(" file_name" ) public val fileName : String ,
176
+
177
+ /* *
178
+ * The score given to the provided result.
179
+ */
180
+ @SerialName(" score" ) public val score : Double ,
181
+ )
182
+
122
183
@BetaOpenAI
123
184
@Serializable
124
185
public data class CodeInterpreterToolCall (
0 commit comments