Table of Contents

Class CodeInterpreterTool

Namespace
OpenAI.Responses
Assembly
OpenAI-DotNet.dll

A tool that runs Python code to help generate a response to a prompt.

public sealed class CodeInterpreterTool : ITool
Inheritance
CodeInterpreterTool
Implements
Inherited Members

Constructors

CodeInterpreterTool()

public CodeInterpreterTool()

CodeInterpreterTool(IEnumerable<string>)

public CodeInterpreterTool(IEnumerable<string> fileIds)

Parameters

fileIds IEnumerable<string>

CodeInterpreterTool(string)

public CodeInterpreterTool(string containerId)

Parameters

containerId string

Properties

Container

The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code.

[JsonInclude]
[JsonPropertyName("container")]
[JsonConverter(typeof(StringOrObjectConverter<CodeInterpreterContainer>))]
public object Container { get; }

Property Value

object

Type

[JsonInclude]
[JsonPropertyName("type")]
public string Type { get; }

Property Value

string

Operators

implicit operator Tool(CodeInterpreterTool)

public static implicit operator Tool(CodeInterpreterTool codeInterpreterTool)

Parameters

codeInterpreterTool CodeInterpreterTool

Returns

Tool