Class ToolCall
public sealed class ToolCall : IToolCall
- Inheritance
-
ToolCall
- Implements
- Inherited Members
Constructors
ToolCall()
public ToolCall()
ToolCall(string, string, string)
public ToolCall(string callId, string name, string arguments = null)
Parameters
Properties
Arguments
[JsonIgnore]
public JsonNode Arguments { get; }
Property Value
CallId
[JsonIgnore]
public string CallId { get; }
Property Value
CodeInterpreter
The Code Interpreter tool call definition.
[JsonInclude]
[JsonPropertyName("code_interpreter")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public CodeInterpreter CodeInterpreter { get; }
Property Value
FileSearch
The File Search tool call definition.
[JsonInclude]
[JsonPropertyName("file_search")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public IReadOnlyDictionary<string, object> FileSearch { get; }
Property Value
Remarks
For now, this is always going to be an empty object.
FunctionCall
The definition of the function that was called.
[JsonInclude]
[JsonPropertyName("function")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FunctionCall FunctionCall { get; }
Property Value
Id
The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the Submit tool outputs to run endpoint.
[JsonInclude]
[JsonPropertyName("id")]
public string Id { get; }
Property Value
Index
[JsonInclude]
[JsonPropertyName("index")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int? Index { get; }
Property Value
- int?
IsFunction
[JsonIgnore]
public bool IsFunction { get; }
Property Value
Name
[JsonIgnore]
public string Name { get; }
Property Value
Type
The type of tool call the output is required for.
[JsonInclude]
[JsonPropertyName("type")]
public string Type { get; }
Property Value
Methods
AppendFrom(ToolCall)
public void AppendFrom(ToolCall other)
Parameters
other
ToolCall
InvokeFunction()
public string InvokeFunction()
Returns
InvokeFunctionAsync(CancellationToken)
public Task<string> InvokeFunctionAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
Returns
InvokeFunctionAsync<T>(CancellationToken)
public Task<T> InvokeFunctionAsync<T>(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
Returns
- Task<T>
Type Parameters
T
InvokeFunction<T>()
public T InvokeFunction<T>()
Returns
- T
Type Parameters
T