OpenAI API

File search tool call ranking options

object

The ranking options for the file search.

rankerstringrequired

The ranker used for the file search.

Allowed values:default_2024_08_21

score_thresholdnumberrequired

The score threshold for the file search. All values must be a floating point number between 0 and 1.

>= 0<= 1

Example

File search tool call result

object

A result instance of the file search.

file_idstringrequired

The ID of the file that result was found in.

file_namestringrequired

The name of the file that result was found in.

scorenumberrequired

The score of the result. All values must be a floating point number between 0 and 1.

>= 0<= 1

contentarray[object]

The content of the result that was found. The content is only included if requested via the include query parameter.

Show Child Parameters
Example

Function tool call

object
idstringrequired

The ID of the tool call object.

typestringrequired

The type of tool call. This is always going to be function for this type of tool call.

Allowed values:function

functionobjectrequired

The definition of the function that was called.

Show Child Parameters
Example

Tool calls

object

Details of the tool call.

typestringrequired

Always tool_calls.

Allowed values:tool_calls

tool_callsOne Of
arrayrequired

An array of tool calls the run step was involved in. These can be associated with one of three types of tools: code_interpreter, file_search, or function.

Code Interpreter tool callobject

Details of the Code Interpreter tool call the run step was involved in.

Show Child Parameters
Example

Run steps

object

Represents a step in execution of a run.

idstringrequired

The identifier of the run step, which can be referenced in API endpoints.

objectstringrequired

The object type, which is always thread.run.step.

Allowed values:thread.run.step

created_atintegerrequired

The Unix timestamp (in seconds) for when the run step was created.

assistant_idstringrequired

The ID of the assistant associated with the run step.

thread_idstringrequired

The ID of the thread that was run.

run_idstringrequired

The ID of the run that this run step is a part of.

typestringrequired

The type of run step, which can be either message_creation or tool_calls.

Allowed values:message_creationtool_calls

statusstringrequired

The status of the run step, which can be either in_progress, cancelled, failed, completed, or expired.

Allowed values:in_progresscancelledfailedcompletedexpired

step_detailsOne Of
objectrequired

The details of the run step.

Message creationobject

Details of the message creation by the run step.

Show Child Parameters
last_errorobjectrequired

The last error associated with this run step. Will be null if there are no errors.

Show Child Parameters
expired_atintegerrequired

The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.

cancelled_atintegerrequired

The Unix timestamp (in seconds) for when the run step was cancelled.

failed_atintegerrequired

The Unix timestamp (in seconds) for when the run step failed.

completed_atintegerrequired

The Unix timestamp (in seconds) for when the run step completed.

metadataobjectrequired

Set of 16 key-value pairs that can be attached to an object. This can be
useful for storing additional information about the object in a structured
format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings
with a maximum length of 512 characters.

usageobjectrequired

Usage statistics related to the run step. This value will be null while the run step’s status is in_progress.

Show Child Parameters
Example