Class Tool.CodeInterpreter
-
- All Implemented Interfaces:
public final class Tool.CodeInterpreter
A tool that runs Python code to help generate a response to a prompt.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
Tool.CodeInterpreter.Builder
A builder for CodeInterpreter.
public final class
Tool.CodeInterpreter.Container
The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code.
-
Method Summary
Modifier and Type Method Description final Tool.CodeInterpreter.Container
container()
The code interpreter container. final JsonValue
_type()
The type of the code interpreter tool. final JsonField<Tool.CodeInterpreter.Container>
_container()
Returns the raw JSON value of container. final Map<String, JsonValue>
_additionalProperties()
final Tool.CodeInterpreter.Builder
toBuilder()
final Tool.CodeInterpreter
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static Tool.CodeInterpreter.Builder
builder()
Returns a mutable builder for constructing an instance of CodeInterpreter. -
-
Method Detail
-
container
final Tool.CodeInterpreter.Container container()
The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code.
-
_type
final JsonValue _type()
The type of the code interpreter tool. Always
code_interpreter
.Expected to always return the following:
JsonValue.from("code_interpreter")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_container
final JsonField<Tool.CodeInterpreter.Container> _container()
Returns the raw JSON value of container.
Unlike container, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final Tool.CodeInterpreter.Builder toBuilder()
-
validate
final Tool.CodeInterpreter validate()
-
builder
final static Tool.CodeInterpreter.Builder builder()
Returns a mutable builder for constructing an instance of CodeInterpreter.
The following fields are required:
.container()
-
-
-
-