openaiapi

package
v0.0.0-...-0a5f1a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package openaiapi contains generated OpenAI Responses API wire types.

Package openaiapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalTools

type AdditionalTools struct {
	// Id The unique ID of the additional tools item.
	Id string `json:"id"`

	// Role The role that provided the additional tools.
	Role MessageRole `json:"role"`

	// Tools The additional tool definitions made available at this item.
	Tools []Tool `json:"tools"`

	// Type The type of the item. Always `additional_tools`.
	Type AdditionalToolsType `json:"type"`
}

AdditionalTools defines model for AdditionalTools.

type AdditionalToolsItemParam

type AdditionalToolsItemParam struct {
	Id *string `json:"id,omitempty"`

	// Role The role that provided the additional tools. Only `developer` is supported.
	Role AdditionalToolsItemParamRole `json:"role"`

	// Tools A list of additional tools made available at this item.
	Tools []Tool `json:"tools"`

	// Type The item type. Always `additional_tools`.
	Type AdditionalToolsItemParamType `json:"type"`
}

AdditionalToolsItemParam defines model for AdditionalToolsItemParam.

type AdditionalToolsItemParamRole

type AdditionalToolsItemParamRole string

AdditionalToolsItemParamRole The role that provided the additional tools. Only `developer` is supported.

const (
	AdditionalToolsItemParamRoleDeveloper AdditionalToolsItemParamRole = "developer"
)

Defines values for AdditionalToolsItemParamRole.

func (AdditionalToolsItemParamRole) Valid

Valid indicates whether the value is a known member of the AdditionalToolsItemParamRole enum.

type AdditionalToolsItemParamType

type AdditionalToolsItemParamType string

AdditionalToolsItemParamType The item type. Always `additional_tools`.

const (
	AdditionalToolsItemParamTypeAdditionalTools AdditionalToolsItemParamType = "additional_tools"
)

Defines values for AdditionalToolsItemParamType.

func (AdditionalToolsItemParamType) Valid

Valid indicates whether the value is a known member of the AdditionalToolsItemParamType enum.

type AdditionalToolsType

type AdditionalToolsType string

AdditionalToolsType The type of the item. Always `additional_tools`.

const (
	AdditionalToolsTypeAdditionalTools AdditionalToolsType = "additional_tools"
)

Defines values for AdditionalToolsType.

func (AdditionalToolsType) Valid

func (e AdditionalToolsType) Valid() bool

Valid indicates whether the value is a known member of the AdditionalToolsType enum.

type Annotation

type Annotation struct {
	// contains filtered or unexported fields
}

Annotation An annotation that applies to a span of output text.

func (Annotation) AsContainerFileCitationBody

func (t Annotation) AsContainerFileCitationBody() (ContainerFileCitationBody, error)

AsContainerFileCitationBody returns the union data inside the Annotation as a ContainerFileCitationBody

func (Annotation) AsFileCitationBody

func (t Annotation) AsFileCitationBody() (FileCitationBody, error)

AsFileCitationBody returns the union data inside the Annotation as a FileCitationBody

func (Annotation) AsFilePath

func (t Annotation) AsFilePath() (FilePath, error)

AsFilePath returns the union data inside the Annotation as a FilePath

func (Annotation) AsUrlCitationBody

func (t Annotation) AsUrlCitationBody() (UrlCitationBody, error)

AsUrlCitationBody returns the union data inside the Annotation as a UrlCitationBody

func (Annotation) Discriminator

func (t Annotation) Discriminator() (string, error)

func (*Annotation) FromContainerFileCitationBody

func (t *Annotation) FromContainerFileCitationBody(v ContainerFileCitationBody) error

FromContainerFileCitationBody overwrites any union data inside the Annotation as the provided ContainerFileCitationBody

func (*Annotation) FromFileCitationBody

func (t *Annotation) FromFileCitationBody(v FileCitationBody) error

FromFileCitationBody overwrites any union data inside the Annotation as the provided FileCitationBody

func (*Annotation) FromFilePath

func (t *Annotation) FromFilePath(v FilePath) error

FromFilePath overwrites any union data inside the Annotation as the provided FilePath

func (*Annotation) FromUrlCitationBody

func (t *Annotation) FromUrlCitationBody(v UrlCitationBody) error

FromUrlCitationBody overwrites any union data inside the Annotation as the provided UrlCitationBody

func (Annotation) MarshalJSON

func (t Annotation) MarshalJSON() ([]byte, error)

func (*Annotation) MergeContainerFileCitationBody

func (t *Annotation) MergeContainerFileCitationBody(v ContainerFileCitationBody) error

MergeContainerFileCitationBody performs a merge with any union data inside the Annotation, using the provided ContainerFileCitationBody

func (*Annotation) MergeFileCitationBody

func (t *Annotation) MergeFileCitationBody(v FileCitationBody) error

MergeFileCitationBody performs a merge with any union data inside the Annotation, using the provided FileCitationBody

func (*Annotation) MergeFilePath

func (t *Annotation) MergeFilePath(v FilePath) error

MergeFilePath performs a merge with any union data inside the Annotation, using the provided FilePath

func (*Annotation) MergeUrlCitationBody

func (t *Annotation) MergeUrlCitationBody(v UrlCitationBody) error

MergeUrlCitationBody performs a merge with any union data inside the Annotation, using the provided UrlCitationBody

func (*Annotation) UnmarshalJSON

func (t *Annotation) UnmarshalJSON(b []byte) error

func (Annotation) ValueByDiscriminator

func (t Annotation) ValueByDiscriminator() (interface{}, error)

type ApplyPatchCallOutputStatus

type ApplyPatchCallOutputStatus string

ApplyPatchCallOutputStatus defines model for ApplyPatchCallOutputStatus.

const (
	ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
	ApplyPatchCallOutputStatusFailed    ApplyPatchCallOutputStatus = "failed"
)

Defines values for ApplyPatchCallOutputStatus.

func (ApplyPatchCallOutputStatus) Valid

func (e ApplyPatchCallOutputStatus) Valid() bool

Valid indicates whether the value is a known member of the ApplyPatchCallOutputStatus enum.

type ApplyPatchCallOutputStatusParam

type ApplyPatchCallOutputStatusParam string

ApplyPatchCallOutputStatusParam Outcome values reported for apply_patch tool call outputs.

const (
	ApplyPatchCallOutputStatusParamCompleted ApplyPatchCallOutputStatusParam = "completed"
	ApplyPatchCallOutputStatusParamFailed    ApplyPatchCallOutputStatusParam = "failed"
)

Defines values for ApplyPatchCallOutputStatusParam.

func (ApplyPatchCallOutputStatusParam) Valid

Valid indicates whether the value is a known member of the ApplyPatchCallOutputStatusParam enum.

type ApplyPatchCallStatus

type ApplyPatchCallStatus string

ApplyPatchCallStatus defines model for ApplyPatchCallStatus.

const (
	ApplyPatchCallStatusCompleted  ApplyPatchCallStatus = "completed"
	ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
)

Defines values for ApplyPatchCallStatus.

func (ApplyPatchCallStatus) Valid

func (e ApplyPatchCallStatus) Valid() bool

Valid indicates whether the value is a known member of the ApplyPatchCallStatus enum.

type ApplyPatchCallStatusParam

type ApplyPatchCallStatusParam string

ApplyPatchCallStatusParam Status values reported for apply_patch tool calls.

const (
	ApplyPatchCallStatusParamCompleted  ApplyPatchCallStatusParam = "completed"
	ApplyPatchCallStatusParamInProgress ApplyPatchCallStatusParam = "in_progress"
)

Defines values for ApplyPatchCallStatusParam.

func (ApplyPatchCallStatusParam) Valid

func (e ApplyPatchCallStatusParam) Valid() bool

Valid indicates whether the value is a known member of the ApplyPatchCallStatusParam enum.

type ApplyPatchCreateFileOperation

type ApplyPatchCreateFileOperation struct {
	// Diff Diff to apply.
	Diff string `json:"diff"`

	// Path Path of the file to create.
	Path string `json:"path"`

	// Type Create a new file with the provided diff.
	Type ApplyPatchCreateFileOperationType `json:"type"`
}

ApplyPatchCreateFileOperation Instruction describing how to create a file via the apply_patch tool.

type ApplyPatchCreateFileOperationParam

type ApplyPatchCreateFileOperationParam struct {
	// Diff Unified diff content to apply when creating the file.
	Diff string `json:"diff"`

	// Path Path of the file to create relative to the workspace root.
	Path string `json:"path"`

	// Type The operation type. Always `create_file`.
	Type ApplyPatchCreateFileOperationParamType `json:"type"`
}

ApplyPatchCreateFileOperationParam Instruction for creating a new file via the apply_patch tool.

type ApplyPatchCreateFileOperationParamType

type ApplyPatchCreateFileOperationParamType string

ApplyPatchCreateFileOperationParamType The operation type. Always `create_file`.

const (
	ApplyPatchCreateFileOperationParamTypeCreateFile ApplyPatchCreateFileOperationParamType = "create_file"
)

Defines values for ApplyPatchCreateFileOperationParamType.

func (ApplyPatchCreateFileOperationParamType) Valid

Valid indicates whether the value is a known member of the ApplyPatchCreateFileOperationParamType enum.

type ApplyPatchCreateFileOperationType

type ApplyPatchCreateFileOperationType string

ApplyPatchCreateFileOperationType Create a new file with the provided diff.

const (
	ApplyPatchCreateFileOperationTypeCreateFile ApplyPatchCreateFileOperationType = "create_file"
)

Defines values for ApplyPatchCreateFileOperationType.

func (ApplyPatchCreateFileOperationType) Valid

Valid indicates whether the value is a known member of the ApplyPatchCreateFileOperationType enum.

type ApplyPatchDeleteFileOperation

type ApplyPatchDeleteFileOperation struct {
	// Path Path of the file to delete.
	Path string `json:"path"`

	// Type Delete the specified file.
	Type ApplyPatchDeleteFileOperationType `json:"type"`
}

ApplyPatchDeleteFileOperation Instruction describing how to delete a file via the apply_patch tool.

type ApplyPatchDeleteFileOperationParam

type ApplyPatchDeleteFileOperationParam struct {
	// Path Path of the file to delete relative to the workspace root.
	Path string `json:"path"`

	// Type The operation type. Always `delete_file`.
	Type ApplyPatchDeleteFileOperationParamType `json:"type"`
}

ApplyPatchDeleteFileOperationParam Instruction for deleting an existing file via the apply_patch tool.

type ApplyPatchDeleteFileOperationParamType

type ApplyPatchDeleteFileOperationParamType string

ApplyPatchDeleteFileOperationParamType The operation type. Always `delete_file`.

const (
	ApplyPatchDeleteFileOperationParamTypeDeleteFile ApplyPatchDeleteFileOperationParamType = "delete_file"
)

Defines values for ApplyPatchDeleteFileOperationParamType.

func (ApplyPatchDeleteFileOperationParamType) Valid

Valid indicates whether the value is a known member of the ApplyPatchDeleteFileOperationParamType enum.

type ApplyPatchDeleteFileOperationType

type ApplyPatchDeleteFileOperationType string

ApplyPatchDeleteFileOperationType Delete the specified file.

const (
	ApplyPatchDeleteFileOperationTypeDeleteFile ApplyPatchDeleteFileOperationType = "delete_file"
)

Defines values for ApplyPatchDeleteFileOperationType.

func (ApplyPatchDeleteFileOperationType) Valid

Valid indicates whether the value is a known member of the ApplyPatchDeleteFileOperationType enum.

type ApplyPatchOperationParam

type ApplyPatchOperationParam struct {
	// contains filtered or unexported fields
}

ApplyPatchOperationParam One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.

func (ApplyPatchOperationParam) AsApplyPatchCreateFileOperationParam

func (t ApplyPatchOperationParam) AsApplyPatchCreateFileOperationParam() (ApplyPatchCreateFileOperationParam, error)

AsApplyPatchCreateFileOperationParam returns the union data inside the ApplyPatchOperationParam as a ApplyPatchCreateFileOperationParam

func (ApplyPatchOperationParam) AsApplyPatchDeleteFileOperationParam

func (t ApplyPatchOperationParam) AsApplyPatchDeleteFileOperationParam() (ApplyPatchDeleteFileOperationParam, error)

AsApplyPatchDeleteFileOperationParam returns the union data inside the ApplyPatchOperationParam as a ApplyPatchDeleteFileOperationParam

func (ApplyPatchOperationParam) AsApplyPatchUpdateFileOperationParam

func (t ApplyPatchOperationParam) AsApplyPatchUpdateFileOperationParam() (ApplyPatchUpdateFileOperationParam, error)

AsApplyPatchUpdateFileOperationParam returns the union data inside the ApplyPatchOperationParam as a ApplyPatchUpdateFileOperationParam

func (ApplyPatchOperationParam) Discriminator

func (t ApplyPatchOperationParam) Discriminator() (string, error)

func (*ApplyPatchOperationParam) FromApplyPatchCreateFileOperationParam

func (t *ApplyPatchOperationParam) FromApplyPatchCreateFileOperationParam(v ApplyPatchCreateFileOperationParam) error

FromApplyPatchCreateFileOperationParam overwrites any union data inside the ApplyPatchOperationParam as the provided ApplyPatchCreateFileOperationParam

func (*ApplyPatchOperationParam) FromApplyPatchDeleteFileOperationParam

func (t *ApplyPatchOperationParam) FromApplyPatchDeleteFileOperationParam(v ApplyPatchDeleteFileOperationParam) error

FromApplyPatchDeleteFileOperationParam overwrites any union data inside the ApplyPatchOperationParam as the provided ApplyPatchDeleteFileOperationParam

func (*ApplyPatchOperationParam) FromApplyPatchUpdateFileOperationParam

func (t *ApplyPatchOperationParam) FromApplyPatchUpdateFileOperationParam(v ApplyPatchUpdateFileOperationParam) error

FromApplyPatchUpdateFileOperationParam overwrites any union data inside the ApplyPatchOperationParam as the provided ApplyPatchUpdateFileOperationParam

func (ApplyPatchOperationParam) MarshalJSON

func (t ApplyPatchOperationParam) MarshalJSON() ([]byte, error)

func (*ApplyPatchOperationParam) MergeApplyPatchCreateFileOperationParam

func (t *ApplyPatchOperationParam) MergeApplyPatchCreateFileOperationParam(v ApplyPatchCreateFileOperationParam) error

MergeApplyPatchCreateFileOperationParam performs a merge with any union data inside the ApplyPatchOperationParam, using the provided ApplyPatchCreateFileOperationParam

func (*ApplyPatchOperationParam) MergeApplyPatchDeleteFileOperationParam

func (t *ApplyPatchOperationParam) MergeApplyPatchDeleteFileOperationParam(v ApplyPatchDeleteFileOperationParam) error

MergeApplyPatchDeleteFileOperationParam performs a merge with any union data inside the ApplyPatchOperationParam, using the provided ApplyPatchDeleteFileOperationParam

func (*ApplyPatchOperationParam) MergeApplyPatchUpdateFileOperationParam

func (t *ApplyPatchOperationParam) MergeApplyPatchUpdateFileOperationParam(v ApplyPatchUpdateFileOperationParam) error

MergeApplyPatchUpdateFileOperationParam performs a merge with any union data inside the ApplyPatchOperationParam, using the provided ApplyPatchUpdateFileOperationParam

func (*ApplyPatchOperationParam) UnmarshalJSON

func (t *ApplyPatchOperationParam) UnmarshalJSON(b []byte) error

func (ApplyPatchOperationParam) ValueByDiscriminator

func (t ApplyPatchOperationParam) ValueByDiscriminator() (interface{}, error)

type ApplyPatchToolCall

type ApplyPatchToolCall struct {
	// CallId The unique ID of the apply patch tool call generated by the model.
	CallId string          `json:"call_id"`
	Caller *ToolCallCaller `json:"caller,omitempty"`

	// CreatedBy The ID of the entity that created this tool call.
	CreatedBy *string `json:"created_by,omitempty"`

	// Id The unique ID of the apply patch tool call. Populated when this item is returned via API.
	Id string `json:"id"`

	// Operation One of the create_file, delete_file, or update_file operations applied via apply_patch.
	Operation ApplyPatchToolCall_Operation `json:"operation"`

	// Status The status of the apply patch tool call. One of `in_progress` or `completed`.
	Status ApplyPatchCallStatus `json:"status"`

	// Type The type of the item. Always `apply_patch_call`.
	Type ApplyPatchToolCallType `json:"type"`
}

ApplyPatchToolCall A tool call that applies file diffs by creating, deleting, or updating files.

type ApplyPatchToolCallItemParam

type ApplyPatchToolCallItemParam struct {
	// CallId The unique ID of the apply patch tool call generated by the model.
	CallId string               `json:"call_id"`
	Caller *ToolCallCallerParam `json:"caller,omitempty"`
	Id     *string              `json:"id,omitempty"`

	// Operation The specific create, delete, or update instruction for the apply_patch tool call.
	Operation ApplyPatchOperationParam `json:"operation"`

	// Status The status of the apply patch tool call. One of `in_progress` or `completed`.
	Status ApplyPatchCallStatusParam `json:"status"`

	// Type The type of the item. Always `apply_patch_call`.
	Type ApplyPatchToolCallItemParamType `json:"type"`
}

ApplyPatchToolCallItemParam A tool call representing a request to create, delete, or update files using diff patches.

type ApplyPatchToolCallItemParamType

type ApplyPatchToolCallItemParamType string

ApplyPatchToolCallItemParamType The type of the item. Always `apply_patch_call`.

const (
	ApplyPatchToolCallItemParamTypeApplyPatchCall ApplyPatchToolCallItemParamType = "apply_patch_call"
)

Defines values for ApplyPatchToolCallItemParamType.

func (ApplyPatchToolCallItemParamType) Valid

Valid indicates whether the value is a known member of the ApplyPatchToolCallItemParamType enum.

type ApplyPatchToolCallOutput

type ApplyPatchToolCallOutput struct {
	// CallId The unique ID of the apply patch tool call generated by the model.
	CallId string          `json:"call_id"`
	Caller *ToolCallCaller `json:"caller,omitempty"`

	// CreatedBy The ID of the entity that created this tool call output.
	CreatedBy *string `json:"created_by,omitempty"`

	// Id The unique ID of the apply patch tool call output. Populated when this item is returned via API.
	Id     string  `json:"id"`
	Output *string `json:"output,omitempty"`

	// Status The status of the apply patch tool call output. One of `completed` or `failed`.
	Status ApplyPatchCallOutputStatus `json:"status"`

	// Type The type of the item. Always `apply_patch_call_output`.
	Type ApplyPatchToolCallOutputType `json:"type"`
}

ApplyPatchToolCallOutput The output emitted by an apply patch tool call.

type ApplyPatchToolCallOutputItemParam

type ApplyPatchToolCallOutputItemParam struct {
	// CallId The unique ID of the apply patch tool call generated by the model.
	CallId string               `json:"call_id"`
	Caller *ToolCallCallerParam `json:"caller,omitempty"`
	Id     *string              `json:"id,omitempty"`
	Output *string              `json:"output,omitempty"`

	// Status The status of the apply patch tool call output. One of `completed` or `failed`.
	Status ApplyPatchCallOutputStatusParam `json:"status"`

	// Type The type of the item. Always `apply_patch_call_output`.
	Type ApplyPatchToolCallOutputItemParamType `json:"type"`
}

ApplyPatchToolCallOutputItemParam The streamed output emitted by an apply patch tool call.

type ApplyPatchToolCallOutputItemParamType

type ApplyPatchToolCallOutputItemParamType string

ApplyPatchToolCallOutputItemParamType The type of the item. Always `apply_patch_call_output`.

const (
	ApplyPatchToolCallOutputItemParamTypeApplyPatchCallOutput ApplyPatchToolCallOutputItemParamType = "apply_patch_call_output"
)

Defines values for ApplyPatchToolCallOutputItemParamType.

func (ApplyPatchToolCallOutputItemParamType) Valid

Valid indicates whether the value is a known member of the ApplyPatchToolCallOutputItemParamType enum.

type ApplyPatchToolCallOutputType

type ApplyPatchToolCallOutputType string

ApplyPatchToolCallOutputType The type of the item. Always `apply_patch_call_output`.

const (
	ApplyPatchToolCallOutputTypeApplyPatchCallOutput ApplyPatchToolCallOutputType = "apply_patch_call_output"
)

Defines values for ApplyPatchToolCallOutputType.

func (ApplyPatchToolCallOutputType) Valid

Valid indicates whether the value is a known member of the ApplyPatchToolCallOutputType enum.

type ApplyPatchToolCallType

type ApplyPatchToolCallType string

ApplyPatchToolCallType The type of the item. Always `apply_patch_call`.

const (
	ApplyPatchToolCallTypeApplyPatchCall ApplyPatchToolCallType = "apply_patch_call"
)

Defines values for ApplyPatchToolCallType.

func (ApplyPatchToolCallType) Valid

func (e ApplyPatchToolCallType) Valid() bool

Valid indicates whether the value is a known member of the ApplyPatchToolCallType enum.

type ApplyPatchToolCall_Operation

type ApplyPatchToolCall_Operation struct {
	// contains filtered or unexported fields
}

ApplyPatchToolCall_Operation One of the create_file, delete_file, or update_file operations applied via apply_patch.

func (ApplyPatchToolCall_Operation) AsApplyPatchCreateFileOperation

func (t ApplyPatchToolCall_Operation) AsApplyPatchCreateFileOperation() (ApplyPatchCreateFileOperation, error)

AsApplyPatchCreateFileOperation returns the union data inside the ApplyPatchToolCall_Operation as a ApplyPatchCreateFileOperation

func (ApplyPatchToolCall_Operation) AsApplyPatchDeleteFileOperation

func (t ApplyPatchToolCall_Operation) AsApplyPatchDeleteFileOperation() (ApplyPatchDeleteFileOperation, error)

AsApplyPatchDeleteFileOperation returns the union data inside the ApplyPatchToolCall_Operation as a ApplyPatchDeleteFileOperation

func (ApplyPatchToolCall_Operation) AsApplyPatchUpdateFileOperation

func (t ApplyPatchToolCall_Operation) AsApplyPatchUpdateFileOperation() (ApplyPatchUpdateFileOperation, error)

AsApplyPatchUpdateFileOperation returns the union data inside the ApplyPatchToolCall_Operation as a ApplyPatchUpdateFileOperation

func (ApplyPatchToolCall_Operation) Discriminator

func (t ApplyPatchToolCall_Operation) Discriminator() (string, error)

func (*ApplyPatchToolCall_Operation) FromApplyPatchCreateFileOperation

func (t *ApplyPatchToolCall_Operation) FromApplyPatchCreateFileOperation(v ApplyPatchCreateFileOperation) error

FromApplyPatchCreateFileOperation overwrites any union data inside the ApplyPatchToolCall_Operation as the provided ApplyPatchCreateFileOperation

func (*ApplyPatchToolCall_Operation) FromApplyPatchDeleteFileOperation

func (t *ApplyPatchToolCall_Operation) FromApplyPatchDeleteFileOperation(v ApplyPatchDeleteFileOperation) error

FromApplyPatchDeleteFileOperation overwrites any union data inside the ApplyPatchToolCall_Operation as the provided ApplyPatchDeleteFileOperation

func (*ApplyPatchToolCall_Operation) FromApplyPatchUpdateFileOperation

func (t *ApplyPatchToolCall_Operation) FromApplyPatchUpdateFileOperation(v ApplyPatchUpdateFileOperation) error

FromApplyPatchUpdateFileOperation overwrites any union data inside the ApplyPatchToolCall_Operation as the provided ApplyPatchUpdateFileOperation

func (ApplyPatchToolCall_Operation) MarshalJSON

func (t ApplyPatchToolCall_Operation) MarshalJSON() ([]byte, error)

func (*ApplyPatchToolCall_Operation) MergeApplyPatchCreateFileOperation

func (t *ApplyPatchToolCall_Operation) MergeApplyPatchCreateFileOperation(v ApplyPatchCreateFileOperation) error

MergeApplyPatchCreateFileOperation performs a merge with any union data inside the ApplyPatchToolCall_Operation, using the provided ApplyPatchCreateFileOperation

func (*ApplyPatchToolCall_Operation) MergeApplyPatchDeleteFileOperation

func (t *ApplyPatchToolCall_Operation) MergeApplyPatchDeleteFileOperation(v ApplyPatchDeleteFileOperation) error

MergeApplyPatchDeleteFileOperation performs a merge with any union data inside the ApplyPatchToolCall_Operation, using the provided ApplyPatchDeleteFileOperation

func (*ApplyPatchToolCall_Operation) MergeApplyPatchUpdateFileOperation

func (t *ApplyPatchToolCall_Operation) MergeApplyPatchUpdateFileOperation(v ApplyPatchUpdateFileOperation) error

MergeApplyPatchUpdateFileOperation performs a merge with any union data inside the ApplyPatchToolCall_Operation, using the provided ApplyPatchUpdateFileOperation

func (*ApplyPatchToolCall_Operation) UnmarshalJSON

func (t *ApplyPatchToolCall_Operation) UnmarshalJSON(b []byte) error

func (ApplyPatchToolCall_Operation) ValueByDiscriminator

func (t ApplyPatchToolCall_Operation) ValueByDiscriminator() (interface{}, error)

type ApplyPatchToolParam

type ApplyPatchToolParam struct {
	AllowedCallers *[]CallableToolAllowedCaller `json:"allowed_callers,omitempty"`

	// Type The type of the tool. Always `apply_patch`.
	Type ApplyPatchToolParamType `json:"type"`
}

ApplyPatchToolParam Allows the assistant to create, delete, or update files using unified diffs.

type ApplyPatchToolParamType

type ApplyPatchToolParamType string

ApplyPatchToolParamType The type of the tool. Always `apply_patch`.

const (
	ApplyPatchToolParamTypeApplyPatch ApplyPatchToolParamType = "apply_patch"
)

Defines values for ApplyPatchToolParamType.

func (ApplyPatchToolParamType) Valid

func (e ApplyPatchToolParamType) Valid() bool

Valid indicates whether the value is a known member of the ApplyPatchToolParamType enum.

type ApplyPatchUpdateFileOperation

type ApplyPatchUpdateFileOperation struct {
	// Diff Diff to apply.
	Diff string `json:"diff"`

	// Path Path of the file to update.
	Path string `json:"path"`

	// Type Update an existing file with the provided diff.
	Type ApplyPatchUpdateFileOperationType `json:"type"`
}

ApplyPatchUpdateFileOperation Instruction describing how to update a file via the apply_patch tool.

type ApplyPatchUpdateFileOperationParam

type ApplyPatchUpdateFileOperationParam struct {
	// Diff Unified diff content to apply to the existing file.
	Diff string `json:"diff"`

	// Path Path of the file to update relative to the workspace root.
	Path string `json:"path"`

	// Type The operation type. Always `update_file`.
	Type ApplyPatchUpdateFileOperationParamType `json:"type"`
}

ApplyPatchUpdateFileOperationParam Instruction for updating an existing file via the apply_patch tool.

type ApplyPatchUpdateFileOperationParamType

type ApplyPatchUpdateFileOperationParamType string

ApplyPatchUpdateFileOperationParamType The operation type. Always `update_file`.

const (
	ApplyPatchUpdateFileOperationParamTypeUpdateFile ApplyPatchUpdateFileOperationParamType = "update_file"
)

Defines values for ApplyPatchUpdateFileOperationParamType.

func (ApplyPatchUpdateFileOperationParamType) Valid

Valid indicates whether the value is a known member of the ApplyPatchUpdateFileOperationParamType enum.

type ApplyPatchUpdateFileOperationType

type ApplyPatchUpdateFileOperationType string

ApplyPatchUpdateFileOperationType Update an existing file with the provided diff.

const (
	ApplyPatchUpdateFileOperationTypeUpdateFile ApplyPatchUpdateFileOperationType = "update_file"
)

Defines values for ApplyPatchUpdateFileOperationType.

func (ApplyPatchUpdateFileOperationType) Valid

Valid indicates whether the value is a known member of the ApplyPatchUpdateFileOperationType enum.

type ApproximateLocation

type ApproximateLocation struct {
	City     *string `json:"city,omitempty"`
	Country  *string `json:"country,omitempty"`
	Region   *string `json:"region,omitempty"`
	Timezone *string `json:"timezone,omitempty"`

	// Type The type of location approximation. Always `approximate`.
	Type ApproximateLocationType `json:"type"`
}

ApproximateLocation defines model for ApproximateLocation.

type ApproximateLocationType

type ApproximateLocationType string

ApproximateLocationType The type of location approximation. Always `approximate`.

const (
	ApproximateLocationTypeApproximate ApproximateLocationType = "approximate"
)

Defines values for ApproximateLocationType.

func (ApproximateLocationType) Valid

func (e ApproximateLocationType) Valid() bool

Valid indicates whether the value is a known member of the ApproximateLocationType enum.

type AutoCodeInterpreterToolParam

type AutoCodeInterpreterToolParam struct {
	// FileIds An optional list of uploaded files to make available to your code.
	FileIds     *[]string             `json:"file_ids,omitempty"`
	MemoryLimit *ContainerMemoryLimit `json:"memory_limit,omitempty"`

	// NetworkPolicy Network access policy for the container.
	NetworkPolicy *AutoCodeInterpreterToolParam_NetworkPolicy `json:"network_policy,omitempty"`

	// Type Always `auto`.
	Type AutoCodeInterpreterToolParamType `json:"type"`
}

AutoCodeInterpreterToolParam Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

type AutoCodeInterpreterToolParamType

type AutoCodeInterpreterToolParamType string

AutoCodeInterpreterToolParamType Always `auto`.

const (
	AutoCodeInterpreterToolParamTypeAuto AutoCodeInterpreterToolParamType = "auto"
)

Defines values for AutoCodeInterpreterToolParamType.

func (AutoCodeInterpreterToolParamType) Valid

Valid indicates whether the value is a known member of the AutoCodeInterpreterToolParamType enum.

type AutoCodeInterpreterToolParam_NetworkPolicy

type AutoCodeInterpreterToolParam_NetworkPolicy struct {
	// contains filtered or unexported fields
}

AutoCodeInterpreterToolParam_NetworkPolicy Network access policy for the container.

func (AutoCodeInterpreterToolParam_NetworkPolicy) AsContainerNetworkPolicyAllowlistParam

func (t AutoCodeInterpreterToolParam_NetworkPolicy) AsContainerNetworkPolicyAllowlistParam() (ContainerNetworkPolicyAllowlistParam, error)

AsContainerNetworkPolicyAllowlistParam returns the union data inside the AutoCodeInterpreterToolParam_NetworkPolicy as a ContainerNetworkPolicyAllowlistParam

func (AutoCodeInterpreterToolParam_NetworkPolicy) AsContainerNetworkPolicyDisabledParam

func (t AutoCodeInterpreterToolParam_NetworkPolicy) AsContainerNetworkPolicyDisabledParam() (ContainerNetworkPolicyDisabledParam, error)

AsContainerNetworkPolicyDisabledParam returns the union data inside the AutoCodeInterpreterToolParam_NetworkPolicy as a ContainerNetworkPolicyDisabledParam

func (AutoCodeInterpreterToolParam_NetworkPolicy) Discriminator

func (*AutoCodeInterpreterToolParam_NetworkPolicy) FromContainerNetworkPolicyAllowlistParam

func (t *AutoCodeInterpreterToolParam_NetworkPolicy) FromContainerNetworkPolicyAllowlistParam(v ContainerNetworkPolicyAllowlistParam) error

FromContainerNetworkPolicyAllowlistParam overwrites any union data inside the AutoCodeInterpreterToolParam_NetworkPolicy as the provided ContainerNetworkPolicyAllowlistParam

func (*AutoCodeInterpreterToolParam_NetworkPolicy) FromContainerNetworkPolicyDisabledParam

func (t *AutoCodeInterpreterToolParam_NetworkPolicy) FromContainerNetworkPolicyDisabledParam(v ContainerNetworkPolicyDisabledParam) error

FromContainerNetworkPolicyDisabledParam overwrites any union data inside the AutoCodeInterpreterToolParam_NetworkPolicy as the provided ContainerNetworkPolicyDisabledParam

func (AutoCodeInterpreterToolParam_NetworkPolicy) MarshalJSON

func (*AutoCodeInterpreterToolParam_NetworkPolicy) MergeContainerNetworkPolicyAllowlistParam

func (t *AutoCodeInterpreterToolParam_NetworkPolicy) MergeContainerNetworkPolicyAllowlistParam(v ContainerNetworkPolicyAllowlistParam) error

MergeContainerNetworkPolicyAllowlistParam performs a merge with any union data inside the AutoCodeInterpreterToolParam_NetworkPolicy, using the provided ContainerNetworkPolicyAllowlistParam

func (*AutoCodeInterpreterToolParam_NetworkPolicy) MergeContainerNetworkPolicyDisabledParam

func (t *AutoCodeInterpreterToolParam_NetworkPolicy) MergeContainerNetworkPolicyDisabledParam(v ContainerNetworkPolicyDisabledParam) error

MergeContainerNetworkPolicyDisabledParam performs a merge with any union data inside the AutoCodeInterpreterToolParam_NetworkPolicy, using the provided ContainerNetworkPolicyDisabledParam

func (*AutoCodeInterpreterToolParam_NetworkPolicy) UnmarshalJSON

func (AutoCodeInterpreterToolParam_NetworkPolicy) ValueByDiscriminator

func (t AutoCodeInterpreterToolParam_NetworkPolicy) ValueByDiscriminator() (interface{}, error)

type CallableToolAllowedCaller

type CallableToolAllowedCaller string

CallableToolAllowedCaller defines model for CallableToolAllowedCaller.

const (
	CallableToolAllowedCallerDirect       CallableToolAllowedCaller = "direct"
	CallableToolAllowedCallerProgrammatic CallableToolAllowedCaller = "programmatic"
)

Defines values for CallableToolAllowedCaller.

func (CallableToolAllowedCaller) Valid

func (e CallableToolAllowedCaller) Valid() bool

Valid indicates whether the value is a known member of the CallableToolAllowedCaller enum.

type ClickButtonType

type ClickButtonType string

ClickButtonType defines model for ClickButtonType.

const (
	Back    ClickButtonType = "back"
	Forward ClickButtonType = "forward"
	Left    ClickButtonType = "left"
	Right   ClickButtonType = "right"
	Wheel   ClickButtonType = "wheel"
)

Defines values for ClickButtonType.

func (ClickButtonType) Valid

func (e ClickButtonType) Valid() bool

Valid indicates whether the value is a known member of the ClickButtonType enum.

type ClickParam

type ClickParam struct {
	// Button Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
	Button ClickButtonType `json:"button"`
	Keys   *[]string       `json:"keys,omitempty"`

	// Type Specifies the event type. For a click action, this property is always `click`.
	Type ClickParamType `json:"type"`

	// X The x-coordinate where the click occurred.
	X int `json:"x"`

	// Y The y-coordinate where the click occurred.
	Y int `json:"y"`
}

ClickParam A click action.

type ClickParamType

type ClickParamType string

ClickParamType Specifies the event type. For a click action, this property is always `click`.

const (
	Click ClickParamType = "click"
)

Defines values for ClickParamType.

func (ClickParamType) Valid

func (e ClickParamType) Valid() bool

Valid indicates whether the value is a known member of the ClickParamType enum.

type CodeInterpreterOutputImage

type CodeInterpreterOutputImage struct {
	// Type The type of the output. Always `image`.
	Type CodeInterpreterOutputImageType `json:"type"`

	// Url The URL of the image output from the code interpreter.
	Url string `json:"url"`
}

CodeInterpreterOutputImage The image output from the code interpreter.

type CodeInterpreterOutputImageType

type CodeInterpreterOutputImageType string

CodeInterpreterOutputImageType The type of the output. Always `image`.

const (
	CodeInterpreterOutputImageTypeImage CodeInterpreterOutputImageType = "image"
)

Defines values for CodeInterpreterOutputImageType.

func (CodeInterpreterOutputImageType) Valid

Valid indicates whether the value is a known member of the CodeInterpreterOutputImageType enum.

type CodeInterpreterOutputLogs

type CodeInterpreterOutputLogs struct {
	// Logs The logs output from the code interpreter.
	Logs string `json:"logs"`

	// Type The type of the output. Always `logs`.
	Type CodeInterpreterOutputLogsType `json:"type"`
}

CodeInterpreterOutputLogs The logs output from the code interpreter.

type CodeInterpreterOutputLogsType

type CodeInterpreterOutputLogsType string

CodeInterpreterOutputLogsType The type of the output. Always `logs`.

const (
	Logs CodeInterpreterOutputLogsType = "logs"
)

Defines values for CodeInterpreterOutputLogsType.

func (CodeInterpreterOutputLogsType) Valid

Valid indicates whether the value is a known member of the CodeInterpreterOutputLogsType enum.

type CodeInterpreterTool

type CodeInterpreterTool struct {
	AllowedCallers *[]CallableToolAllowedCaller `json:"allowed_callers,omitempty"`

	// Container The code interpreter container. Can be a container ID or an object that
	// specifies uploaded file IDs to make available to your code, along with an
	// optional `memory_limit` setting.
	Container CodeInterpreterTool_Container `json:"container"`

	// Type The type of the code interpreter tool. Always `code_interpreter`.
	Type CodeInterpreterToolType `json:"type"`
}

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

type CodeInterpreterToolCall

type CodeInterpreterToolCall struct {
	Code *string `json:"code"`

	// ContainerId The ID of the container used to run the code.
	ContainerId string `json:"container_id"`

	// Id The unique ID of the code interpreter tool call.
	Id      string                                  `json:"id"`
	Outputs *[]CodeInterpreterToolCall_Outputs_Item `json:"outputs"`

	// Status The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.
	Status CodeInterpreterToolCallStatus `json:"status"`

	// Type The type of the code interpreter tool call. Always `code_interpreter_call`.
	Type CodeInterpreterToolCallType `json:"type"`
}

CodeInterpreterToolCall A tool call to run code.

type CodeInterpreterToolCallStatus

type CodeInterpreterToolCallStatus string

CodeInterpreterToolCallStatus The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

const (
	CodeInterpreterToolCallStatusCompleted    CodeInterpreterToolCallStatus = "completed"
	CodeInterpreterToolCallStatusFailed       CodeInterpreterToolCallStatus = "failed"
	CodeInterpreterToolCallStatusInProgress   CodeInterpreterToolCallStatus = "in_progress"
	CodeInterpreterToolCallStatusIncomplete   CodeInterpreterToolCallStatus = "incomplete"
	CodeInterpreterToolCallStatusInterpreting CodeInterpreterToolCallStatus = "interpreting"
)

Defines values for CodeInterpreterToolCallStatus.

func (CodeInterpreterToolCallStatus) Valid

Valid indicates whether the value is a known member of the CodeInterpreterToolCallStatus enum.

type CodeInterpreterToolCallType

type CodeInterpreterToolCallType string

CodeInterpreterToolCallType The type of the code interpreter tool call. Always `code_interpreter_call`.

const (
	CodeInterpreterCall CodeInterpreterToolCallType = "code_interpreter_call"
)

Defines values for CodeInterpreterToolCallType.

func (CodeInterpreterToolCallType) Valid

Valid indicates whether the value is a known member of the CodeInterpreterToolCallType enum.

type CodeInterpreterToolCall_Outputs_Item

type CodeInterpreterToolCall_Outputs_Item struct {
	// contains filtered or unexported fields
}

CodeInterpreterToolCall_Outputs_Item defines model for CodeInterpreterToolCall.outputs.Item.

func (CodeInterpreterToolCall_Outputs_Item) AsCodeInterpreterOutputImage

func (t CodeInterpreterToolCall_Outputs_Item) AsCodeInterpreterOutputImage() (CodeInterpreterOutputImage, error)

AsCodeInterpreterOutputImage returns the union data inside the CodeInterpreterToolCall_Outputs_Item as a CodeInterpreterOutputImage

func (CodeInterpreterToolCall_Outputs_Item) AsCodeInterpreterOutputLogs

func (t CodeInterpreterToolCall_Outputs_Item) AsCodeInterpreterOutputLogs() (CodeInterpreterOutputLogs, error)

AsCodeInterpreterOutputLogs returns the union data inside the CodeInterpreterToolCall_Outputs_Item as a CodeInterpreterOutputLogs

func (CodeInterpreterToolCall_Outputs_Item) Discriminator

func (t CodeInterpreterToolCall_Outputs_Item) Discriminator() (string, error)

func (*CodeInterpreterToolCall_Outputs_Item) FromCodeInterpreterOutputImage

func (t *CodeInterpreterToolCall_Outputs_Item) FromCodeInterpreterOutputImage(v CodeInterpreterOutputImage) error

FromCodeInterpreterOutputImage overwrites any union data inside the CodeInterpreterToolCall_Outputs_Item as the provided CodeInterpreterOutputImage

func (*CodeInterpreterToolCall_Outputs_Item) FromCodeInterpreterOutputLogs

func (t *CodeInterpreterToolCall_Outputs_Item) FromCodeInterpreterOutputLogs(v CodeInterpreterOutputLogs) error

FromCodeInterpreterOutputLogs overwrites any union data inside the CodeInterpreterToolCall_Outputs_Item as the provided CodeInterpreterOutputLogs

func (CodeInterpreterToolCall_Outputs_Item) MarshalJSON

func (t CodeInterpreterToolCall_Outputs_Item) MarshalJSON() ([]byte, error)

func (*CodeInterpreterToolCall_Outputs_Item) MergeCodeInterpreterOutputImage

func (t *CodeInterpreterToolCall_Outputs_Item) MergeCodeInterpreterOutputImage(v CodeInterpreterOutputImage) error

MergeCodeInterpreterOutputImage performs a merge with any union data inside the CodeInterpreterToolCall_Outputs_Item, using the provided CodeInterpreterOutputImage

func (*CodeInterpreterToolCall_Outputs_Item) MergeCodeInterpreterOutputLogs

func (t *CodeInterpreterToolCall_Outputs_Item) MergeCodeInterpreterOutputLogs(v CodeInterpreterOutputLogs) error

MergeCodeInterpreterOutputLogs performs a merge with any union data inside the CodeInterpreterToolCall_Outputs_Item, using the provided CodeInterpreterOutputLogs

func (*CodeInterpreterToolCall_Outputs_Item) UnmarshalJSON

func (t *CodeInterpreterToolCall_Outputs_Item) UnmarshalJSON(b []byte) error

func (CodeInterpreterToolCall_Outputs_Item) ValueByDiscriminator

func (t CodeInterpreterToolCall_Outputs_Item) ValueByDiscriminator() (interface{}, error)

type CodeInterpreterToolContainer0

type CodeInterpreterToolContainer0 = string

CodeInterpreterToolContainer0 The container ID.

type CodeInterpreterToolType

type CodeInterpreterToolType string

CodeInterpreterToolType The type of the code interpreter tool. Always `code_interpreter`.

const (
	CodeInterpreterToolTypeCodeInterpreter CodeInterpreterToolType = "code_interpreter"
)

Defines values for CodeInterpreterToolType.

func (CodeInterpreterToolType) Valid

func (e CodeInterpreterToolType) Valid() bool

Valid indicates whether the value is a known member of the CodeInterpreterToolType enum.

type CodeInterpreterTool_Container

type CodeInterpreterTool_Container struct {
	// contains filtered or unexported fields
}

CodeInterpreterTool_Container The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional `memory_limit` setting.

func (CodeInterpreterTool_Container) AsAutoCodeInterpreterToolParam

func (t CodeInterpreterTool_Container) AsAutoCodeInterpreterToolParam() (AutoCodeInterpreterToolParam, error)

AsAutoCodeInterpreterToolParam returns the union data inside the CodeInterpreterTool_Container as a AutoCodeInterpreterToolParam

func (CodeInterpreterTool_Container) AsCodeInterpreterToolContainer0

func (t CodeInterpreterTool_Container) AsCodeInterpreterToolContainer0() (CodeInterpreterToolContainer0, error)

AsCodeInterpreterToolContainer0 returns the union data inside the CodeInterpreterTool_Container as a CodeInterpreterToolContainer0

func (*CodeInterpreterTool_Container) FromAutoCodeInterpreterToolParam

func (t *CodeInterpreterTool_Container) FromAutoCodeInterpreterToolParam(v AutoCodeInterpreterToolParam) error

FromAutoCodeInterpreterToolParam overwrites any union data inside the CodeInterpreterTool_Container as the provided AutoCodeInterpreterToolParam

func (*CodeInterpreterTool_Container) FromCodeInterpreterToolContainer0

func (t *CodeInterpreterTool_Container) FromCodeInterpreterToolContainer0(v CodeInterpreterToolContainer0) error

FromCodeInterpreterToolContainer0 overwrites any union data inside the CodeInterpreterTool_Container as the provided CodeInterpreterToolContainer0

func (CodeInterpreterTool_Container) MarshalJSON

func (t CodeInterpreterTool_Container) MarshalJSON() ([]byte, error)

func (*CodeInterpreterTool_Container) MergeAutoCodeInterpreterToolParam

func (t *CodeInterpreterTool_Container) MergeAutoCodeInterpreterToolParam(v AutoCodeInterpreterToolParam) error

MergeAutoCodeInterpreterToolParam performs a merge with any union data inside the CodeInterpreterTool_Container, using the provided AutoCodeInterpreterToolParam

func (*CodeInterpreterTool_Container) MergeCodeInterpreterToolContainer0

func (t *CodeInterpreterTool_Container) MergeCodeInterpreterToolContainer0(v CodeInterpreterToolContainer0) error

MergeCodeInterpreterToolContainer0 performs a merge with any union data inside the CodeInterpreterTool_Container, using the provided CodeInterpreterToolContainer0

func (*CodeInterpreterTool_Container) UnmarshalJSON

func (t *CodeInterpreterTool_Container) UnmarshalJSON(b []byte) error

type CompactionBody

type CompactionBody struct {
	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// EncryptedContent The encrypted content that was produced by compaction.
	EncryptedContent string `json:"encrypted_content"`

	// Id The unique ID of the compaction item.
	Id string `json:"id"`

	// Type The type of the item. Always `compaction`.
	Type CompactionBodyType `json:"type"`
}

CompactionBody A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).

type CompactionBodyType

type CompactionBodyType string

CompactionBodyType The type of the item. Always `compaction`.

const (
	CompactionBodyTypeCompaction CompactionBodyType = "compaction"
)

Defines values for CompactionBodyType.

func (CompactionBodyType) Valid

func (e CompactionBodyType) Valid() bool

Valid indicates whether the value is a known member of the CompactionBodyType enum.

type CompactionSummaryItemParam

type CompactionSummaryItemParam struct {
	// EncryptedContent The encrypted content of the compaction summary.
	EncryptedContent string  `json:"encrypted_content"`
	Id               *string `json:"id,omitempty"`

	// Type The type of the item. Always `compaction`.
	Type CompactionSummaryItemParamType `json:"type"`
}

CompactionSummaryItemParam A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).

type CompactionSummaryItemParamType

type CompactionSummaryItemParamType string

CompactionSummaryItemParamType The type of the item. Always `compaction`.

const (
	CompactionSummaryItemParamTypeCompaction CompactionSummaryItemParamType = "compaction"
)

Defines values for CompactionSummaryItemParamType.

func (CompactionSummaryItemParamType) Valid

Valid indicates whether the value is a known member of the CompactionSummaryItemParamType enum.

type CompactionTriggerItemParam

type CompactionTriggerItemParam struct {
	// Type The type of the item. Always `compaction_trigger`.
	Type CompactionTriggerItemParamType `json:"type"`
}

CompactionTriggerItemParam Compacts the current context. Must be the final input item.

type CompactionTriggerItemParamType

type CompactionTriggerItemParamType string

CompactionTriggerItemParamType The type of the item. Always `compaction_trigger`.

const (
	CompactionTrigger CompactionTriggerItemParamType = "compaction_trigger"
)

Defines values for CompactionTriggerItemParamType.

func (CompactionTriggerItemParamType) Valid

Valid indicates whether the value is a known member of the CompactionTriggerItemParamType enum.

type ComparisonFilter

type ComparisonFilter struct {
	// Key The key to compare against the value.
	Key string `json:"key"`

	// Type Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
	// - `eq`: equals
	// - `ne`: not equal
	// - `gt`: greater than
	// - `gte`: greater than or equal
	// - `lt`: less than
	// - `lte`: less than or equal
	// - `in`: in
	// - `nin`: not in
	Type ComparisonFilterType `json:"type"`

	// Value The value to compare against the attribute key; supports string, number, or boolean types.
	Value ComparisonFilter_Value `json:"value"`
}

ComparisonFilter A filter used to compare a specified attribute key to a given value using a defined comparison operation.

type ComparisonFilterType

type ComparisonFilterType string

ComparisonFilterType Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - `eq`: equals - `ne`: not equal - `gt`: greater than - `gte`: greater than or equal - `lt`: less than - `lte`: less than or equal - `in`: in - `nin`: not in

Defines values for ComparisonFilterType.

func (ComparisonFilterType) Valid

func (e ComparisonFilterType) Valid() bool

Valid indicates whether the value is a known member of the ComparisonFilterType enum.

type ComparisonFilterValue0

type ComparisonFilterValue0 = string

ComparisonFilterValue0 defines model for ComparisonFilter.Value.0.

type ComparisonFilterValue1

type ComparisonFilterValue1 = float32

ComparisonFilterValue1 defines model for ComparisonFilter.Value.1.

type ComparisonFilterValue2

type ComparisonFilterValue2 = bool

ComparisonFilterValue2 defines model for ComparisonFilter.Value.2.

type ComparisonFilterValue3

type ComparisonFilterValue3 = []ComparisonFilter_Value_3_Item

ComparisonFilterValue3 defines model for ComparisonFilter.Value.3.

type ComparisonFilterValue30

type ComparisonFilterValue30 = string

ComparisonFilterValue30 defines model for ComparisonFilter.Value.3.0.

type ComparisonFilterValue31

type ComparisonFilterValue31 = float32

ComparisonFilterValue31 defines model for ComparisonFilter.Value.3.1.

type ComparisonFilter_Value

type ComparisonFilter_Value struct {
	// contains filtered or unexported fields
}

ComparisonFilter_Value The value to compare against the attribute key; supports string, number, or boolean types.

func (ComparisonFilter_Value) AsComparisonFilterValue0

func (t ComparisonFilter_Value) AsComparisonFilterValue0() (ComparisonFilterValue0, error)

AsComparisonFilterValue0 returns the union data inside the ComparisonFilter_Value as a ComparisonFilterValue0

func (ComparisonFilter_Value) AsComparisonFilterValue1

func (t ComparisonFilter_Value) AsComparisonFilterValue1() (ComparisonFilterValue1, error)

AsComparisonFilterValue1 returns the union data inside the ComparisonFilter_Value as a ComparisonFilterValue1

func (ComparisonFilter_Value) AsComparisonFilterValue2

func (t ComparisonFilter_Value) AsComparisonFilterValue2() (ComparisonFilterValue2, error)

AsComparisonFilterValue2 returns the union data inside the ComparisonFilter_Value as a ComparisonFilterValue2

func (ComparisonFilter_Value) AsComparisonFilterValue3

func (t ComparisonFilter_Value) AsComparisonFilterValue3() (ComparisonFilterValue3, error)

AsComparisonFilterValue3 returns the union data inside the ComparisonFilter_Value as a ComparisonFilterValue3

func (*ComparisonFilter_Value) FromComparisonFilterValue0

func (t *ComparisonFilter_Value) FromComparisonFilterValue0(v ComparisonFilterValue0) error

FromComparisonFilterValue0 overwrites any union data inside the ComparisonFilter_Value as the provided ComparisonFilterValue0

func (*ComparisonFilter_Value) FromComparisonFilterValue1

func (t *ComparisonFilter_Value) FromComparisonFilterValue1(v ComparisonFilterValue1) error

FromComparisonFilterValue1 overwrites any union data inside the ComparisonFilter_Value as the provided ComparisonFilterValue1

func (*ComparisonFilter_Value) FromComparisonFilterValue2

func (t *ComparisonFilter_Value) FromComparisonFilterValue2(v ComparisonFilterValue2) error

FromComparisonFilterValue2 overwrites any union data inside the ComparisonFilter_Value as the provided ComparisonFilterValue2

func (*ComparisonFilter_Value) FromComparisonFilterValue3

func (t *ComparisonFilter_Value) FromComparisonFilterValue3(v ComparisonFilterValue3) error

FromComparisonFilterValue3 overwrites any union data inside the ComparisonFilter_Value as the provided ComparisonFilterValue3

func (ComparisonFilter_Value) MarshalJSON

func (t ComparisonFilter_Value) MarshalJSON() ([]byte, error)

func (*ComparisonFilter_Value) MergeComparisonFilterValue0

func (t *ComparisonFilter_Value) MergeComparisonFilterValue0(v ComparisonFilterValue0) error

MergeComparisonFilterValue0 performs a merge with any union data inside the ComparisonFilter_Value, using the provided ComparisonFilterValue0

func (*ComparisonFilter_Value) MergeComparisonFilterValue1

func (t *ComparisonFilter_Value) MergeComparisonFilterValue1(v ComparisonFilterValue1) error

MergeComparisonFilterValue1 performs a merge with any union data inside the ComparisonFilter_Value, using the provided ComparisonFilterValue1

func (*ComparisonFilter_Value) MergeComparisonFilterValue2

func (t *ComparisonFilter_Value) MergeComparisonFilterValue2(v ComparisonFilterValue2) error

MergeComparisonFilterValue2 performs a merge with any union data inside the ComparisonFilter_Value, using the provided ComparisonFilterValue2

func (*ComparisonFilter_Value) MergeComparisonFilterValue3

func (t *ComparisonFilter_Value) MergeComparisonFilterValue3(v ComparisonFilterValue3) error

MergeComparisonFilterValue3 performs a merge with any union data inside the ComparisonFilter_Value, using the provided ComparisonFilterValue3

func (*ComparisonFilter_Value) UnmarshalJSON

func (t *ComparisonFilter_Value) UnmarshalJSON(b []byte) error

type ComparisonFilter_Value_3_Item

type ComparisonFilter_Value_3_Item struct {
	// contains filtered or unexported fields
}

ComparisonFilter_Value_3_Item defines model for ComparisonFilter.Value.3.Item.

func (ComparisonFilter_Value_3_Item) AsComparisonFilterValue30

func (t ComparisonFilter_Value_3_Item) AsComparisonFilterValue30() (ComparisonFilterValue30, error)

AsComparisonFilterValue30 returns the union data inside the ComparisonFilter_Value_3_Item as a ComparisonFilterValue30

func (ComparisonFilter_Value_3_Item) AsComparisonFilterValue31

func (t ComparisonFilter_Value_3_Item) AsComparisonFilterValue31() (ComparisonFilterValue31, error)

AsComparisonFilterValue31 returns the union data inside the ComparisonFilter_Value_3_Item as a ComparisonFilterValue31

func (*ComparisonFilter_Value_3_Item) FromComparisonFilterValue30

func (t *ComparisonFilter_Value_3_Item) FromComparisonFilterValue30(v ComparisonFilterValue30) error

FromComparisonFilterValue30 overwrites any union data inside the ComparisonFilter_Value_3_Item as the provided ComparisonFilterValue30

func (*ComparisonFilter_Value_3_Item) FromComparisonFilterValue31

func (t *ComparisonFilter_Value_3_Item) FromComparisonFilterValue31(v ComparisonFilterValue31) error

FromComparisonFilterValue31 overwrites any union data inside the ComparisonFilter_Value_3_Item as the provided ComparisonFilterValue31

func (ComparisonFilter_Value_3_Item) MarshalJSON

func (t ComparisonFilter_Value_3_Item) MarshalJSON() ([]byte, error)

func (*ComparisonFilter_Value_3_Item) MergeComparisonFilterValue30

func (t *ComparisonFilter_Value_3_Item) MergeComparisonFilterValue30(v ComparisonFilterValue30) error

MergeComparisonFilterValue30 performs a merge with any union data inside the ComparisonFilter_Value_3_Item, using the provided ComparisonFilterValue30

func (*ComparisonFilter_Value_3_Item) MergeComparisonFilterValue31

func (t *ComparisonFilter_Value_3_Item) MergeComparisonFilterValue31(v ComparisonFilterValue31) error

MergeComparisonFilterValue31 performs a merge with any union data inside the ComparisonFilter_Value_3_Item, using the provided ComparisonFilterValue31

func (*ComparisonFilter_Value_3_Item) UnmarshalJSON

func (t *ComparisonFilter_Value_3_Item) UnmarshalJSON(b []byte) error

type CompoundFilter

type CompoundFilter struct {
	// Filters Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
	Filters []CompoundFilter_Filters_Item `json:"filters"`

	// Type Type of operation: `and` or `or`.
	Type CompoundFilterType `json:"type"`
}

CompoundFilter Combine multiple filters using `and` or `or`.

type CompoundFilterFilters1

type CompoundFilterFilters1 = interface{}

CompoundFilterFilters1 defines model for CompoundFilter.Filters.1.

type CompoundFilterType

type CompoundFilterType string

CompoundFilterType Type of operation: `and` or `or`.

const (
	And CompoundFilterType = "and"
	Or  CompoundFilterType = "or"
)

Defines values for CompoundFilterType.

func (CompoundFilterType) Valid

func (e CompoundFilterType) Valid() bool

Valid indicates whether the value is a known member of the CompoundFilterType enum.

type CompoundFilter_Filters_Item

type CompoundFilter_Filters_Item struct {
	// contains filtered or unexported fields
}

CompoundFilter_Filters_Item defines model for CompoundFilter.filters.Item.

func (CompoundFilter_Filters_Item) AsComparisonFilter

func (t CompoundFilter_Filters_Item) AsComparisonFilter() (ComparisonFilter, error)

AsComparisonFilter returns the union data inside the CompoundFilter_Filters_Item as a ComparisonFilter

func (CompoundFilter_Filters_Item) AsCompoundFilterFilters1

func (t CompoundFilter_Filters_Item) AsCompoundFilterFilters1() (CompoundFilterFilters1, error)

AsCompoundFilterFilters1 returns the union data inside the CompoundFilter_Filters_Item as a CompoundFilterFilters1

func (CompoundFilter_Filters_Item) Discriminator

func (t CompoundFilter_Filters_Item) Discriminator() (string, error)

func (*CompoundFilter_Filters_Item) FromComparisonFilter

func (t *CompoundFilter_Filters_Item) FromComparisonFilter(v ComparisonFilter) error

FromComparisonFilter overwrites any union data inside the CompoundFilter_Filters_Item as the provided ComparisonFilter

func (*CompoundFilter_Filters_Item) FromCompoundFilterFilters1

func (t *CompoundFilter_Filters_Item) FromCompoundFilterFilters1(v CompoundFilterFilters1) error

FromCompoundFilterFilters1 overwrites any union data inside the CompoundFilter_Filters_Item as the provided CompoundFilterFilters1

func (CompoundFilter_Filters_Item) MarshalJSON

func (t CompoundFilter_Filters_Item) MarshalJSON() ([]byte, error)

func (*CompoundFilter_Filters_Item) MergeComparisonFilter

func (t *CompoundFilter_Filters_Item) MergeComparisonFilter(v ComparisonFilter) error

MergeComparisonFilter performs a merge with any union data inside the CompoundFilter_Filters_Item, using the provided ComparisonFilter

func (*CompoundFilter_Filters_Item) MergeCompoundFilterFilters1

func (t *CompoundFilter_Filters_Item) MergeCompoundFilterFilters1(v CompoundFilterFilters1) error

MergeCompoundFilterFilters1 performs a merge with any union data inside the CompoundFilter_Filters_Item, using the provided CompoundFilterFilters1

func (*CompoundFilter_Filters_Item) UnmarshalJSON

func (t *CompoundFilter_Filters_Item) UnmarshalJSON(b []byte) error

func (CompoundFilter_Filters_Item) ValueByDiscriminator

func (t CompoundFilter_Filters_Item) ValueByDiscriminator() (interface{}, error)

type ComputerAction

type ComputerAction struct {
	// contains filtered or unexported fields
}

ComputerAction defines model for ComputerAction.

func (ComputerAction) AsClickParam

func (t ComputerAction) AsClickParam() (ClickParam, error)

AsClickParam returns the union data inside the ComputerAction as a ClickParam

func (ComputerAction) AsDoubleClickAction

func (t ComputerAction) AsDoubleClickAction() (DoubleClickAction, error)

AsDoubleClickAction returns the union data inside the ComputerAction as a DoubleClickAction

func (ComputerAction) AsDragParam

func (t ComputerAction) AsDragParam() (DragParam, error)

AsDragParam returns the union data inside the ComputerAction as a DragParam

func (ComputerAction) AsKeyPressAction

func (t ComputerAction) AsKeyPressAction() (KeyPressAction, error)

AsKeyPressAction returns the union data inside the ComputerAction as a KeyPressAction

func (ComputerAction) AsMoveParam

func (t ComputerAction) AsMoveParam() (MoveParam, error)

AsMoveParam returns the union data inside the ComputerAction as a MoveParam

func (ComputerAction) AsScreenshotParam

func (t ComputerAction) AsScreenshotParam() (ScreenshotParam, error)

AsScreenshotParam returns the union data inside the ComputerAction as a ScreenshotParam

func (ComputerAction) AsScrollParam

func (t ComputerAction) AsScrollParam() (ScrollParam, error)

AsScrollParam returns the union data inside the ComputerAction as a ScrollParam

func (ComputerAction) AsTypeParam

func (t ComputerAction) AsTypeParam() (TypeParam, error)

AsTypeParam returns the union data inside the ComputerAction as a TypeParam

func (ComputerAction) AsWaitParam

func (t ComputerAction) AsWaitParam() (WaitParam, error)

AsWaitParam returns the union data inside the ComputerAction as a WaitParam

func (ComputerAction) Discriminator

func (t ComputerAction) Discriminator() (string, error)

func (*ComputerAction) FromClickParam

func (t *ComputerAction) FromClickParam(v ClickParam) error

FromClickParam overwrites any union data inside the ComputerAction as the provided ClickParam

func (*ComputerAction) FromDoubleClickAction

func (t *ComputerAction) FromDoubleClickAction(v DoubleClickAction) error

FromDoubleClickAction overwrites any union data inside the ComputerAction as the provided DoubleClickAction

func (*ComputerAction) FromDragParam

func (t *ComputerAction) FromDragParam(v DragParam) error

FromDragParam overwrites any union data inside the ComputerAction as the provided DragParam

func (*ComputerAction) FromKeyPressAction

func (t *ComputerAction) FromKeyPressAction(v KeyPressAction) error

FromKeyPressAction overwrites any union data inside the ComputerAction as the provided KeyPressAction

func (*ComputerAction) FromMoveParam

func (t *ComputerAction) FromMoveParam(v MoveParam) error

FromMoveParam overwrites any union data inside the ComputerAction as the provided MoveParam

func (*ComputerAction) FromScreenshotParam

func (t *ComputerAction) FromScreenshotParam(v ScreenshotParam) error

FromScreenshotParam overwrites any union data inside the ComputerAction as the provided ScreenshotParam

func (*ComputerAction) FromScrollParam

func (t *ComputerAction) FromScrollParam(v ScrollParam) error

FromScrollParam overwrites any union data inside the ComputerAction as the provided ScrollParam

func (*ComputerAction) FromTypeParam

func (t *ComputerAction) FromTypeParam(v TypeParam) error

FromTypeParam overwrites any union data inside the ComputerAction as the provided TypeParam

func (*ComputerAction) FromWaitParam

func (t *ComputerAction) FromWaitParam(v WaitParam) error

FromWaitParam overwrites any union data inside the ComputerAction as the provided WaitParam

func (ComputerAction) MarshalJSON

func (t ComputerAction) MarshalJSON() ([]byte, error)

func (*ComputerAction) MergeClickParam

func (t *ComputerAction) MergeClickParam(v ClickParam) error

MergeClickParam performs a merge with any union data inside the ComputerAction, using the provided ClickParam

func (*ComputerAction) MergeDoubleClickAction

func (t *ComputerAction) MergeDoubleClickAction(v DoubleClickAction) error

MergeDoubleClickAction performs a merge with any union data inside the ComputerAction, using the provided DoubleClickAction

func (*ComputerAction) MergeDragParam

func (t *ComputerAction) MergeDragParam(v DragParam) error

MergeDragParam performs a merge with any union data inside the ComputerAction, using the provided DragParam

func (*ComputerAction) MergeKeyPressAction

func (t *ComputerAction) MergeKeyPressAction(v KeyPressAction) error

MergeKeyPressAction performs a merge with any union data inside the ComputerAction, using the provided KeyPressAction

func (*ComputerAction) MergeMoveParam

func (t *ComputerAction) MergeMoveParam(v MoveParam) error

MergeMoveParam performs a merge with any union data inside the ComputerAction, using the provided MoveParam

func (*ComputerAction) MergeScreenshotParam

func (t *ComputerAction) MergeScreenshotParam(v ScreenshotParam) error

MergeScreenshotParam performs a merge with any union data inside the ComputerAction, using the provided ScreenshotParam

func (*ComputerAction) MergeScrollParam

func (t *ComputerAction) MergeScrollParam(v ScrollParam) error

MergeScrollParam performs a merge with any union data inside the ComputerAction, using the provided ScrollParam

func (*ComputerAction) MergeTypeParam

func (t *ComputerAction) MergeTypeParam(v TypeParam) error

MergeTypeParam performs a merge with any union data inside the ComputerAction, using the provided TypeParam

func (*ComputerAction) MergeWaitParam

func (t *ComputerAction) MergeWaitParam(v WaitParam) error

MergeWaitParam performs a merge with any union data inside the ComputerAction, using the provided WaitParam

func (*ComputerAction) UnmarshalJSON

func (t *ComputerAction) UnmarshalJSON(b []byte) error

func (ComputerAction) ValueByDiscriminator

func (t ComputerAction) ValueByDiscriminator() (interface{}, error)

type ComputerActionList

type ComputerActionList = []ComputerAction

ComputerActionList Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields.

type ComputerCallOutputItemParam

type ComputerCallOutputItemParam struct {
	AcknowledgedSafetyChecks *[]ComputerCallSafetyCheckParam `json:"acknowledged_safety_checks,omitempty"`

	// CallId The ID of the computer tool call that produced the output.
	CallId string  `json:"call_id"`
	Id     *string `json:"id,omitempty"`

	// Output A computer screenshot image used with the computer use tool.
	Output ComputerScreenshotImage `json:"output"`
	Status *FunctionCallItemStatus `json:"status,omitempty"`

	// Type The type of the computer tool call output. Always `computer_call_output`.
	Type ComputerCallOutputItemParamType `json:"type"`
}

ComputerCallOutputItemParam The output of a computer tool call.

type ComputerCallOutputItemParamType

type ComputerCallOutputItemParamType string

ComputerCallOutputItemParamType The type of the computer tool call output. Always `computer_call_output`.

const (
	ComputerCallOutputItemParamTypeComputerCallOutput ComputerCallOutputItemParamType = "computer_call_output"
)

Defines values for ComputerCallOutputItemParamType.

func (ComputerCallOutputItemParamType) Valid

Valid indicates whether the value is a known member of the ComputerCallOutputItemParamType enum.

type ComputerCallOutputStatus

type ComputerCallOutputStatus string

ComputerCallOutputStatus defines model for ComputerCallOutputStatus.

const (
	ComputerCallOutputStatusCompleted  ComputerCallOutputStatus = "completed"
	ComputerCallOutputStatusFailed     ComputerCallOutputStatus = "failed"
	ComputerCallOutputStatusIncomplete ComputerCallOutputStatus = "incomplete"
)

Defines values for ComputerCallOutputStatus.

func (ComputerCallOutputStatus) Valid

func (e ComputerCallOutputStatus) Valid() bool

Valid indicates whether the value is a known member of the ComputerCallOutputStatus enum.

type ComputerCallSafetyCheckParam

type ComputerCallSafetyCheckParam struct {
	Code *string `json:"code,omitempty"`

	// Id The ID of the pending safety check.
	Id      string  `json:"id"`
	Message *string `json:"message,omitempty"`
}

ComputerCallSafetyCheckParam A pending safety check for the computer call.

type ComputerEnvironment

type ComputerEnvironment string

ComputerEnvironment defines model for ComputerEnvironment.

const (
	Browser ComputerEnvironment = "browser"
	Linux   ComputerEnvironment = "linux"
	Mac     ComputerEnvironment = "mac"
	Ubuntu  ComputerEnvironment = "ubuntu"
	Windows ComputerEnvironment = "windows"
)

Defines values for ComputerEnvironment.

func (ComputerEnvironment) Valid

func (e ComputerEnvironment) Valid() bool

Valid indicates whether the value is a known member of the ComputerEnvironment enum.

type ComputerScreenshotImage

type ComputerScreenshotImage struct {
	// FileId The identifier of an uploaded file that contains the screenshot.
	FileId *string `json:"file_id,omitempty"`

	// ImageUrl The URL of the screenshot image.
	ImageUrl *string `json:"image_url,omitempty"`

	// Type Specifies the event type. For a computer screenshot, this property is
	// always set to `computer_screenshot`.
	Type ComputerScreenshotImageType `json:"type"`
}

ComputerScreenshotImage A computer screenshot image used with the computer use tool.

type ComputerScreenshotImageType

type ComputerScreenshotImageType string

ComputerScreenshotImageType Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

const (
	ComputerScreenshot ComputerScreenshotImageType = "computer_screenshot"
)

Defines values for ComputerScreenshotImageType.

func (ComputerScreenshotImageType) Valid

Valid indicates whether the value is a known member of the ComputerScreenshotImageType enum.

type ComputerTool

type ComputerTool struct {
	// Type The type of the computer tool. Always `computer`.
	Type ComputerToolType `json:"type"`
}

ComputerTool A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

type ComputerToolCall

type ComputerToolCall struct {
	Action *ComputerAction `json:"action,omitempty"`

	// Actions Flattened batched actions for `computer_use`. Each action includes an
	// `type` discriminator and action-specific fields.
	Actions *ComputerActionList `json:"actions,omitempty"`

	// CallId An identifier used when responding to the tool call with output.
	CallId string `json:"call_id"`

	// Id The unique ID of the computer call.
	Id string `json:"id"`

	// PendingSafetyChecks The pending safety checks for the computer call.
	PendingSafetyChecks []ComputerCallSafetyCheckParam `json:"pending_safety_checks"`

	// Status The status of the item. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when items are returned via API.
	Status ComputerToolCallStatus `json:"status"`

	// Type The type of the computer call. Always `computer_call`.
	Type ComputerToolCallType `json:"type"`
}

ComputerToolCall A tool call to a computer use tool. See the [computer use guide](/docs/guides/tools-computer-use) for more information.

type ComputerToolCallOutput

type ComputerToolCallOutput struct {
	// AcknowledgedSafetyChecks The safety checks reported by the API that have been acknowledged by the
	// developer.
	AcknowledgedSafetyChecks *[]ComputerCallSafetyCheckParam `json:"acknowledged_safety_checks,omitempty"`

	// CallId The ID of the computer tool call that produced the output.
	CallId string `json:"call_id"`

	// Id The ID of the computer tool call output.
	Id *string `json:"id,omitempty"`

	// Output A computer screenshot image used with the computer use tool.
	Output ComputerScreenshotImage `json:"output"`

	// Status The status of the message input. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when input items are returned via API.
	Status *ComputerToolCallOutputStatus `json:"status,omitempty"`

	// Type The type of the computer tool call output. Always `computer_call_output`.
	Type ComputerToolCallOutputType `json:"type"`
}

ComputerToolCallOutput The output of a computer tool call.

type ComputerToolCallOutputResource

type ComputerToolCallOutputResource struct {
	// AcknowledgedSafetyChecks The safety checks reported by the API that have been acknowledged by the
	// developer.
	AcknowledgedSafetyChecks *[]ComputerCallSafetyCheckParam `json:"acknowledged_safety_checks,omitempty"`

	// CallId The ID of the computer tool call that produced the output.
	CallId string `json:"call_id"`

	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// Id The unique ID of the computer call tool output.
	Id string `json:"id"`

	// Output A computer screenshot image used with the computer use tool.
	Output ComputerScreenshotImage `json:"output"`

	// Status The status of the message input. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when input items are returned via API.
	Status ComputerCallOutputStatus `json:"status"`

	// Type The type of the computer tool call output. Always `computer_call_output`.
	Type ComputerToolCallOutputResourceType `json:"type"`
}

ComputerToolCallOutputResource defines model for ComputerToolCallOutputResource.

type ComputerToolCallOutputResourceType

type ComputerToolCallOutputResourceType string

ComputerToolCallOutputResourceType The type of the computer tool call output. Always `computer_call_output`.

const (
	ComputerToolCallOutputResourceTypeComputerCallOutput ComputerToolCallOutputResourceType = "computer_call_output"
)

Defines values for ComputerToolCallOutputResourceType.

func (ComputerToolCallOutputResourceType) Valid

Valid indicates whether the value is a known member of the ComputerToolCallOutputResourceType enum.

type ComputerToolCallOutputStatus

type ComputerToolCallOutputStatus string

ComputerToolCallOutputStatus The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

const (
	ComputerToolCallOutputStatusCompleted  ComputerToolCallOutputStatus = "completed"
	ComputerToolCallOutputStatusInProgress ComputerToolCallOutputStatus = "in_progress"
	ComputerToolCallOutputStatusIncomplete ComputerToolCallOutputStatus = "incomplete"
)

Defines values for ComputerToolCallOutputStatus.

func (ComputerToolCallOutputStatus) Valid

Valid indicates whether the value is a known member of the ComputerToolCallOutputStatus enum.

type ComputerToolCallOutputType

type ComputerToolCallOutputType string

ComputerToolCallOutputType The type of the computer tool call output. Always `computer_call_output`.

const (
	ComputerToolCallOutputTypeComputerCallOutput ComputerToolCallOutputType = "computer_call_output"
)

Defines values for ComputerToolCallOutputType.

func (ComputerToolCallOutputType) Valid

func (e ComputerToolCallOutputType) Valid() bool

Valid indicates whether the value is a known member of the ComputerToolCallOutputType enum.

type ComputerToolCallStatus

type ComputerToolCallStatus string

ComputerToolCallStatus The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

const (
	ComputerToolCallStatusCompleted  ComputerToolCallStatus = "completed"
	ComputerToolCallStatusInProgress ComputerToolCallStatus = "in_progress"
	ComputerToolCallStatusIncomplete ComputerToolCallStatus = "incomplete"
)

Defines values for ComputerToolCallStatus.

func (ComputerToolCallStatus) Valid

func (e ComputerToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the ComputerToolCallStatus enum.

type ComputerToolCallType

type ComputerToolCallType string

ComputerToolCallType The type of the computer call. Always `computer_call`.

const (
	ComputerCall ComputerToolCallType = "computer_call"
)

Defines values for ComputerToolCallType.

func (ComputerToolCallType) Valid

func (e ComputerToolCallType) Valid() bool

Valid indicates whether the value is a known member of the ComputerToolCallType enum.

type ComputerToolType

type ComputerToolType string

ComputerToolType The type of the computer tool. Always `computer`.

const (
	ComputerToolTypeComputer ComputerToolType = "computer"
)

Defines values for ComputerToolType.

func (ComputerToolType) Valid

func (e ComputerToolType) Valid() bool

Valid indicates whether the value is a known member of the ComputerToolType enum.

type ComputerUsePreviewTool

type ComputerUsePreviewTool struct {
	// DisplayHeight The height of the computer display.
	DisplayHeight int `json:"display_height"`

	// DisplayWidth The width of the computer display.
	DisplayWidth int `json:"display_width"`

	// Environment The type of computer environment to control.
	Environment ComputerEnvironment `json:"environment"`

	// Type The type of the computer use tool. Always `computer_use_preview`.
	Type ComputerUsePreviewToolType `json:"type"`
}

ComputerUsePreviewTool A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

type ComputerUsePreviewToolType

type ComputerUsePreviewToolType string

ComputerUsePreviewToolType The type of the computer use tool. Always `computer_use_preview`.

const (
	ComputerUsePreviewToolTypeComputerUsePreview ComputerUsePreviewToolType = "computer_use_preview"
)

Defines values for ComputerUsePreviewToolType.

func (ComputerUsePreviewToolType) Valid

func (e ComputerUsePreviewToolType) Valid() bool

Valid indicates whether the value is a known member of the ComputerUsePreviewToolType enum.

type ContainerAutoParam

type ContainerAutoParam struct {
	// FileIds An optional list of uploaded files to make available to your code.
	FileIds     *[]string             `json:"file_ids,omitempty"`
	MemoryLimit *ContainerMemoryLimit `json:"memory_limit,omitempty"`

	// NetworkPolicy Network access policy for the container.
	NetworkPolicy *ContainerAutoParam_NetworkPolicy `json:"network_policy,omitempty"`

	// Skills An optional list of skills referenced by id or inline data.
	Skills *[]ContainerAutoParam_Skills_Item `json:"skills,omitempty"`

	// Type Automatically creates a container for this request
	Type ContainerAutoParamType `json:"type"`
}

ContainerAutoParam defines model for ContainerAutoParam.

type ContainerAutoParamType

type ContainerAutoParamType string

ContainerAutoParamType Automatically creates a container for this request

const (
	ContainerAuto ContainerAutoParamType = "container_auto"
)

Defines values for ContainerAutoParamType.

func (ContainerAutoParamType) Valid

func (e ContainerAutoParamType) Valid() bool

Valid indicates whether the value is a known member of the ContainerAutoParamType enum.

type ContainerAutoParam_NetworkPolicy

type ContainerAutoParam_NetworkPolicy struct {
	// contains filtered or unexported fields
}

ContainerAutoParam_NetworkPolicy Network access policy for the container.

func (ContainerAutoParam_NetworkPolicy) AsContainerNetworkPolicyAllowlistParam

func (t ContainerAutoParam_NetworkPolicy) AsContainerNetworkPolicyAllowlistParam() (ContainerNetworkPolicyAllowlistParam, error)

AsContainerNetworkPolicyAllowlistParam returns the union data inside the ContainerAutoParam_NetworkPolicy as a ContainerNetworkPolicyAllowlistParam

func (ContainerAutoParam_NetworkPolicy) AsContainerNetworkPolicyDisabledParam

func (t ContainerAutoParam_NetworkPolicy) AsContainerNetworkPolicyDisabledParam() (ContainerNetworkPolicyDisabledParam, error)

AsContainerNetworkPolicyDisabledParam returns the union data inside the ContainerAutoParam_NetworkPolicy as a ContainerNetworkPolicyDisabledParam

func (ContainerAutoParam_NetworkPolicy) Discriminator

func (t ContainerAutoParam_NetworkPolicy) Discriminator() (string, error)

func (*ContainerAutoParam_NetworkPolicy) FromContainerNetworkPolicyAllowlistParam

func (t *ContainerAutoParam_NetworkPolicy) FromContainerNetworkPolicyAllowlistParam(v ContainerNetworkPolicyAllowlistParam) error

FromContainerNetworkPolicyAllowlistParam overwrites any union data inside the ContainerAutoParam_NetworkPolicy as the provided ContainerNetworkPolicyAllowlistParam

func (*ContainerAutoParam_NetworkPolicy) FromContainerNetworkPolicyDisabledParam

func (t *ContainerAutoParam_NetworkPolicy) FromContainerNetworkPolicyDisabledParam(v ContainerNetworkPolicyDisabledParam) error

FromContainerNetworkPolicyDisabledParam overwrites any union data inside the ContainerAutoParam_NetworkPolicy as the provided ContainerNetworkPolicyDisabledParam

func (ContainerAutoParam_NetworkPolicy) MarshalJSON

func (t ContainerAutoParam_NetworkPolicy) MarshalJSON() ([]byte, error)

func (*ContainerAutoParam_NetworkPolicy) MergeContainerNetworkPolicyAllowlistParam

func (t *ContainerAutoParam_NetworkPolicy) MergeContainerNetworkPolicyAllowlistParam(v ContainerNetworkPolicyAllowlistParam) error

MergeContainerNetworkPolicyAllowlistParam performs a merge with any union data inside the ContainerAutoParam_NetworkPolicy, using the provided ContainerNetworkPolicyAllowlistParam

func (*ContainerAutoParam_NetworkPolicy) MergeContainerNetworkPolicyDisabledParam

func (t *ContainerAutoParam_NetworkPolicy) MergeContainerNetworkPolicyDisabledParam(v ContainerNetworkPolicyDisabledParam) error

MergeContainerNetworkPolicyDisabledParam performs a merge with any union data inside the ContainerAutoParam_NetworkPolicy, using the provided ContainerNetworkPolicyDisabledParam

func (*ContainerAutoParam_NetworkPolicy) UnmarshalJSON

func (t *ContainerAutoParam_NetworkPolicy) UnmarshalJSON(b []byte) error

func (ContainerAutoParam_NetworkPolicy) ValueByDiscriminator

func (t ContainerAutoParam_NetworkPolicy) ValueByDiscriminator() (interface{}, error)

type ContainerAutoParam_Skills_Item

type ContainerAutoParam_Skills_Item struct {
	// contains filtered or unexported fields
}

ContainerAutoParam_Skills_Item defines model for ContainerAutoParam.skills.Item.

func (ContainerAutoParam_Skills_Item) AsInlineSkillParam

func (t ContainerAutoParam_Skills_Item) AsInlineSkillParam() (InlineSkillParam, error)

AsInlineSkillParam returns the union data inside the ContainerAutoParam_Skills_Item as a InlineSkillParam

func (ContainerAutoParam_Skills_Item) AsSkillReferenceParam

func (t ContainerAutoParam_Skills_Item) AsSkillReferenceParam() (SkillReferenceParam, error)

AsSkillReferenceParam returns the union data inside the ContainerAutoParam_Skills_Item as a SkillReferenceParam

func (ContainerAutoParam_Skills_Item) Discriminator

func (t ContainerAutoParam_Skills_Item) Discriminator() (string, error)

func (*ContainerAutoParam_Skills_Item) FromInlineSkillParam

func (t *ContainerAutoParam_Skills_Item) FromInlineSkillParam(v InlineSkillParam) error

FromInlineSkillParam overwrites any union data inside the ContainerAutoParam_Skills_Item as the provided InlineSkillParam

func (*ContainerAutoParam_Skills_Item) FromSkillReferenceParam

func (t *ContainerAutoParam_Skills_Item) FromSkillReferenceParam(v SkillReferenceParam) error

FromSkillReferenceParam overwrites any union data inside the ContainerAutoParam_Skills_Item as the provided SkillReferenceParam

func (ContainerAutoParam_Skills_Item) MarshalJSON

func (t ContainerAutoParam_Skills_Item) MarshalJSON() ([]byte, error)

func (*ContainerAutoParam_Skills_Item) MergeInlineSkillParam

func (t *ContainerAutoParam_Skills_Item) MergeInlineSkillParam(v InlineSkillParam) error

MergeInlineSkillParam performs a merge with any union data inside the ContainerAutoParam_Skills_Item, using the provided InlineSkillParam

func (*ContainerAutoParam_Skills_Item) MergeSkillReferenceParam

func (t *ContainerAutoParam_Skills_Item) MergeSkillReferenceParam(v SkillReferenceParam) error

MergeSkillReferenceParam performs a merge with any union data inside the ContainerAutoParam_Skills_Item, using the provided SkillReferenceParam

func (*ContainerAutoParam_Skills_Item) UnmarshalJSON

func (t *ContainerAutoParam_Skills_Item) UnmarshalJSON(b []byte) error

func (ContainerAutoParam_Skills_Item) ValueByDiscriminator

func (t ContainerAutoParam_Skills_Item) ValueByDiscriminator() (interface{}, error)

type ContainerFileCitationBody

type ContainerFileCitationBody struct {
	// ContainerId The ID of the container file.
	ContainerId string `json:"container_id"`

	// EndIndex The index of the last character of the container file citation in the message.
	EndIndex int `json:"end_index"`

	// FileId The ID of the file.
	FileId string `json:"file_id"`

	// Filename The filename of the container file cited.
	Filename string `json:"filename"`

	// StartIndex The index of the first character of the container file citation in the message.
	StartIndex int `json:"start_index"`

	// Type The type of the container file citation. Always `container_file_citation`.
	Type ContainerFileCitationBodyType `json:"type"`
}

ContainerFileCitationBody A citation for a container file used to generate a model response.

type ContainerFileCitationBodyType

type ContainerFileCitationBodyType string

ContainerFileCitationBodyType The type of the container file citation. Always `container_file_citation`.

const (
	ContainerFileCitation ContainerFileCitationBodyType = "container_file_citation"
)

Defines values for ContainerFileCitationBodyType.

func (ContainerFileCitationBodyType) Valid

Valid indicates whether the value is a known member of the ContainerFileCitationBodyType enum.

type ContainerMemoryLimit

type ContainerMemoryLimit string

ContainerMemoryLimit defines model for ContainerMemoryLimit.

const (
	N16g ContainerMemoryLimit = "16g"
	N1g  ContainerMemoryLimit = "1g"
	N4g  ContainerMemoryLimit = "4g"
	N64g ContainerMemoryLimit = "64g"
)

Defines values for ContainerMemoryLimit.

func (ContainerMemoryLimit) Valid

func (e ContainerMemoryLimit) Valid() bool

Valid indicates whether the value is a known member of the ContainerMemoryLimit enum.

type ContainerNetworkPolicyAllowlistParam

type ContainerNetworkPolicyAllowlistParam struct {
	// AllowedDomains A list of allowed domains when type is `allowlist`.
	AllowedDomains []string `json:"allowed_domains"`

	// DomainSecrets Optional domain-scoped secrets for allowlisted domains.
	DomainSecrets *[]ContainerNetworkPolicyDomainSecretParam `json:"domain_secrets,omitempty"`

	// Type Allow outbound network access only to specified domains. Always `allowlist`.
	Type ContainerNetworkPolicyAllowlistParamType `json:"type"`
}

ContainerNetworkPolicyAllowlistParam defines model for ContainerNetworkPolicyAllowlistParam.

type ContainerNetworkPolicyAllowlistParamType

type ContainerNetworkPolicyAllowlistParamType string

ContainerNetworkPolicyAllowlistParamType Allow outbound network access only to specified domains. Always `allowlist`.

const (
	Allowlist ContainerNetworkPolicyAllowlistParamType = "allowlist"
)

Defines values for ContainerNetworkPolicyAllowlistParamType.

func (ContainerNetworkPolicyAllowlistParamType) Valid

Valid indicates whether the value is a known member of the ContainerNetworkPolicyAllowlistParamType enum.

type ContainerNetworkPolicyDisabledParam

type ContainerNetworkPolicyDisabledParam struct {
	// Type Disable outbound network access. Always `disabled`.
	Type ContainerNetworkPolicyDisabledParamType `json:"type"`
}

ContainerNetworkPolicyDisabledParam defines model for ContainerNetworkPolicyDisabledParam.

type ContainerNetworkPolicyDisabledParamType

type ContainerNetworkPolicyDisabledParamType string

ContainerNetworkPolicyDisabledParamType Disable outbound network access. Always `disabled`.

const (
	ContainerNetworkPolicyDisabledParamTypeDisabled ContainerNetworkPolicyDisabledParamType = "disabled"
)

Defines values for ContainerNetworkPolicyDisabledParamType.

func (ContainerNetworkPolicyDisabledParamType) Valid

Valid indicates whether the value is a known member of the ContainerNetworkPolicyDisabledParamType enum.

type ContainerNetworkPolicyDomainSecretParam

type ContainerNetworkPolicyDomainSecretParam struct {
	// Domain The domain associated with the secret.
	Domain string `json:"domain"`

	// Name The name of the secret to inject for the domain.
	Name string `json:"name"`

	// Value The secret value to inject for the domain.
	Value string `json:"value"`
}

ContainerNetworkPolicyDomainSecretParam defines model for ContainerNetworkPolicyDomainSecretParam.

type ContainerReferenceParam

type ContainerReferenceParam struct {
	// ContainerId The ID of the referenced container.
	ContainerId string `json:"container_id"`

	// Type References a container created with the /v1/containers endpoint
	Type ContainerReferenceParamType `json:"type"`
}

ContainerReferenceParam defines model for ContainerReferenceParam.

type ContainerReferenceParamType

type ContainerReferenceParamType string

ContainerReferenceParamType References a container created with the /v1/containers endpoint

const (
	ContainerReferenceParamTypeContainerReference ContainerReferenceParamType = "container_reference"
)

Defines values for ContainerReferenceParamType.

func (ContainerReferenceParamType) Valid

Valid indicates whether the value is a known member of the ContainerReferenceParamType enum.

type ContainerReferenceResource

type ContainerReferenceResource struct {
	ContainerId string `json:"container_id"`

	// Type The environment type. Always `container_reference`.
	Type ContainerReferenceResourceType `json:"type"`
}

ContainerReferenceResource Represents a container created with /v1/containers.

type ContainerReferenceResourceType

type ContainerReferenceResourceType string

ContainerReferenceResourceType The environment type. Always `container_reference`.

const (
	ContainerReferenceResourceTypeContainerReference ContainerReferenceResourceType = "container_reference"
)

Defines values for ContainerReferenceResourceType.

func (ContainerReferenceResourceType) Valid

Valid indicates whether the value is a known member of the ContainerReferenceResourceType enum.

type ContextManagementParam

type ContextManagementParam struct {
	CompactThreshold *int `json:"compact_threshold,omitempty"`

	// Type The context management entry type. Currently only 'compaction' is supported.
	Type string `json:"type"`
}

ContextManagementParam defines model for ContextManagementParam.

type ConversationParam

type ConversationParam struct {
	// contains filtered or unexported fields
}

ConversationParam The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request. Input items and output items from this response are automatically added to this conversation after this response completes.

func (ConversationParam) AsConversationParam0

func (t ConversationParam) AsConversationParam0() (ConversationParam0, error)

AsConversationParam0 returns the union data inside the ConversationParam as a ConversationParam0

func (ConversationParam) AsConversationParam2

func (t ConversationParam) AsConversationParam2() (ConversationParam2, error)

AsConversationParam2 returns the union data inside the ConversationParam as a ConversationParam2

func (*ConversationParam) FromConversationParam0

func (t *ConversationParam) FromConversationParam0(v ConversationParam0) error

FromConversationParam0 overwrites any union data inside the ConversationParam as the provided ConversationParam0

func (*ConversationParam) FromConversationParam2

func (t *ConversationParam) FromConversationParam2(v ConversationParam2) error

FromConversationParam2 overwrites any union data inside the ConversationParam as the provided ConversationParam2

func (ConversationParam) MarshalJSON

func (t ConversationParam) MarshalJSON() ([]byte, error)

func (*ConversationParam) MergeConversationParam0

func (t *ConversationParam) MergeConversationParam0(v ConversationParam0) error

MergeConversationParam0 performs a merge with any union data inside the ConversationParam, using the provided ConversationParam0

func (*ConversationParam) MergeConversationParam2

func (t *ConversationParam) MergeConversationParam2(v ConversationParam2) error

MergeConversationParam2 performs a merge with any union data inside the ConversationParam, using the provided ConversationParam2

func (*ConversationParam) UnmarshalJSON

func (t *ConversationParam) UnmarshalJSON(b []byte) error

type ConversationParam0

type ConversationParam0 = string

ConversationParam0 The unique ID of the conversation.

type ConversationParam2

type ConversationParam2 struct {
	// Id The unique ID of the conversation.
	Id string `json:"id"`
}

ConversationParam2 The conversation that this response belongs to.

type CoordParam

type CoordParam struct {
	// X The x-coordinate.
	X int `json:"x"`

	// Y The y-coordinate.
	Y int `json:"y"`
}

CoordParam An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.

type CreateModelResponseProperties

type CreateModelResponseProperties struct {
	Metadata       *Metadata `json:"metadata,omitempty"`
	PromptCacheKey *string   `json:"prompt_cache_key,omitempty"`

	// PromptCacheOptions Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/docs/guides/prompt-caching) for current details.
	PromptCacheOptions *PromptCacheOptionsParam `json:"prompt_cache_options,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PromptCacheRetention *CreateModelResponsePropertiesPromptCacheRetention `json:"prompt_cache_retention,omitempty"`
	SafetyIdentifier     *string                                            `json:"safety_identifier,omitempty"`
	ServiceTier          *ServiceTier                                       `json:"service_tier,omitempty"`
	Temperature          *float32                                           `json:"temperature,omitempty"`

	// TopLogprobs An integer between 0 and 20 specifying the maximum number of most likely
	// tokens to return at each token position, each with an associated log
	// probability. In some cases, the number of returned tokens may be fewer than
	// requested.
	TopLogprobs *int     `json:"top_logprobs,omitempty"`
	TopP        *float32 `json:"top_p,omitempty"`

	// User This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
	// A stable identifier for your end-users.
	// Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	User *string `json:"user,omitempty"`
}

CreateModelResponseProperties defines model for CreateModelResponseProperties.

type CreateModelResponsePropertiesPromptCacheRetention

type CreateModelResponsePropertiesPromptCacheRetention string

CreateModelResponsePropertiesPromptCacheRetention Deprecated. Use `prompt_cache_options.ttl` instead.

The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

  • Organizations without ZDR enabled default to `24h`.
  • Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.
const (
	CreateModelResponsePropertiesPromptCacheRetentionInMemory CreateModelResponsePropertiesPromptCacheRetention = "in_memory"
	CreateModelResponsePropertiesPromptCacheRetentionN24h     CreateModelResponsePropertiesPromptCacheRetention = "24h"
)

Defines values for CreateModelResponsePropertiesPromptCacheRetention.

func (CreateModelResponsePropertiesPromptCacheRetention) Valid

Valid indicates whether the value is a known member of the CreateModelResponsePropertiesPromptCacheRetention enum.

type CreateResponse

type CreateResponse struct {
	Background        *bool                     `json:"background,omitempty"`
	ContextManagement *[]ContextManagementParam `json:"context_management,omitempty"`
	Conversation      *ConversationParam        `json:"conversation,omitempty"`
	Include           *[]IncludeEnum            `json:"include,omitempty"`

	// Input Text, image, or file inputs to the model, used to generate a response.
	//
	// Learn more:
	// - [Text inputs and outputs](/docs/guides/text)
	// - [Image inputs](/docs/guides/images)
	// - [File inputs](/docs/guides/pdf-files)
	// - [Conversation state](/docs/guides/conversation-state)
	// - [Function calling](/docs/guides/function-calling)
	Input           *InputParam `json:"input,omitempty"`
	Instructions    *string     `json:"instructions,omitempty"`
	MaxOutputTokens *int        `json:"max_output_tokens,omitempty"`
	MaxToolCalls    *int        `json:"max_tool_calls,omitempty"`
	Metadata        *Metadata   `json:"metadata,omitempty"`

	// Model Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
	// offers a wide range of models with different capabilities, performance
	// characteristics, and price points. Refer to the [model guide](/docs/models)
	// to browse and compare available models.
	Model              *ModelIdsResponses `json:"model,omitempty"`
	Moderation         *ModerationParam   `json:"moderation,omitempty"`
	ParallelToolCalls  *bool              `json:"parallel_tool_calls,omitempty"`
	PreviousResponseId *string            `json:"previous_response_id,omitempty"`
	Prompt             *Prompt            `json:"prompt,omitempty"`
	PromptCacheKey     *string            `json:"prompt_cache_key,omitempty"`

	// PromptCacheOptions Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/docs/guides/prompt-caching) for current details.
	PromptCacheOptions *PromptCacheOptionsParam `json:"prompt_cache_options,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PromptCacheRetention *CreateResponsePromptCacheRetention `json:"prompt_cache_retention,omitempty"`
	Reasoning            *Reasoning                          `json:"reasoning,omitempty"`
	SafetyIdentifier     *string                             `json:"safety_identifier,omitempty"`
	ServiceTier          *ServiceTier                        `json:"service_tier,omitempty"`
	Store                *bool                               `json:"store,omitempty"`
	Stream               *bool                               `json:"stream,omitempty"`
	StreamOptions        *ResponseStreamOptions              `json:"stream_options,omitempty"`
	Temperature          *float32                            `json:"temperature,omitempty"`

	// Text Configuration options for a text response from the model. Can be plain
	// text or structured JSON data. Learn more:
	// - [Text inputs and outputs](/docs/guides/text)
	// - [Structured Outputs](/docs/guides/structured-outputs)
	Text *ResponseTextParam `json:"text,omitempty"`

	// ToolChoice How the model should select which tool (or tools) to use when generating
	// a response. See the `tools` parameter to see how to specify which tools
	// the model can call.
	ToolChoice *ToolChoiceParam `json:"tool_choice,omitempty"`

	// Tools An array of tools the model may call while generating a response. You
	// can specify which tool to use by setting the `tool_choice` parameter.
	//
	// We support the following categories of tools:
	// - **Built-in tools**: Tools that are provided by OpenAI that extend the
	//   model's capabilities, like [web search](/docs/guides/tools-web-search)
	//   or [file search](/docs/guides/tools-file-search). Learn more about
	//   [built-in tools](/docs/guides/tools).
	// - **MCP Tools**: Integrations with third-party systems via custom MCP servers
	//   or predefined connectors such as Google Drive and SharePoint. Learn more about
	//   [MCP Tools](/docs/guides/tools-connectors-mcp).
	// - **Function calls (custom tools)**: Functions that are defined by you,
	//   enabling the model to call your own code with strongly typed arguments
	//   and outputs. Learn more about
	//   [function calling](/docs/guides/function-calling). You can also use
	//   custom tools to call your own code.
	Tools *ToolsArray `json:"tools,omitempty"`

	// TopLogprobs An integer between 0 and 20 specifying the maximum number of most likely
	// tokens to return at each token position, each with an associated log
	// probability. In some cases, the number of returned tokens may be fewer than
	// requested.
	TopLogprobs *int     `json:"top_logprobs,omitempty"`
	TopP        *float32 `json:"top_p,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Truncation *CreateResponseTruncation `json:"truncation,omitempty"`

	// User This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
	// A stable identifier for your end-users.
	// Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	User *string `json:"user,omitempty"`
}

CreateResponse defines model for CreateResponse.

type CreateResponseJSONRequestBody

type CreateResponseJSONRequestBody = CreateResponse

CreateResponseJSONRequestBody defines body for CreateResponse for application/json ContentType.

type CreateResponsePromptCacheRetention

type CreateResponsePromptCacheRetention string

CreateResponsePromptCacheRetention Deprecated. Use `prompt_cache_options.ttl` instead.

The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

  • Organizations without ZDR enabled default to `24h`.
  • Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.
const (
	CreateResponsePromptCacheRetentionInMemory CreateResponsePromptCacheRetention = "in_memory"
	CreateResponsePromptCacheRetentionN24h     CreateResponsePromptCacheRetention = "24h"
)

Defines values for CreateResponsePromptCacheRetention.

func (CreateResponsePromptCacheRetention) Valid

Valid indicates whether the value is a known member of the CreateResponsePromptCacheRetention enum.

type CreateResponseTruncation

type CreateResponseTruncation string

CreateResponseTruncation The truncation strategy to use for the model response.

  • `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.
  • `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
const (
	CreateResponseTruncationAuto     CreateResponseTruncation = "auto"
	CreateResponseTruncationDisabled CreateResponseTruncation = "disabled"
)

Defines values for CreateResponseTruncation.

func (CreateResponseTruncation) Valid

func (e CreateResponseTruncation) Valid() bool

Valid indicates whether the value is a known member of the CreateResponseTruncation enum.

type CustomGrammarFormatParam

type CustomGrammarFormatParam struct {
	// Definition The grammar definition.
	Definition string `json:"definition"`

	// Syntax The syntax of the grammar definition. One of `lark` or `regex`.
	Syntax GrammarSyntax1 `json:"syntax"`

	// Type Grammar format. Always `grammar`.
	Type CustomGrammarFormatParamType `json:"type"`
}

CustomGrammarFormatParam A grammar defined by the user.

type CustomGrammarFormatParamType

type CustomGrammarFormatParamType string

CustomGrammarFormatParamType Grammar format. Always `grammar`.

const (
	Grammar CustomGrammarFormatParamType = "grammar"
)

Defines values for CustomGrammarFormatParamType.

func (CustomGrammarFormatParamType) Valid

Valid indicates whether the value is a known member of the CustomGrammarFormatParamType enum.

type CustomTextFormatParam

type CustomTextFormatParam struct {
	// Type Unconstrained text format. Always `text`.
	Type CustomTextFormatParamType `json:"type"`
}

CustomTextFormatParam Unconstrained free-form text.

type CustomTextFormatParamType

type CustomTextFormatParamType string

CustomTextFormatParamType Unconstrained text format. Always `text`.

const (
	CustomTextFormatParamTypeText CustomTextFormatParamType = "text"
)

Defines values for CustomTextFormatParamType.

func (CustomTextFormatParamType) Valid

func (e CustomTextFormatParamType) Valid() bool

Valid indicates whether the value is a known member of the CustomTextFormatParamType enum.

type CustomToolCall

type CustomToolCall struct {
	// CallId An identifier used to map this custom tool call to a tool call output.
	CallId string          `json:"call_id"`
	Caller *ToolCallCaller `json:"caller,omitempty"`

	// Id The unique ID of the custom tool call in the OpenAI platform.
	Id *string `json:"id,omitempty"`

	// Input The input for the custom tool call generated by the model.
	Input string `json:"input"`

	// Name The name of the custom tool being called.
	Name string `json:"name"`

	// Namespace The namespace of the custom tool being called.
	Namespace *string `json:"namespace,omitempty"`

	// Type The type of the custom tool call. Always `custom_tool_call`.
	Type CustomToolCallType `json:"type"`
}

CustomToolCall A call to a custom tool created by the model.

type CustomToolCallOutput

type CustomToolCallOutput struct {
	// CallId The call ID, used to map this custom tool call output to a custom tool call.
	CallId string               `json:"call_id"`
	Caller *ToolCallCallerParam `json:"caller,omitempty"`

	// Id The unique ID of the custom tool call output in the OpenAI platform.
	Id *string `json:"id,omitempty"`

	// Output The output from the custom tool call generated by your code.
	// Can be a string or an list of output content.
	Output CustomToolCallOutput_Output `json:"output"`

	// Type The type of the custom tool call output. Always `custom_tool_call_output`.
	Type CustomToolCallOutputType `json:"type"`
}

CustomToolCallOutput The output of a custom tool call from your code, being sent back to the model.

type CustomToolCallOutputOutput0

type CustomToolCallOutputOutput0 = string

CustomToolCallOutputOutput0 A string of the output of the custom tool call.

type CustomToolCallOutputOutput1

type CustomToolCallOutputOutput1 = []FunctionAndCustomToolCallOutput

CustomToolCallOutputOutput1 Text, image, or file output of the custom tool call.

type CustomToolCallOutputResource

type CustomToolCallOutputResource struct {
	// CallId The call ID, used to map this custom tool call output to a custom tool call.
	CallId string               `json:"call_id"`
	Caller *ToolCallCallerParam `json:"caller,omitempty"`

	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// Id The unique ID of the custom tool call output item.
	Id string `json:"id"`

	// Output The output from the custom tool call generated by your code.
	// Can be a string or an list of output content.
	Output CustomToolCallOutputResource_Output `json:"output"`

	// Status The status of the item. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when items are returned via API.
	Status FunctionCallOutputStatusEnum `json:"status"`

	// Type The type of the custom tool call output. Always `custom_tool_call_output`.
	Type CustomToolCallOutputResourceType `json:"type"`
}

CustomToolCallOutputResource defines model for CustomToolCallOutputResource.

type CustomToolCallOutputResourceOutput0

type CustomToolCallOutputResourceOutput0 = string

CustomToolCallOutputResourceOutput0 A string of the output of the custom tool call.

type CustomToolCallOutputResourceOutput1

type CustomToolCallOutputResourceOutput1 = []FunctionAndCustomToolCallOutput

CustomToolCallOutputResourceOutput1 Text, image, or file output of the custom tool call.

type CustomToolCallOutputResourceType

type CustomToolCallOutputResourceType string

CustomToolCallOutputResourceType The type of the custom tool call output. Always `custom_tool_call_output`.

const (
	CustomToolCallOutputResourceTypeCustomToolCallOutput CustomToolCallOutputResourceType = "custom_tool_call_output"
)

Defines values for CustomToolCallOutputResourceType.

func (CustomToolCallOutputResourceType) Valid

Valid indicates whether the value is a known member of the CustomToolCallOutputResourceType enum.

type CustomToolCallOutputResource_Output

type CustomToolCallOutputResource_Output struct {
	// contains filtered or unexported fields
}

CustomToolCallOutputResource_Output The output from the custom tool call generated by your code. Can be a string or an list of output content.

func (CustomToolCallOutputResource_Output) AsCustomToolCallOutputResourceOutput0

func (t CustomToolCallOutputResource_Output) AsCustomToolCallOutputResourceOutput0() (CustomToolCallOutputResourceOutput0, error)

AsCustomToolCallOutputResourceOutput0 returns the union data inside the CustomToolCallOutputResource_Output as a CustomToolCallOutputResourceOutput0

func (CustomToolCallOutputResource_Output) AsCustomToolCallOutputResourceOutput1

func (t CustomToolCallOutputResource_Output) AsCustomToolCallOutputResourceOutput1() (CustomToolCallOutputResourceOutput1, error)

AsCustomToolCallOutputResourceOutput1 returns the union data inside the CustomToolCallOutputResource_Output as a CustomToolCallOutputResourceOutput1

func (*CustomToolCallOutputResource_Output) FromCustomToolCallOutputResourceOutput0

func (t *CustomToolCallOutputResource_Output) FromCustomToolCallOutputResourceOutput0(v CustomToolCallOutputResourceOutput0) error

FromCustomToolCallOutputResourceOutput0 overwrites any union data inside the CustomToolCallOutputResource_Output as the provided CustomToolCallOutputResourceOutput0

func (*CustomToolCallOutputResource_Output) FromCustomToolCallOutputResourceOutput1

func (t *CustomToolCallOutputResource_Output) FromCustomToolCallOutputResourceOutput1(v CustomToolCallOutputResourceOutput1) error

FromCustomToolCallOutputResourceOutput1 overwrites any union data inside the CustomToolCallOutputResource_Output as the provided CustomToolCallOutputResourceOutput1

func (CustomToolCallOutputResource_Output) MarshalJSON

func (t CustomToolCallOutputResource_Output) MarshalJSON() ([]byte, error)

func (*CustomToolCallOutputResource_Output) MergeCustomToolCallOutputResourceOutput0

func (t *CustomToolCallOutputResource_Output) MergeCustomToolCallOutputResourceOutput0(v CustomToolCallOutputResourceOutput0) error

MergeCustomToolCallOutputResourceOutput0 performs a merge with any union data inside the CustomToolCallOutputResource_Output, using the provided CustomToolCallOutputResourceOutput0

func (*CustomToolCallOutputResource_Output) MergeCustomToolCallOutputResourceOutput1

func (t *CustomToolCallOutputResource_Output) MergeCustomToolCallOutputResourceOutput1(v CustomToolCallOutputResourceOutput1) error

MergeCustomToolCallOutputResourceOutput1 performs a merge with any union data inside the CustomToolCallOutputResource_Output, using the provided CustomToolCallOutputResourceOutput1

func (*CustomToolCallOutputResource_Output) UnmarshalJSON

func (t *CustomToolCallOutputResource_Output) UnmarshalJSON(b []byte) error

type CustomToolCallOutputType

type CustomToolCallOutputType string

CustomToolCallOutputType The type of the custom tool call output. Always `custom_tool_call_output`.

const (
	CustomToolCallOutputTypeCustomToolCallOutput CustomToolCallOutputType = "custom_tool_call_output"
)

Defines values for CustomToolCallOutputType.

func (CustomToolCallOutputType) Valid

func (e CustomToolCallOutputType) Valid() bool

Valid indicates whether the value is a known member of the CustomToolCallOutputType enum.

type CustomToolCallOutput_Output

type CustomToolCallOutput_Output struct {
	// contains filtered or unexported fields
}

CustomToolCallOutput_Output The output from the custom tool call generated by your code. Can be a string or an list of output content.

func (CustomToolCallOutput_Output) AsCustomToolCallOutputOutput0

func (t CustomToolCallOutput_Output) AsCustomToolCallOutputOutput0() (CustomToolCallOutputOutput0, error)

AsCustomToolCallOutputOutput0 returns the union data inside the CustomToolCallOutput_Output as a CustomToolCallOutputOutput0

func (CustomToolCallOutput_Output) AsCustomToolCallOutputOutput1

func (t CustomToolCallOutput_Output) AsCustomToolCallOutputOutput1() (CustomToolCallOutputOutput1, error)

AsCustomToolCallOutputOutput1 returns the union data inside the CustomToolCallOutput_Output as a CustomToolCallOutputOutput1

func (*CustomToolCallOutput_Output) FromCustomToolCallOutputOutput0

func (t *CustomToolCallOutput_Output) FromCustomToolCallOutputOutput0(v CustomToolCallOutputOutput0) error

FromCustomToolCallOutputOutput0 overwrites any union data inside the CustomToolCallOutput_Output as the provided CustomToolCallOutputOutput0

func (*CustomToolCallOutput_Output) FromCustomToolCallOutputOutput1

func (t *CustomToolCallOutput_Output) FromCustomToolCallOutputOutput1(v CustomToolCallOutputOutput1) error

FromCustomToolCallOutputOutput1 overwrites any union data inside the CustomToolCallOutput_Output as the provided CustomToolCallOutputOutput1

func (CustomToolCallOutput_Output) MarshalJSON

func (t CustomToolCallOutput_Output) MarshalJSON() ([]byte, error)

func (*CustomToolCallOutput_Output) MergeCustomToolCallOutputOutput0

func (t *CustomToolCallOutput_Output) MergeCustomToolCallOutputOutput0(v CustomToolCallOutputOutput0) error

MergeCustomToolCallOutputOutput0 performs a merge with any union data inside the CustomToolCallOutput_Output, using the provided CustomToolCallOutputOutput0

func (*CustomToolCallOutput_Output) MergeCustomToolCallOutputOutput1

func (t *CustomToolCallOutput_Output) MergeCustomToolCallOutputOutput1(v CustomToolCallOutputOutput1) error

MergeCustomToolCallOutputOutput1 performs a merge with any union data inside the CustomToolCallOutput_Output, using the provided CustomToolCallOutputOutput1

func (*CustomToolCallOutput_Output) UnmarshalJSON

func (t *CustomToolCallOutput_Output) UnmarshalJSON(b []byte) error

type CustomToolCallType

type CustomToolCallType string

CustomToolCallType The type of the custom tool call. Always `custom_tool_call`.

const (
	CustomToolCallTypeCustomToolCall CustomToolCallType = "custom_tool_call"
)

Defines values for CustomToolCallType.

func (CustomToolCallType) Valid

func (e CustomToolCallType) Valid() bool

Valid indicates whether the value is a known member of the CustomToolCallType enum.

type CustomToolParam

type CustomToolParam struct {
	AllowedCallers *[]CallableToolAllowedCaller `json:"allowed_callers,omitempty"`

	// DeferLoading Whether this tool should be deferred and discovered via tool search.
	DeferLoading *bool `json:"defer_loading,omitempty"`

	// Description Optional description of the custom tool, used to provide more context.
	Description *string `json:"description,omitempty"`

	// Format The input format for the custom tool. Default is unconstrained text.
	Format *CustomToolParam_Format `json:"format,omitempty"`

	// Name The name of the custom tool, used to identify it in tool calls.
	Name string `json:"name"`

	// Type The type of the custom tool. Always `custom`.
	Type CustomToolParamType `json:"type"`
}

CustomToolParam A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)

type CustomToolParamType

type CustomToolParamType string

CustomToolParamType The type of the custom tool. Always `custom`.

const (
	CustomToolParamTypeCustom CustomToolParamType = "custom"
)

Defines values for CustomToolParamType.

func (CustomToolParamType) Valid

func (e CustomToolParamType) Valid() bool

Valid indicates whether the value is a known member of the CustomToolParamType enum.

type CustomToolParam_Format

type CustomToolParam_Format struct {
	// contains filtered or unexported fields
}

CustomToolParam_Format The input format for the custom tool. Default is unconstrained text.

func (CustomToolParam_Format) AsCustomGrammarFormatParam

func (t CustomToolParam_Format) AsCustomGrammarFormatParam() (CustomGrammarFormatParam, error)

AsCustomGrammarFormatParam returns the union data inside the CustomToolParam_Format as a CustomGrammarFormatParam

func (CustomToolParam_Format) AsCustomTextFormatParam

func (t CustomToolParam_Format) AsCustomTextFormatParam() (CustomTextFormatParam, error)

AsCustomTextFormatParam returns the union data inside the CustomToolParam_Format as a CustomTextFormatParam

func (CustomToolParam_Format) Discriminator

func (t CustomToolParam_Format) Discriminator() (string, error)

func (*CustomToolParam_Format) FromCustomGrammarFormatParam

func (t *CustomToolParam_Format) FromCustomGrammarFormatParam(v CustomGrammarFormatParam) error

FromCustomGrammarFormatParam overwrites any union data inside the CustomToolParam_Format as the provided CustomGrammarFormatParam

func (*CustomToolParam_Format) FromCustomTextFormatParam

func (t *CustomToolParam_Format) FromCustomTextFormatParam(v CustomTextFormatParam) error

FromCustomTextFormatParam overwrites any union data inside the CustomToolParam_Format as the provided CustomTextFormatParam

func (CustomToolParam_Format) MarshalJSON

func (t CustomToolParam_Format) MarshalJSON() ([]byte, error)

func (*CustomToolParam_Format) MergeCustomGrammarFormatParam

func (t *CustomToolParam_Format) MergeCustomGrammarFormatParam(v CustomGrammarFormatParam) error

MergeCustomGrammarFormatParam performs a merge with any union data inside the CustomToolParam_Format, using the provided CustomGrammarFormatParam

func (*CustomToolParam_Format) MergeCustomTextFormatParam

func (t *CustomToolParam_Format) MergeCustomTextFormatParam(v CustomTextFormatParam) error

MergeCustomTextFormatParam performs a merge with any union data inside the CustomToolParam_Format, using the provided CustomTextFormatParam

func (*CustomToolParam_Format) UnmarshalJSON

func (t *CustomToolParam_Format) UnmarshalJSON(b []byte) error

func (CustomToolParam_Format) ValueByDiscriminator

func (t CustomToolParam_Format) ValueByDiscriminator() (interface{}, error)

type DetailEnum

type DetailEnum string

DetailEnum defines model for DetailEnum.

const (
	DetailEnumAuto     DetailEnum = "auto"
	DetailEnumHigh     DetailEnum = "high"
	DetailEnumLow      DetailEnum = "low"
	DetailEnumOriginal DetailEnum = "original"
)

Defines values for DetailEnum.

func (DetailEnum) Valid

func (e DetailEnum) Valid() bool

Valid indicates whether the value is a known member of the DetailEnum enum.

type DirectToolCallCaller

type DirectToolCallCaller struct {
	Type DirectToolCallCallerType `json:"type"`
}

DirectToolCallCaller defines model for DirectToolCallCaller.

type DirectToolCallCallerParam

type DirectToolCallCallerParam struct {
	// Type The caller type. Always `direct`.
	Type DirectToolCallCallerParamType `json:"type"`
}

DirectToolCallCallerParam defines model for DirectToolCallCallerParam.

type DirectToolCallCallerParamType

type DirectToolCallCallerParamType string

DirectToolCallCallerParamType The caller type. Always `direct`.

const (
	DirectToolCallCallerParamTypeDirect DirectToolCallCallerParamType = "direct"
)

Defines values for DirectToolCallCallerParamType.

func (DirectToolCallCallerParamType) Valid

Valid indicates whether the value is a known member of the DirectToolCallCallerParamType enum.

type DirectToolCallCallerType

type DirectToolCallCallerType string

DirectToolCallCallerType defines model for DirectToolCallCaller.Type.

const (
	DirectToolCallCallerTypeDirect DirectToolCallCallerType = "direct"
)

Defines values for DirectToolCallCallerType.

func (DirectToolCallCallerType) Valid

func (e DirectToolCallCallerType) Valid() bool

Valid indicates whether the value is a known member of the DirectToolCallCallerType enum.

type DoubleClickAction

type DoubleClickAction struct {
	Keys *[]string `json:"keys"`

	// Type Specifies the event type. For a double click action, this property is always set to `double_click`.
	Type DoubleClickActionType `json:"type"`

	// X The x-coordinate where the double click occurred.
	X int `json:"x"`

	// Y The y-coordinate where the double click occurred.
	Y int `json:"y"`
}

DoubleClickAction A double click action.

type DoubleClickActionType

type DoubleClickActionType string

DoubleClickActionType Specifies the event type. For a double click action, this property is always set to `double_click`.

const (
	DoubleClick DoubleClickActionType = "double_click"
)

Defines values for DoubleClickActionType.

func (DoubleClickActionType) Valid

func (e DoubleClickActionType) Valid() bool

Valid indicates whether the value is a known member of the DoubleClickActionType enum.

type DragParam

type DragParam struct {
	Keys *[]string `json:"keys,omitempty"`

	// Path An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
	// “`
	// [
	//   { x: 100, y: 200 },
	//   { x: 200, y: 300 }
	// ]
	// “`
	Path []CoordParam `json:"path"`

	// Type Specifies the event type. For a drag action, this property is always set to `drag`.
	Type DragParamType `json:"type"`
}

DragParam A drag action.

type DragParamType

type DragParamType string

DragParamType Specifies the event type. For a drag action, this property is always set to `drag`.

const (
	Drag DragParamType = "drag"
)

Defines values for DragParamType.

func (DragParamType) Valid

func (e DragParamType) Valid() bool

Valid indicates whether the value is a known member of the DragParamType enum.

type EasyInputMessage

type EasyInputMessage struct {
	// Content Text, image, or audio input to the model, used to generate a response.
	// Can also contain previous assistant responses.
	Content EasyInputMessage_Content `json:"content"`
	Phase   *MessagePhase            `json:"phase,omitempty"`

	// Role The role of the message input. One of `user`, `assistant`, `system`, or
	// `developer`.
	Role EasyInputMessageRole `json:"role"`

	// Type The type of the message input. Always `message`.
	Type *EasyInputMessageType `json:"type,omitempty"`
}

EasyInputMessage A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.

type EasyInputMessageContent0

type EasyInputMessageContent0 = string

EasyInputMessageContent0 A text input to the model.

type EasyInputMessageRole

type EasyInputMessageRole string

EasyInputMessageRole The role of the message input. One of `user`, `assistant`, `system`, or `developer`.

const (
	EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
	EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
	EasyInputMessageRoleSystem    EasyInputMessageRole = "system"
	EasyInputMessageRoleUser      EasyInputMessageRole = "user"
)

Defines values for EasyInputMessageRole.

func (EasyInputMessageRole) Valid

func (e EasyInputMessageRole) Valid() bool

Valid indicates whether the value is a known member of the EasyInputMessageRole enum.

type EasyInputMessageType

type EasyInputMessageType string

EasyInputMessageType The type of the message input. Always `message`.

const (
	EasyInputMessageTypeMessage EasyInputMessageType = "message"
)

Defines values for EasyInputMessageType.

func (EasyInputMessageType) Valid

func (e EasyInputMessageType) Valid() bool

Valid indicates whether the value is a known member of the EasyInputMessageType enum.

type EasyInputMessage_Content

type EasyInputMessage_Content struct {
	// contains filtered or unexported fields
}

EasyInputMessage_Content Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.

func (EasyInputMessage_Content) AsEasyInputMessageContent0

func (t EasyInputMessage_Content) AsEasyInputMessageContent0() (EasyInputMessageContent0, error)

AsEasyInputMessageContent0 returns the union data inside the EasyInputMessage_Content as a EasyInputMessageContent0

func (EasyInputMessage_Content) AsInputMessageContentList

func (t EasyInputMessage_Content) AsInputMessageContentList() (InputMessageContentList, error)

AsInputMessageContentList returns the union data inside the EasyInputMessage_Content as a InputMessageContentList

func (*EasyInputMessage_Content) FromEasyInputMessageContent0

func (t *EasyInputMessage_Content) FromEasyInputMessageContent0(v EasyInputMessageContent0) error

FromEasyInputMessageContent0 overwrites any union data inside the EasyInputMessage_Content as the provided EasyInputMessageContent0

func (*EasyInputMessage_Content) FromInputMessageContentList

func (t *EasyInputMessage_Content) FromInputMessageContentList(v InputMessageContentList) error

FromInputMessageContentList overwrites any union data inside the EasyInputMessage_Content as the provided InputMessageContentList

func (EasyInputMessage_Content) MarshalJSON

func (t EasyInputMessage_Content) MarshalJSON() ([]byte, error)

func (*EasyInputMessage_Content) MergeEasyInputMessageContent0

func (t *EasyInputMessage_Content) MergeEasyInputMessageContent0(v EasyInputMessageContent0) error

MergeEasyInputMessageContent0 performs a merge with any union data inside the EasyInputMessage_Content, using the provided EasyInputMessageContent0

func (*EasyInputMessage_Content) MergeInputMessageContentList

func (t *EasyInputMessage_Content) MergeInputMessageContentList(v InputMessageContentList) error

MergeInputMessageContentList performs a merge with any union data inside the EasyInputMessage_Content, using the provided InputMessageContentList

func (*EasyInputMessage_Content) UnmarshalJSON

func (t *EasyInputMessage_Content) UnmarshalJSON(b []byte) error

type EmptyModelParam

type EmptyModelParam = map[string]interface{}

EmptyModelParam defines model for EmptyModelParam.

type FileCitationBody

type FileCitationBody struct {
	// FileId The ID of the file.
	FileId string `json:"file_id"`

	// Filename The filename of the file cited.
	Filename string `json:"filename"`

	// Index The index of the file in the list of files.
	Index int `json:"index"`

	// Type The type of the file citation. Always `file_citation`.
	Type FileCitationBodyType `json:"type"`
}

FileCitationBody A citation to a file.

type FileCitationBodyType

type FileCitationBodyType string

FileCitationBodyType The type of the file citation. Always `file_citation`.

const (
	FileCitation FileCitationBodyType = "file_citation"
)

Defines values for FileCitationBodyType.

func (FileCitationBodyType) Valid

func (e FileCitationBodyType) Valid() bool

Valid indicates whether the value is a known member of the FileCitationBodyType enum.

type FileDetailEnum

type FileDetailEnum string

FileDetailEnum defines model for FileDetailEnum.

const (
	FileDetailEnumAuto FileDetailEnum = "auto"
	FileDetailEnumHigh FileDetailEnum = "high"
	FileDetailEnumLow  FileDetailEnum = "low"
)

Defines values for FileDetailEnum.

func (FileDetailEnum) Valid

func (e FileDetailEnum) Valid() bool

Valid indicates whether the value is a known member of the FileDetailEnum enum.

type FileInputDetail

type FileInputDetail string

FileInputDetail defines model for FileInputDetail.

const (
	FileInputDetailAuto FileInputDetail = "auto"
	FileInputDetailHigh FileInputDetail = "high"
	FileInputDetailLow  FileInputDetail = "low"
)

Defines values for FileInputDetail.

func (FileInputDetail) Valid

func (e FileInputDetail) Valid() bool

Valid indicates whether the value is a known member of the FileInputDetail enum.

type FilePath

type FilePath struct {
	// FileId The ID of the file.
	FileId string `json:"file_id"`

	// Index The index of the file in the list of files.
	Index int `json:"index"`

	// Type The type of the file path. Always `file_path`.
	Type FilePathType `json:"type"`
}

FilePath A path to a file.

type FilePathType

type FilePathType string

FilePathType The type of the file path. Always `file_path`.

const (
	FilePathTypeFilePath FilePathType = "file_path"
)

Defines values for FilePathType.

func (FilePathType) Valid

func (e FilePathType) Valid() bool

Valid indicates whether the value is a known member of the FilePathType enum.

type FileSearchTool

type FileSearchTool struct {
	Filters *Filters `json:"filters,omitempty"`

	// MaxNumResults The maximum number of results to return. This number should be between 1 and 50 inclusive.
	MaxNumResults *int `json:"max_num_results,omitempty"`

	// RankingOptions Ranking options for search.
	RankingOptions *RankingOptions `json:"ranking_options,omitempty"`

	// Type The type of the file search tool. Always `file_search`.
	Type FileSearchToolType `json:"type"`

	// VectorStoreIds The IDs of the vector stores to search.
	VectorStoreIds []string `json:"vector_store_ids"`
}

FileSearchTool A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

type FileSearchToolCall

type FileSearchToolCall struct {
	// Id The unique ID of the file search tool call.
	Id string `json:"id"`

	// Queries The queries used to search for files.
	Queries []string `json:"queries"`
	Results *struct {
		Attributes *VectorStoreFileAttributes `json:"attributes,omitempty"`

		// FileId The unique ID of the file.
		FileId *string `json:"file_id,omitempty"`

		// Filename The name of the file.
		Filename *string `json:"filename,omitempty"`

		// Score The relevance score of the file - a value between 0 and 1.
		Score *float32 `json:"score,omitempty"`

		// Text The text that was retrieved from the file.
		Text *string `json:"text,omitempty"`
	} `json:"results,omitempty"`

	// Status The status of the file search tool call. One of `in_progress`,
	// `searching`, `incomplete` or `failed`,
	Status FileSearchToolCallStatus `json:"status"`

	// Type The type of the file search tool call. Always `file_search_call`.
	Type FileSearchToolCallType `json:"type"`
}

FileSearchToolCall The results of a file search tool call. See the [file search guide](/docs/guides/tools-file-search) for more information.

type FileSearchToolCallStatus

type FileSearchToolCallStatus string

FileSearchToolCallStatus The status of the file search tool call. One of `in_progress`, `searching`, `incomplete` or `failed`,

const (
	FileSearchToolCallStatusCompleted  FileSearchToolCallStatus = "completed"
	FileSearchToolCallStatusFailed     FileSearchToolCallStatus = "failed"
	FileSearchToolCallStatusInProgress FileSearchToolCallStatus = "in_progress"
	FileSearchToolCallStatusIncomplete FileSearchToolCallStatus = "incomplete"
	FileSearchToolCallStatusSearching  FileSearchToolCallStatus = "searching"
)

Defines values for FileSearchToolCallStatus.

func (FileSearchToolCallStatus) Valid

func (e FileSearchToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the FileSearchToolCallStatus enum.

type FileSearchToolCallType

type FileSearchToolCallType string

FileSearchToolCallType The type of the file search tool call. Always `file_search_call`.

const (
	FileSearchCall FileSearchToolCallType = "file_search_call"
)

Defines values for FileSearchToolCallType.

func (FileSearchToolCallType) Valid

func (e FileSearchToolCallType) Valid() bool

Valid indicates whether the value is a known member of the FileSearchToolCallType enum.

type FileSearchToolType

type FileSearchToolType string

FileSearchToolType The type of the file search tool. Always `file_search`.

const (
	FileSearchToolTypeFileSearch FileSearchToolType = "file_search"
)

Defines values for FileSearchToolType.

func (FileSearchToolType) Valid

func (e FileSearchToolType) Valid() bool

Valid indicates whether the value is a known member of the FileSearchToolType enum.

type Filters

type Filters struct {
	// contains filtered or unexported fields
}

Filters defines model for Filters.

func (Filters) AsComparisonFilter

func (t Filters) AsComparisonFilter() (ComparisonFilter, error)

AsComparisonFilter returns the union data inside the Filters as a ComparisonFilter

func (Filters) AsCompoundFilter

func (t Filters) AsCompoundFilter() (CompoundFilter, error)

AsCompoundFilter returns the union data inside the Filters as a CompoundFilter

func (*Filters) FromComparisonFilter

func (t *Filters) FromComparisonFilter(v ComparisonFilter) error

FromComparisonFilter overwrites any union data inside the Filters as the provided ComparisonFilter

func (*Filters) FromCompoundFilter

func (t *Filters) FromCompoundFilter(v CompoundFilter) error

FromCompoundFilter overwrites any union data inside the Filters as the provided CompoundFilter

func (Filters) MarshalJSON

func (t Filters) MarshalJSON() ([]byte, error)

func (*Filters) MergeComparisonFilter

func (t *Filters) MergeComparisonFilter(v ComparisonFilter) error

MergeComparisonFilter performs a merge with any union data inside the Filters, using the provided ComparisonFilter

func (*Filters) MergeCompoundFilter

func (t *Filters) MergeCompoundFilter(v CompoundFilter) error

MergeCompoundFilter performs a merge with any union data inside the Filters, using the provided CompoundFilter

func (*Filters) UnmarshalJSON

func (t *Filters) UnmarshalJSON(b []byte) error

type FunctionAndCustomToolCallOutput

type FunctionAndCustomToolCallOutput struct {
	// contains filtered or unexported fields
}

FunctionAndCustomToolCallOutput defines model for FunctionAndCustomToolCallOutput.

func (FunctionAndCustomToolCallOutput) AsInputFileContent

func (t FunctionAndCustomToolCallOutput) AsInputFileContent() (InputFileContent, error)

AsInputFileContent returns the union data inside the FunctionAndCustomToolCallOutput as a InputFileContent

func (FunctionAndCustomToolCallOutput) AsInputImageContent

func (t FunctionAndCustomToolCallOutput) AsInputImageContent() (InputImageContent, error)

AsInputImageContent returns the union data inside the FunctionAndCustomToolCallOutput as a InputImageContent

func (FunctionAndCustomToolCallOutput) AsInputTextContent

func (t FunctionAndCustomToolCallOutput) AsInputTextContent() (InputTextContent, error)

AsInputTextContent returns the union data inside the FunctionAndCustomToolCallOutput as a InputTextContent

func (FunctionAndCustomToolCallOutput) Discriminator

func (t FunctionAndCustomToolCallOutput) Discriminator() (string, error)

func (*FunctionAndCustomToolCallOutput) FromInputFileContent

func (t *FunctionAndCustomToolCallOutput) FromInputFileContent(v InputFileContent) error

FromInputFileContent overwrites any union data inside the FunctionAndCustomToolCallOutput as the provided InputFileContent

func (*FunctionAndCustomToolCallOutput) FromInputImageContent

func (t *FunctionAndCustomToolCallOutput) FromInputImageContent(v InputImageContent) error

FromInputImageContent overwrites any union data inside the FunctionAndCustomToolCallOutput as the provided InputImageContent

func (*FunctionAndCustomToolCallOutput) FromInputTextContent

func (t *FunctionAndCustomToolCallOutput) FromInputTextContent(v InputTextContent) error

FromInputTextContent overwrites any union data inside the FunctionAndCustomToolCallOutput as the provided InputTextContent

func (FunctionAndCustomToolCallOutput) MarshalJSON

func (t FunctionAndCustomToolCallOutput) MarshalJSON() ([]byte, error)

func (*FunctionAndCustomToolCallOutput) MergeInputFileContent

func (t *FunctionAndCustomToolCallOutput) MergeInputFileContent(v InputFileContent) error

MergeInputFileContent performs a merge with any union data inside the FunctionAndCustomToolCallOutput, using the provided InputFileContent

func (*FunctionAndCustomToolCallOutput) MergeInputImageContent

func (t *FunctionAndCustomToolCallOutput) MergeInputImageContent(v InputImageContent) error

MergeInputImageContent performs a merge with any union data inside the FunctionAndCustomToolCallOutput, using the provided InputImageContent

func (*FunctionAndCustomToolCallOutput) MergeInputTextContent

func (t *FunctionAndCustomToolCallOutput) MergeInputTextContent(v InputTextContent) error

MergeInputTextContent performs a merge with any union data inside the FunctionAndCustomToolCallOutput, using the provided InputTextContent

func (*FunctionAndCustomToolCallOutput) UnmarshalJSON

func (t *FunctionAndCustomToolCallOutput) UnmarshalJSON(b []byte) error

func (FunctionAndCustomToolCallOutput) ValueByDiscriminator

func (t FunctionAndCustomToolCallOutput) ValueByDiscriminator() (interface{}, error)

type FunctionCallItemStatus

type FunctionCallItemStatus string

FunctionCallItemStatus defines model for FunctionCallItemStatus.

const (
	FunctionCallItemStatusCompleted  FunctionCallItemStatus = "completed"
	FunctionCallItemStatusInProgress FunctionCallItemStatus = "in_progress"
	FunctionCallItemStatusIncomplete FunctionCallItemStatus = "incomplete"
)

Defines values for FunctionCallItemStatus.

func (FunctionCallItemStatus) Valid

func (e FunctionCallItemStatus) Valid() bool

Valid indicates whether the value is a known member of the FunctionCallItemStatus enum.

type FunctionCallOutputItemParam

type FunctionCallOutputItemParam struct {
	CallId    *string              `json:"call_id,omitempty"`
	Caller    *ToolCallCallerParam `json:"caller,omitempty"`
	Id        *string              `json:"id,omitempty"`
	Name      *string              `json:"name,omitempty"`
	Namespace *string              `json:"namespace,omitempty"`

	// Output Text, image, or file output of the function tool call.
	Output FunctionCallOutputItemParam_Output `json:"output"`
	Status *FunctionCallItemStatus            `json:"status,omitempty"`

	// Type The type of the function tool call output. Always `function_call_output`.
	Type FunctionCallOutputItemParamType `json:"type"`
}

FunctionCallOutputItemParam The output of a function tool call.

type FunctionCallOutputItemParamOutput0

type FunctionCallOutputItemParamOutput0 = string

FunctionCallOutputItemParamOutput0 A JSON string of the output of the function tool call.

type FunctionCallOutputItemParamOutput1

type FunctionCallOutputItemParamOutput1 = []FunctionCallOutputItemParam_Output_1_Item

FunctionCallOutputItemParamOutput1 An array of content outputs (text, image, file) for the function tool call.

type FunctionCallOutputItemParamType

type FunctionCallOutputItemParamType string

FunctionCallOutputItemParamType The type of the function tool call output. Always `function_call_output`.

const (
	FunctionCallOutputItemParamTypeFunctionCallOutput FunctionCallOutputItemParamType = "function_call_output"
)

Defines values for FunctionCallOutputItemParamType.

func (FunctionCallOutputItemParamType) Valid

Valid indicates whether the value is a known member of the FunctionCallOutputItemParamType enum.

type FunctionCallOutputItemParam_Output

type FunctionCallOutputItemParam_Output struct {
	// contains filtered or unexported fields
}

FunctionCallOutputItemParam_Output Text, image, or file output of the function tool call.

func (FunctionCallOutputItemParam_Output) AsFunctionCallOutputItemParamOutput0

func (t FunctionCallOutputItemParam_Output) AsFunctionCallOutputItemParamOutput0() (FunctionCallOutputItemParamOutput0, error)

AsFunctionCallOutputItemParamOutput0 returns the union data inside the FunctionCallOutputItemParam_Output as a FunctionCallOutputItemParamOutput0

func (FunctionCallOutputItemParam_Output) AsFunctionCallOutputItemParamOutput1

func (t FunctionCallOutputItemParam_Output) AsFunctionCallOutputItemParamOutput1() (FunctionCallOutputItemParamOutput1, error)

AsFunctionCallOutputItemParamOutput1 returns the union data inside the FunctionCallOutputItemParam_Output as a FunctionCallOutputItemParamOutput1

func (*FunctionCallOutputItemParam_Output) FromFunctionCallOutputItemParamOutput0

func (t *FunctionCallOutputItemParam_Output) FromFunctionCallOutputItemParamOutput0(v FunctionCallOutputItemParamOutput0) error

FromFunctionCallOutputItemParamOutput0 overwrites any union data inside the FunctionCallOutputItemParam_Output as the provided FunctionCallOutputItemParamOutput0

func (*FunctionCallOutputItemParam_Output) FromFunctionCallOutputItemParamOutput1

func (t *FunctionCallOutputItemParam_Output) FromFunctionCallOutputItemParamOutput1(v FunctionCallOutputItemParamOutput1) error

FromFunctionCallOutputItemParamOutput1 overwrites any union data inside the FunctionCallOutputItemParam_Output as the provided FunctionCallOutputItemParamOutput1

func (FunctionCallOutputItemParam_Output) MarshalJSON

func (t FunctionCallOutputItemParam_Output) MarshalJSON() ([]byte, error)

func (*FunctionCallOutputItemParam_Output) MergeFunctionCallOutputItemParamOutput0

func (t *FunctionCallOutputItemParam_Output) MergeFunctionCallOutputItemParamOutput0(v FunctionCallOutputItemParamOutput0) error

MergeFunctionCallOutputItemParamOutput0 performs a merge with any union data inside the FunctionCallOutputItemParam_Output, using the provided FunctionCallOutputItemParamOutput0

func (*FunctionCallOutputItemParam_Output) MergeFunctionCallOutputItemParamOutput1

func (t *FunctionCallOutputItemParam_Output) MergeFunctionCallOutputItemParamOutput1(v FunctionCallOutputItemParamOutput1) error

MergeFunctionCallOutputItemParamOutput1 performs a merge with any union data inside the FunctionCallOutputItemParam_Output, using the provided FunctionCallOutputItemParamOutput1

func (*FunctionCallOutputItemParam_Output) UnmarshalJSON

func (t *FunctionCallOutputItemParam_Output) UnmarshalJSON(b []byte) error

type FunctionCallOutputItemParam_Output_1_Item

type FunctionCallOutputItemParam_Output_1_Item struct {
	// contains filtered or unexported fields
}

FunctionCallOutputItemParam_Output_1_Item A piece of message content, such as text, an image, or a file.

func (FunctionCallOutputItemParam_Output_1_Item) AsInputFileContentParam

AsInputFileContentParam returns the union data inside the FunctionCallOutputItemParam_Output_1_Item as a InputFileContentParam

func (FunctionCallOutputItemParam_Output_1_Item) AsInputImageContentParamAutoParam

func (t FunctionCallOutputItemParam_Output_1_Item) AsInputImageContentParamAutoParam() (InputImageContentParamAutoParam, error)

AsInputImageContentParamAutoParam returns the union data inside the FunctionCallOutputItemParam_Output_1_Item as a InputImageContentParamAutoParam

func (FunctionCallOutputItemParam_Output_1_Item) AsInputTextContentParam

AsInputTextContentParam returns the union data inside the FunctionCallOutputItemParam_Output_1_Item as a InputTextContentParam

func (FunctionCallOutputItemParam_Output_1_Item) Discriminator

func (*FunctionCallOutputItemParam_Output_1_Item) FromInputFileContentParam

FromInputFileContentParam overwrites any union data inside the FunctionCallOutputItemParam_Output_1_Item as the provided InputFileContentParam

func (*FunctionCallOutputItemParam_Output_1_Item) FromInputImageContentParamAutoParam

func (t *FunctionCallOutputItemParam_Output_1_Item) FromInputImageContentParamAutoParam(v InputImageContentParamAutoParam) error

FromInputImageContentParamAutoParam overwrites any union data inside the FunctionCallOutputItemParam_Output_1_Item as the provided InputImageContentParamAutoParam

func (*FunctionCallOutputItemParam_Output_1_Item) FromInputTextContentParam

FromInputTextContentParam overwrites any union data inside the FunctionCallOutputItemParam_Output_1_Item as the provided InputTextContentParam

func (FunctionCallOutputItemParam_Output_1_Item) MarshalJSON

func (*FunctionCallOutputItemParam_Output_1_Item) MergeInputFileContentParam

MergeInputFileContentParam performs a merge with any union data inside the FunctionCallOutputItemParam_Output_1_Item, using the provided InputFileContentParam

func (*FunctionCallOutputItemParam_Output_1_Item) MergeInputImageContentParamAutoParam

func (t *FunctionCallOutputItemParam_Output_1_Item) MergeInputImageContentParamAutoParam(v InputImageContentParamAutoParam) error

MergeInputImageContentParamAutoParam performs a merge with any union data inside the FunctionCallOutputItemParam_Output_1_Item, using the provided InputImageContentParamAutoParam

func (*FunctionCallOutputItemParam_Output_1_Item) MergeInputTextContentParam

MergeInputTextContentParam performs a merge with any union data inside the FunctionCallOutputItemParam_Output_1_Item, using the provided InputTextContentParam

func (*FunctionCallOutputItemParam_Output_1_Item) UnmarshalJSON

func (FunctionCallOutputItemParam_Output_1_Item) ValueByDiscriminator

func (t FunctionCallOutputItemParam_Output_1_Item) ValueByDiscriminator() (interface{}, error)

type FunctionCallOutputStatusEnum

type FunctionCallOutputStatusEnum string

FunctionCallOutputStatusEnum defines model for FunctionCallOutputStatusEnum.

const (
	FunctionCallOutputStatusEnumCompleted  FunctionCallOutputStatusEnum = "completed"
	FunctionCallOutputStatusEnumInProgress FunctionCallOutputStatusEnum = "in_progress"
	FunctionCallOutputStatusEnumIncomplete FunctionCallOutputStatusEnum = "incomplete"
)

Defines values for FunctionCallOutputStatusEnum.

func (FunctionCallOutputStatusEnum) Valid

Valid indicates whether the value is a known member of the FunctionCallOutputStatusEnum enum.

type FunctionCallStatus

type FunctionCallStatus string

FunctionCallStatus defines model for FunctionCallStatus.

const (
	FunctionCallStatusCompleted  FunctionCallStatus = "completed"
	FunctionCallStatusInProgress FunctionCallStatus = "in_progress"
	FunctionCallStatusIncomplete FunctionCallStatus = "incomplete"
)

Defines values for FunctionCallStatus.

func (FunctionCallStatus) Valid

func (e FunctionCallStatus) Valid() bool

Valid indicates whether the value is a known member of the FunctionCallStatus enum.

type FunctionShellAction

type FunctionShellAction struct {
	Commands        []string `json:"commands"`
	MaxOutputLength *int     `json:"max_output_length"`
	TimeoutMs       *int     `json:"timeout_ms"`
}

FunctionShellAction Execute a shell command.

type FunctionShellActionParam

type FunctionShellActionParam struct {
	// Commands Ordered shell commands for the execution environment to run.
	Commands        []string `json:"commands"`
	MaxOutputLength *int     `json:"max_output_length,omitempty"`
	TimeoutMs       *int     `json:"timeout_ms,omitempty"`
}

FunctionShellActionParam Commands and limits describing how to run the shell tool call.

type FunctionShellCall

type FunctionShellCall struct {
	// Action The shell commands and limits that describe how to run the tool call.
	Action FunctionShellAction `json:"action"`

	// CallId The unique ID of the shell tool call generated by the model.
	CallId string          `json:"call_id"`
	Caller *ToolCallCaller `json:"caller,omitempty"`

	// CreatedBy The ID of the entity that created this tool call.
	CreatedBy   *string `json:"created_by,omitempty"`
	Environment *struct {
		// contains filtered or unexported fields
	} `json:"environment"`

	// Id The unique ID of the shell tool call. Populated when this item is returned via API.
	Id string `json:"id"`

	// Status The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.
	Status FunctionShellCallStatus `json:"status"`

	// Type The type of the item. Always `shell_call`.
	Type FunctionShellCallType `json:"type"`
}

FunctionShellCall A tool call that executes one or more shell commands in a managed environment.

type FunctionShellCallItemParam

type FunctionShellCallItemParam struct {
	// Action The shell commands and limits that describe how to run the tool call.
	Action FunctionShellActionParam `json:"action"`

	// CallId The unique ID of the shell tool call generated by the model.
	CallId      string               `json:"call_id"`
	Caller      *ToolCallCallerParam `json:"caller,omitempty"`
	Environment *struct {
		// contains filtered or unexported fields
	} `json:"environment,omitempty"`
	Id     *string                      `json:"id,omitempty"`
	Status *FunctionShellCallItemStatus `json:"status,omitempty"`

	// Type The type of the item. Always `shell_call`.
	Type FunctionShellCallItemParamType `json:"type"`
}

FunctionShellCallItemParam A tool representing a request to execute one or more shell commands.

type FunctionShellCallItemParamType

type FunctionShellCallItemParamType string

FunctionShellCallItemParamType The type of the item. Always `shell_call`.

const (
	FunctionShellCallItemParamTypeShellCall FunctionShellCallItemParamType = "shell_call"
)

Defines values for FunctionShellCallItemParamType.

func (FunctionShellCallItemParamType) Valid

Valid indicates whether the value is a known member of the FunctionShellCallItemParamType enum.

type FunctionShellCallItemStatus

type FunctionShellCallItemStatus string

FunctionShellCallItemStatus Status values reported for shell tool calls.

const (
	FunctionShellCallItemStatusCompleted  FunctionShellCallItemStatus = "completed"
	FunctionShellCallItemStatusInProgress FunctionShellCallItemStatus = "in_progress"
	FunctionShellCallItemStatusIncomplete FunctionShellCallItemStatus = "incomplete"
)

Defines values for FunctionShellCallItemStatus.

func (FunctionShellCallItemStatus) Valid

Valid indicates whether the value is a known member of the FunctionShellCallItemStatus enum.

type FunctionShellCallOutput

type FunctionShellCallOutput struct {
	// CallId The unique ID of the shell tool call generated by the model.
	CallId string          `json:"call_id"`
	Caller *ToolCallCaller `json:"caller,omitempty"`

	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// Id The unique ID of the shell call output. Populated when this item is returned via API.
	Id              string `json:"id"`
	MaxOutputLength *int   `json:"max_output_length"`

	// Output An array of shell call output contents
	Output []FunctionShellCallOutputContent `json:"output"`

	// Status The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.
	Status FunctionShellCallOutputStatusEnum `json:"status"`

	// Type The type of the shell call output. Always `shell_call_output`.
	Type FunctionShellCallOutputType `json:"type"`
}

FunctionShellCallOutput The output of a shell tool call that was emitted.

type FunctionShellCallOutputContent

type FunctionShellCallOutputContent struct {
	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// Outcome Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
	Outcome FunctionShellCallOutputContent_Outcome `json:"outcome"`

	// Stderr The standard error output that was captured.
	Stderr string `json:"stderr"`

	// Stdout The standard output that was captured.
	Stdout string `json:"stdout"`
}

FunctionShellCallOutputContent The content of a shell tool call output that was emitted.

type FunctionShellCallOutputContentParam

type FunctionShellCallOutputContentParam struct {
	// Outcome The exit or timeout outcome associated with this shell call.
	Outcome FunctionShellCallOutputOutcomeParam `json:"outcome"`

	// Stderr Captured stderr output for the shell call.
	Stderr string `json:"stderr"`

	// Stdout Captured stdout output for the shell call.
	Stdout string `json:"stdout"`
}

FunctionShellCallOutputContentParam Captured stdout and stderr for a portion of a shell tool call output.

type FunctionShellCallOutputContent_Outcome

type FunctionShellCallOutputContent_Outcome struct {
	// contains filtered or unexported fields
}

FunctionShellCallOutputContent_Outcome Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

func (FunctionShellCallOutputContent_Outcome) AsFunctionShellCallOutputExitOutcome

func (t FunctionShellCallOutputContent_Outcome) AsFunctionShellCallOutputExitOutcome() (FunctionShellCallOutputExitOutcome, error)

AsFunctionShellCallOutputExitOutcome returns the union data inside the FunctionShellCallOutputContent_Outcome as a FunctionShellCallOutputExitOutcome

func (FunctionShellCallOutputContent_Outcome) AsFunctionShellCallOutputTimeoutOutcome

func (t FunctionShellCallOutputContent_Outcome) AsFunctionShellCallOutputTimeoutOutcome() (FunctionShellCallOutputTimeoutOutcome, error)

AsFunctionShellCallOutputTimeoutOutcome returns the union data inside the FunctionShellCallOutputContent_Outcome as a FunctionShellCallOutputTimeoutOutcome

func (FunctionShellCallOutputContent_Outcome) Discriminator

func (*FunctionShellCallOutputContent_Outcome) FromFunctionShellCallOutputExitOutcome

func (t *FunctionShellCallOutputContent_Outcome) FromFunctionShellCallOutputExitOutcome(v FunctionShellCallOutputExitOutcome) error

FromFunctionShellCallOutputExitOutcome overwrites any union data inside the FunctionShellCallOutputContent_Outcome as the provided FunctionShellCallOutputExitOutcome

func (*FunctionShellCallOutputContent_Outcome) FromFunctionShellCallOutputTimeoutOutcome

func (t *FunctionShellCallOutputContent_Outcome) FromFunctionShellCallOutputTimeoutOutcome(v FunctionShellCallOutputTimeoutOutcome) error

FromFunctionShellCallOutputTimeoutOutcome overwrites any union data inside the FunctionShellCallOutputContent_Outcome as the provided FunctionShellCallOutputTimeoutOutcome

func (FunctionShellCallOutputContent_Outcome) MarshalJSON

func (t FunctionShellCallOutputContent_Outcome) MarshalJSON() ([]byte, error)

func (*FunctionShellCallOutputContent_Outcome) MergeFunctionShellCallOutputExitOutcome

func (t *FunctionShellCallOutputContent_Outcome) MergeFunctionShellCallOutputExitOutcome(v FunctionShellCallOutputExitOutcome) error

MergeFunctionShellCallOutputExitOutcome performs a merge with any union data inside the FunctionShellCallOutputContent_Outcome, using the provided FunctionShellCallOutputExitOutcome

func (*FunctionShellCallOutputContent_Outcome) MergeFunctionShellCallOutputTimeoutOutcome

func (t *FunctionShellCallOutputContent_Outcome) MergeFunctionShellCallOutputTimeoutOutcome(v FunctionShellCallOutputTimeoutOutcome) error

MergeFunctionShellCallOutputTimeoutOutcome performs a merge with any union data inside the FunctionShellCallOutputContent_Outcome, using the provided FunctionShellCallOutputTimeoutOutcome

func (*FunctionShellCallOutputContent_Outcome) UnmarshalJSON

func (t *FunctionShellCallOutputContent_Outcome) UnmarshalJSON(b []byte) error

func (FunctionShellCallOutputContent_Outcome) ValueByDiscriminator

func (t FunctionShellCallOutputContent_Outcome) ValueByDiscriminator() (interface{}, error)

type FunctionShellCallOutputExitOutcome

type FunctionShellCallOutputExitOutcome struct {
	// ExitCode Exit code from the shell process.
	ExitCode int `json:"exit_code"`

	// Type The outcome type. Always `exit`.
	Type FunctionShellCallOutputExitOutcomeType `json:"type"`
}

FunctionShellCallOutputExitOutcome Indicates that the shell commands finished and returned an exit code.

type FunctionShellCallOutputExitOutcomeParam

type FunctionShellCallOutputExitOutcomeParam struct {
	// ExitCode The exit code returned by the shell process.
	ExitCode int `json:"exit_code"`

	// Type The outcome type. Always `exit`.
	Type FunctionShellCallOutputExitOutcomeParamType `json:"type"`
}

FunctionShellCallOutputExitOutcomeParam Indicates that the shell commands finished and returned an exit code.

type FunctionShellCallOutputExitOutcomeParamType

type FunctionShellCallOutputExitOutcomeParamType string

FunctionShellCallOutputExitOutcomeParamType The outcome type. Always `exit`.

const (
	FunctionShellCallOutputExitOutcomeParamTypeExit FunctionShellCallOutputExitOutcomeParamType = "exit"
)

Defines values for FunctionShellCallOutputExitOutcomeParamType.

func (FunctionShellCallOutputExitOutcomeParamType) Valid

Valid indicates whether the value is a known member of the FunctionShellCallOutputExitOutcomeParamType enum.

type FunctionShellCallOutputExitOutcomeType

type FunctionShellCallOutputExitOutcomeType string

FunctionShellCallOutputExitOutcomeType The outcome type. Always `exit`.

const (
	FunctionShellCallOutputExitOutcomeTypeExit FunctionShellCallOutputExitOutcomeType = "exit"
)

Defines values for FunctionShellCallOutputExitOutcomeType.

func (FunctionShellCallOutputExitOutcomeType) Valid

Valid indicates whether the value is a known member of the FunctionShellCallOutputExitOutcomeType enum.

type FunctionShellCallOutputItemParam

type FunctionShellCallOutputItemParam struct {
	// CallId The unique ID of the shell tool call generated by the model.
	CallId          string               `json:"call_id"`
	Caller          *ToolCallCallerParam `json:"caller,omitempty"`
	Id              *string              `json:"id,omitempty"`
	MaxOutputLength *int                 `json:"max_output_length,omitempty"`

	// Output Captured chunks of stdout and stderr output, along with their associated outcomes.
	Output []FunctionShellCallOutputContentParam `json:"output"`
	Status *FunctionShellCallItemStatus          `json:"status,omitempty"`

	// Type The type of the item. Always `shell_call_output`.
	Type FunctionShellCallOutputItemParamType `json:"type"`
}

FunctionShellCallOutputItemParam The streamed output items emitted by a shell tool call.

type FunctionShellCallOutputItemParamType

type FunctionShellCallOutputItemParamType string

FunctionShellCallOutputItemParamType The type of the item. Always `shell_call_output`.

const (
	FunctionShellCallOutputItemParamTypeShellCallOutput FunctionShellCallOutputItemParamType = "shell_call_output"
)

Defines values for FunctionShellCallOutputItemParamType.

func (FunctionShellCallOutputItemParamType) Valid

Valid indicates whether the value is a known member of the FunctionShellCallOutputItemParamType enum.

type FunctionShellCallOutputOutcomeParam

type FunctionShellCallOutputOutcomeParam struct {
	// contains filtered or unexported fields
}

FunctionShellCallOutputOutcomeParam The exit or timeout outcome associated with this shell call.

func (FunctionShellCallOutputOutcomeParam) AsFunctionShellCallOutputExitOutcomeParam

func (t FunctionShellCallOutputOutcomeParam) AsFunctionShellCallOutputExitOutcomeParam() (FunctionShellCallOutputExitOutcomeParam, error)

AsFunctionShellCallOutputExitOutcomeParam returns the union data inside the FunctionShellCallOutputOutcomeParam as a FunctionShellCallOutputExitOutcomeParam

func (FunctionShellCallOutputOutcomeParam) AsFunctionShellCallOutputTimeoutOutcomeParam

func (t FunctionShellCallOutputOutcomeParam) AsFunctionShellCallOutputTimeoutOutcomeParam() (FunctionShellCallOutputTimeoutOutcomeParam, error)

AsFunctionShellCallOutputTimeoutOutcomeParam returns the union data inside the FunctionShellCallOutputOutcomeParam as a FunctionShellCallOutputTimeoutOutcomeParam

func (FunctionShellCallOutputOutcomeParam) Discriminator

func (t FunctionShellCallOutputOutcomeParam) Discriminator() (string, error)

func (*FunctionShellCallOutputOutcomeParam) FromFunctionShellCallOutputExitOutcomeParam

func (t *FunctionShellCallOutputOutcomeParam) FromFunctionShellCallOutputExitOutcomeParam(v FunctionShellCallOutputExitOutcomeParam) error

FromFunctionShellCallOutputExitOutcomeParam overwrites any union data inside the FunctionShellCallOutputOutcomeParam as the provided FunctionShellCallOutputExitOutcomeParam

func (*FunctionShellCallOutputOutcomeParam) FromFunctionShellCallOutputTimeoutOutcomeParam

func (t *FunctionShellCallOutputOutcomeParam) FromFunctionShellCallOutputTimeoutOutcomeParam(v FunctionShellCallOutputTimeoutOutcomeParam) error

FromFunctionShellCallOutputTimeoutOutcomeParam overwrites any union data inside the FunctionShellCallOutputOutcomeParam as the provided FunctionShellCallOutputTimeoutOutcomeParam

func (FunctionShellCallOutputOutcomeParam) MarshalJSON

func (t FunctionShellCallOutputOutcomeParam) MarshalJSON() ([]byte, error)

func (*FunctionShellCallOutputOutcomeParam) MergeFunctionShellCallOutputExitOutcomeParam

func (t *FunctionShellCallOutputOutcomeParam) MergeFunctionShellCallOutputExitOutcomeParam(v FunctionShellCallOutputExitOutcomeParam) error

MergeFunctionShellCallOutputExitOutcomeParam performs a merge with any union data inside the FunctionShellCallOutputOutcomeParam, using the provided FunctionShellCallOutputExitOutcomeParam

func (*FunctionShellCallOutputOutcomeParam) MergeFunctionShellCallOutputTimeoutOutcomeParam

func (t *FunctionShellCallOutputOutcomeParam) MergeFunctionShellCallOutputTimeoutOutcomeParam(v FunctionShellCallOutputTimeoutOutcomeParam) error

MergeFunctionShellCallOutputTimeoutOutcomeParam performs a merge with any union data inside the FunctionShellCallOutputOutcomeParam, using the provided FunctionShellCallOutputTimeoutOutcomeParam

func (*FunctionShellCallOutputOutcomeParam) UnmarshalJSON

func (t *FunctionShellCallOutputOutcomeParam) UnmarshalJSON(b []byte) error

func (FunctionShellCallOutputOutcomeParam) ValueByDiscriminator

func (t FunctionShellCallOutputOutcomeParam) ValueByDiscriminator() (interface{}, error)

type FunctionShellCallOutputStatusEnum

type FunctionShellCallOutputStatusEnum string

FunctionShellCallOutputStatusEnum defines model for FunctionShellCallOutputStatusEnum.

const (
	FunctionShellCallOutputStatusEnumCompleted  FunctionShellCallOutputStatusEnum = "completed"
	FunctionShellCallOutputStatusEnumInProgress FunctionShellCallOutputStatusEnum = "in_progress"
	FunctionShellCallOutputStatusEnumIncomplete FunctionShellCallOutputStatusEnum = "incomplete"
)

Defines values for FunctionShellCallOutputStatusEnum.

func (FunctionShellCallOutputStatusEnum) Valid

Valid indicates whether the value is a known member of the FunctionShellCallOutputStatusEnum enum.

type FunctionShellCallOutputTimeoutOutcome

type FunctionShellCallOutputTimeoutOutcome struct {
	// Type The outcome type. Always `timeout`.
	Type FunctionShellCallOutputTimeoutOutcomeType `json:"type"`
}

FunctionShellCallOutputTimeoutOutcome Indicates that the shell call exceeded its configured time limit.

type FunctionShellCallOutputTimeoutOutcomeParam

type FunctionShellCallOutputTimeoutOutcomeParam struct {
	// Type The outcome type. Always `timeout`.
	Type FunctionShellCallOutputTimeoutOutcomeParamType `json:"type"`
}

FunctionShellCallOutputTimeoutOutcomeParam Indicates that the shell call exceeded its configured time limit.

type FunctionShellCallOutputTimeoutOutcomeParamType

type FunctionShellCallOutputTimeoutOutcomeParamType string

FunctionShellCallOutputTimeoutOutcomeParamType The outcome type. Always `timeout`.

const (
	FunctionShellCallOutputTimeoutOutcomeParamTypeTimeout FunctionShellCallOutputTimeoutOutcomeParamType = "timeout"
)

Defines values for FunctionShellCallOutputTimeoutOutcomeParamType.

func (FunctionShellCallOutputTimeoutOutcomeParamType) Valid

Valid indicates whether the value is a known member of the FunctionShellCallOutputTimeoutOutcomeParamType enum.

type FunctionShellCallOutputTimeoutOutcomeType

type FunctionShellCallOutputTimeoutOutcomeType string

FunctionShellCallOutputTimeoutOutcomeType The outcome type. Always `timeout`.

const (
	FunctionShellCallOutputTimeoutOutcomeTypeTimeout FunctionShellCallOutputTimeoutOutcomeType = "timeout"
)

Defines values for FunctionShellCallOutputTimeoutOutcomeType.

func (FunctionShellCallOutputTimeoutOutcomeType) Valid

Valid indicates whether the value is a known member of the FunctionShellCallOutputTimeoutOutcomeType enum.

type FunctionShellCallOutputType

type FunctionShellCallOutputType string

FunctionShellCallOutputType The type of the shell call output. Always `shell_call_output`.

const (
	FunctionShellCallOutputTypeShellCallOutput FunctionShellCallOutputType = "shell_call_output"
)

Defines values for FunctionShellCallOutputType.

func (FunctionShellCallOutputType) Valid

Valid indicates whether the value is a known member of the FunctionShellCallOutputType enum.

type FunctionShellCallStatus

type FunctionShellCallStatus string

FunctionShellCallStatus defines model for FunctionShellCallStatus.

const (
	FunctionShellCallStatusCompleted  FunctionShellCallStatus = "completed"
	FunctionShellCallStatusInProgress FunctionShellCallStatus = "in_progress"
	FunctionShellCallStatusIncomplete FunctionShellCallStatus = "incomplete"
)

Defines values for FunctionShellCallStatus.

func (FunctionShellCallStatus) Valid

func (e FunctionShellCallStatus) Valid() bool

Valid indicates whether the value is a known member of the FunctionShellCallStatus enum.

type FunctionShellCallType

type FunctionShellCallType string

FunctionShellCallType The type of the item. Always `shell_call`.

const (
	FunctionShellCallTypeShellCall FunctionShellCallType = "shell_call"
)

Defines values for FunctionShellCallType.

func (FunctionShellCallType) Valid

func (e FunctionShellCallType) Valid() bool

Valid indicates whether the value is a known member of the FunctionShellCallType enum.

type FunctionShellToolParam

type FunctionShellToolParam struct {
	AllowedCallers *[]CallableToolAllowedCaller `json:"allowed_callers,omitempty"`
	Environment    *struct {
		// contains filtered or unexported fields
	} `json:"environment,omitempty"`

	// Type The type of the shell tool. Always `shell`.
	Type FunctionShellToolParamType `json:"type"`
}

FunctionShellToolParam A tool that allows the model to execute shell commands.

type FunctionShellToolParamType

type FunctionShellToolParamType string

FunctionShellToolParamType The type of the shell tool. Always `shell`.

const (
	FunctionShellToolParamTypeShell FunctionShellToolParamType = "shell"
)

Defines values for FunctionShellToolParamType.

func (FunctionShellToolParamType) Valid

func (e FunctionShellToolParamType) Valid() bool

Valid indicates whether the value is a known member of the FunctionShellToolParamType enum.

type FunctionTool

type FunctionTool struct {
	AllowedCallers *[]CallableToolAllowedCaller `json:"allowed_callers,omitempty"`

	// DeferLoading Whether this function is deferred and loaded via tool search.
	DeferLoading *bool   `json:"defer_loading,omitempty"`
	Description  *string `json:"description,omitempty"`

	// Name The name of the function to call.
	Name         string                  `json:"name"`
	OutputSchema *map[string]interface{} `json:"output_schema,omitempty"`
	Parameters   *map[string]interface{} `json:"parameters"`
	Strict       *bool                   `json:"strict"`

	// Type The type of the function tool. Always `function`.
	Type FunctionToolType `json:"type"`
}

FunctionTool Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

type FunctionToolCall

type FunctionToolCall struct {
	// Arguments A JSON string of the arguments to pass to the function.
	Arguments string `json:"arguments"`

	// CallId The unique ID of the function tool call generated by the model.
	CallId string          `json:"call_id"`
	Caller *ToolCallCaller `json:"caller,omitempty"`

	// Id The unique ID of the function tool call.
	Id *string `json:"id,omitempty"`

	// Name The name of the function to run.
	Name string `json:"name"`

	// Namespace The namespace of the function to run.
	Namespace *string `json:"namespace,omitempty"`

	// Status The status of the item. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when items are returned via API.
	Status *FunctionToolCallStatus `json:"status,omitempty"`

	// Type The type of the function tool call. Always `function_call`.
	Type FunctionToolCallType `json:"type"`
}

FunctionToolCall A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information.

type FunctionToolCallOutput

type FunctionToolCallOutput struct {
	// CallId The unique ID of the function tool call generated by the model.
	CallId *string              `json:"call_id,omitempty"`
	Caller *ToolCallCallerParam `json:"caller,omitempty"`

	// Id The unique ID of the function tool call output. Populated when this item
	// is returned via API.
	Id *string `json:"id,omitempty"`

	// Name The name of the tool that produced the output.
	Name *string `json:"name,omitempty"`

	// Namespace The namespace of the tool that produced the output.
	Namespace *string `json:"namespace,omitempty"`

	// Output The output from the function call generated by your code.
	// Can be a string or an list of output content.
	Output FunctionToolCallOutput_Output `json:"output"`

	// Status The status of the item. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when items are returned via API.
	Status *FunctionToolCallOutputStatus `json:"status,omitempty"`

	// Type The type of the function tool call output. Always `function_call_output`.
	Type FunctionToolCallOutputType `json:"type"`
}

FunctionToolCallOutput The output of a function tool call.

type FunctionToolCallOutputOutput0

type FunctionToolCallOutputOutput0 = string

FunctionToolCallOutputOutput0 A string of the output of the function call.

type FunctionToolCallOutputOutput1

type FunctionToolCallOutputOutput1 = []FunctionAndCustomToolCallOutput

FunctionToolCallOutputOutput1 Text, image, or file output of the function call.

type FunctionToolCallOutputResource

type FunctionToolCallOutputResource struct {
	// CallId The unique ID of the function tool call generated by the model.
	CallId *string              `json:"call_id,omitempty"`
	Caller *ToolCallCallerParam `json:"caller,omitempty"`

	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// Id The unique ID of the function call tool output.
	Id string `json:"id"`

	// Name The name of the tool that produced the output.
	Name *string `json:"name,omitempty"`

	// Namespace The namespace of the tool that produced the output.
	Namespace *string `json:"namespace,omitempty"`

	// Output The output from the function call generated by your code.
	// Can be a string or an list of output content.
	Output FunctionToolCallOutputResource_Output `json:"output"`

	// Status The status of the item. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when items are returned via API.
	Status FunctionCallOutputStatusEnum `json:"status"`

	// Type The type of the function tool call output. Always `function_call_output`.
	Type FunctionToolCallOutputResourceType `json:"type"`
}

FunctionToolCallOutputResource defines model for FunctionToolCallOutputResource.

type FunctionToolCallOutputResourceOutput0

type FunctionToolCallOutputResourceOutput0 = string

FunctionToolCallOutputResourceOutput0 A string of the output of the function call.

type FunctionToolCallOutputResourceOutput1

type FunctionToolCallOutputResourceOutput1 = []FunctionAndCustomToolCallOutput

FunctionToolCallOutputResourceOutput1 Text, image, or file output of the function call.

type FunctionToolCallOutputResourceType

type FunctionToolCallOutputResourceType string

FunctionToolCallOutputResourceType The type of the function tool call output. Always `function_call_output`.

const (
	FunctionToolCallOutputResourceTypeFunctionCallOutput FunctionToolCallOutputResourceType = "function_call_output"
)

Defines values for FunctionToolCallOutputResourceType.

func (FunctionToolCallOutputResourceType) Valid

Valid indicates whether the value is a known member of the FunctionToolCallOutputResourceType enum.

type FunctionToolCallOutputResource_Output

type FunctionToolCallOutputResource_Output struct {
	// contains filtered or unexported fields
}

FunctionToolCallOutputResource_Output The output from the function call generated by your code. Can be a string or an list of output content.

func (FunctionToolCallOutputResource_Output) AsFunctionToolCallOutputResourceOutput0

func (t FunctionToolCallOutputResource_Output) AsFunctionToolCallOutputResourceOutput0() (FunctionToolCallOutputResourceOutput0, error)

AsFunctionToolCallOutputResourceOutput0 returns the union data inside the FunctionToolCallOutputResource_Output as a FunctionToolCallOutputResourceOutput0

func (FunctionToolCallOutputResource_Output) AsFunctionToolCallOutputResourceOutput1

func (t FunctionToolCallOutputResource_Output) AsFunctionToolCallOutputResourceOutput1() (FunctionToolCallOutputResourceOutput1, error)

AsFunctionToolCallOutputResourceOutput1 returns the union data inside the FunctionToolCallOutputResource_Output as a FunctionToolCallOutputResourceOutput1

func (*FunctionToolCallOutputResource_Output) FromFunctionToolCallOutputResourceOutput0

func (t *FunctionToolCallOutputResource_Output) FromFunctionToolCallOutputResourceOutput0(v FunctionToolCallOutputResourceOutput0) error

FromFunctionToolCallOutputResourceOutput0 overwrites any union data inside the FunctionToolCallOutputResource_Output as the provided FunctionToolCallOutputResourceOutput0

func (*FunctionToolCallOutputResource_Output) FromFunctionToolCallOutputResourceOutput1

func (t *FunctionToolCallOutputResource_Output) FromFunctionToolCallOutputResourceOutput1(v FunctionToolCallOutputResourceOutput1) error

FromFunctionToolCallOutputResourceOutput1 overwrites any union data inside the FunctionToolCallOutputResource_Output as the provided FunctionToolCallOutputResourceOutput1

func (FunctionToolCallOutputResource_Output) MarshalJSON

func (t FunctionToolCallOutputResource_Output) MarshalJSON() ([]byte, error)

func (*FunctionToolCallOutputResource_Output) MergeFunctionToolCallOutputResourceOutput0

func (t *FunctionToolCallOutputResource_Output) MergeFunctionToolCallOutputResourceOutput0(v FunctionToolCallOutputResourceOutput0) error

MergeFunctionToolCallOutputResourceOutput0 performs a merge with any union data inside the FunctionToolCallOutputResource_Output, using the provided FunctionToolCallOutputResourceOutput0

func (*FunctionToolCallOutputResource_Output) MergeFunctionToolCallOutputResourceOutput1

func (t *FunctionToolCallOutputResource_Output) MergeFunctionToolCallOutputResourceOutput1(v FunctionToolCallOutputResourceOutput1) error

MergeFunctionToolCallOutputResourceOutput1 performs a merge with any union data inside the FunctionToolCallOutputResource_Output, using the provided FunctionToolCallOutputResourceOutput1

func (*FunctionToolCallOutputResource_Output) UnmarshalJSON

func (t *FunctionToolCallOutputResource_Output) UnmarshalJSON(b []byte) error

type FunctionToolCallOutputStatus

type FunctionToolCallOutputStatus string

FunctionToolCallOutputStatus The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

const (
	FunctionToolCallOutputStatusCompleted  FunctionToolCallOutputStatus = "completed"
	FunctionToolCallOutputStatusInProgress FunctionToolCallOutputStatus = "in_progress"
	FunctionToolCallOutputStatusIncomplete FunctionToolCallOutputStatus = "incomplete"
)

Defines values for FunctionToolCallOutputStatus.

func (FunctionToolCallOutputStatus) Valid

Valid indicates whether the value is a known member of the FunctionToolCallOutputStatus enum.

type FunctionToolCallOutputType

type FunctionToolCallOutputType string

FunctionToolCallOutputType The type of the function tool call output. Always `function_call_output`.

const (
	FunctionToolCallOutputTypeFunctionCallOutput FunctionToolCallOutputType = "function_call_output"
)

Defines values for FunctionToolCallOutputType.

func (FunctionToolCallOutputType) Valid

func (e FunctionToolCallOutputType) Valid() bool

Valid indicates whether the value is a known member of the FunctionToolCallOutputType enum.

type FunctionToolCallOutput_Output

type FunctionToolCallOutput_Output struct {
	// contains filtered or unexported fields
}

FunctionToolCallOutput_Output The output from the function call generated by your code. Can be a string or an list of output content.

func (FunctionToolCallOutput_Output) AsFunctionToolCallOutputOutput0

func (t FunctionToolCallOutput_Output) AsFunctionToolCallOutputOutput0() (FunctionToolCallOutputOutput0, error)

AsFunctionToolCallOutputOutput0 returns the union data inside the FunctionToolCallOutput_Output as a FunctionToolCallOutputOutput0

func (FunctionToolCallOutput_Output) AsFunctionToolCallOutputOutput1

func (t FunctionToolCallOutput_Output) AsFunctionToolCallOutputOutput1() (FunctionToolCallOutputOutput1, error)

AsFunctionToolCallOutputOutput1 returns the union data inside the FunctionToolCallOutput_Output as a FunctionToolCallOutputOutput1

func (*FunctionToolCallOutput_Output) FromFunctionToolCallOutputOutput0

func (t *FunctionToolCallOutput_Output) FromFunctionToolCallOutputOutput0(v FunctionToolCallOutputOutput0) error

FromFunctionToolCallOutputOutput0 overwrites any union data inside the FunctionToolCallOutput_Output as the provided FunctionToolCallOutputOutput0

func (*FunctionToolCallOutput_Output) FromFunctionToolCallOutputOutput1

func (t *FunctionToolCallOutput_Output) FromFunctionToolCallOutputOutput1(v FunctionToolCallOutputOutput1) error

FromFunctionToolCallOutputOutput1 overwrites any union data inside the FunctionToolCallOutput_Output as the provided FunctionToolCallOutputOutput1

func (FunctionToolCallOutput_Output) MarshalJSON

func (t FunctionToolCallOutput_Output) MarshalJSON() ([]byte, error)

func (*FunctionToolCallOutput_Output) MergeFunctionToolCallOutputOutput0

func (t *FunctionToolCallOutput_Output) MergeFunctionToolCallOutputOutput0(v FunctionToolCallOutputOutput0) error

MergeFunctionToolCallOutputOutput0 performs a merge with any union data inside the FunctionToolCallOutput_Output, using the provided FunctionToolCallOutputOutput0

func (*FunctionToolCallOutput_Output) MergeFunctionToolCallOutputOutput1

func (t *FunctionToolCallOutput_Output) MergeFunctionToolCallOutputOutput1(v FunctionToolCallOutputOutput1) error

MergeFunctionToolCallOutputOutput1 performs a merge with any union data inside the FunctionToolCallOutput_Output, using the provided FunctionToolCallOutputOutput1

func (*FunctionToolCallOutput_Output) UnmarshalJSON

func (t *FunctionToolCallOutput_Output) UnmarshalJSON(b []byte) error

type FunctionToolCallStatus

type FunctionToolCallStatus string

FunctionToolCallStatus The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

const (
	FunctionToolCallStatusCompleted  FunctionToolCallStatus = "completed"
	FunctionToolCallStatusInProgress FunctionToolCallStatus = "in_progress"
	FunctionToolCallStatusIncomplete FunctionToolCallStatus = "incomplete"
)

Defines values for FunctionToolCallStatus.

func (FunctionToolCallStatus) Valid

func (e FunctionToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the FunctionToolCallStatus enum.

type FunctionToolCallType

type FunctionToolCallType string

FunctionToolCallType The type of the function tool call. Always `function_call`.

const (
	FunctionCall FunctionToolCallType = "function_call"
)

Defines values for FunctionToolCallType.

func (FunctionToolCallType) Valid

func (e FunctionToolCallType) Valid() bool

Valid indicates whether the value is a known member of the FunctionToolCallType enum.

type FunctionToolParam

type FunctionToolParam struct {
	AllowedCallers *[]CallableToolAllowedCaller `json:"allowed_callers,omitempty"`

	// DeferLoading Whether this function should be deferred and discovered via tool search.
	DeferLoading *bool                   `json:"defer_loading,omitempty"`
	Description  *string                 `json:"description,omitempty"`
	Name         string                  `json:"name"`
	OutputSchema *map[string]interface{} `json:"output_schema,omitempty"`
	Parameters   *EmptyModelParam        `json:"parameters,omitempty"`
	Strict       *bool                   `json:"strict,omitempty"`
	Type         FunctionToolParamType   `json:"type"`
}

FunctionToolParam defines model for FunctionToolParam.

type FunctionToolParamType

type FunctionToolParamType string

FunctionToolParamType defines model for FunctionToolParam.Type.

const (
	FunctionToolParamTypeFunction FunctionToolParamType = "function"
)

Defines values for FunctionToolParamType.

func (FunctionToolParamType) Valid

func (e FunctionToolParamType) Valid() bool

Valid indicates whether the value is a known member of the FunctionToolParamType enum.

type FunctionToolType

type FunctionToolType string

FunctionToolType The type of the function tool. Always `function`.

const (
	FunctionToolTypeFunction FunctionToolType = "function"
)

Defines values for FunctionToolType.

func (FunctionToolType) Valid

func (e FunctionToolType) Valid() bool

Valid indicates whether the value is a known member of the FunctionToolType enum.

type GrammarSyntax1

type GrammarSyntax1 string

GrammarSyntax1 defines model for GrammarSyntax1.

const (
	Lark  GrammarSyntax1 = "lark"
	Regex GrammarSyntax1 = "regex"
)

Defines values for GrammarSyntax1.

func (GrammarSyntax1) Valid

func (e GrammarSyntax1) Valid() bool

Valid indicates whether the value is a known member of the GrammarSyntax1 enum.

type HybridSearchOptions

type HybridSearchOptions struct {
	// EmbeddingWeight The weight of the embedding in the reciprocal ranking fusion.
	EmbeddingWeight float32 `json:"embedding_weight"`

	// TextWeight The weight of the text in the reciprocal ranking fusion.
	TextWeight float32 `json:"text_weight"`
}

HybridSearchOptions defines model for HybridSearchOptions.

type ImageDetail

type ImageDetail string

ImageDetail defines model for ImageDetail.

const (
	ImageDetailAuto     ImageDetail = "auto"
	ImageDetailHigh     ImageDetail = "high"
	ImageDetailLow      ImageDetail = "low"
	ImageDetailOriginal ImageDetail = "original"
)

Defines values for ImageDetail.

func (ImageDetail) Valid

func (e ImageDetail) Valid() bool

Valid indicates whether the value is a known member of the ImageDetail enum.

type ImageGenActionEnum

type ImageGenActionEnum string

ImageGenActionEnum defines model for ImageGenActionEnum.

const (
	ImageGenActionEnumAuto     ImageGenActionEnum = "auto"
	ImageGenActionEnumEdit     ImageGenActionEnum = "edit"
	ImageGenActionEnumGenerate ImageGenActionEnum = "generate"
)

Defines values for ImageGenActionEnum.

func (ImageGenActionEnum) Valid

func (e ImageGenActionEnum) Valid() bool

Valid indicates whether the value is a known member of the ImageGenActionEnum enum.

type ImageGenTool

type ImageGenTool struct {
	// Action Whether to generate a new image or edit an existing image. Default: `auto`.
	Action *ImageGenActionEnum `json:"action,omitempty"`

	// Background Background type for the generated image. One of `transparent`,
	// `opaque`, or `auto`. Default: `auto`.
	Background    *ImageGenToolBackground `json:"background,omitempty"`
	InputFidelity *InputFidelity          `json:"input_fidelity,omitempty"`

	// InputImageMask Optional mask for inpainting. Contains `image_url`
	// (string, optional) and `file_id` (string, optional).
	InputImageMask *struct {
		// FileId File ID for the mask image.
		FileId *string `json:"file_id,omitempty"`

		// ImageUrl Base64-encoded mask image.
		ImageUrl *string `json:"image_url,omitempty"`
	} `json:"input_image_mask,omitempty"`
	Model *ImageGenTool_Model `json:"model,omitempty"`

	// Moderation Moderation level for the generated image. Default: `auto`.
	Moderation *ImageGenToolModeration `json:"moderation,omitempty"`

	// OutputCompression Compression level for the output image. Default: 100.
	OutputCompression *int `json:"output_compression,omitempty"`

	// OutputFormat The output format of the generated image. One of `png`, `webp`, or
	// `jpeg`. Default: `png`.
	OutputFormat *ImageGenToolOutputFormat `json:"output_format,omitempty"`

	// PartialImages Number of partial images to generate in streaming mode, from 0 (default value) to 3.
	PartialImages *int `json:"partial_images,omitempty"`

	// Quality The quality of the generated image. One of `low`, `medium`, `high`,
	// or `auto`. Default: `auto`.
	Quality *ImageGenToolQuality `json:"quality,omitempty"`

	// Size The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
	Size *ImageGenTool_Size `json:"size,omitempty"`

	// Type The type of the image generation tool. Always `image_generation`.
	Type ImageGenToolType `json:"type"`
}

ImageGenTool A tool that generates images using the GPT image models.

type ImageGenToolBackground

type ImageGenToolBackground string

ImageGenToolBackground Background type for the generated image. One of `transparent`, `opaque`, or `auto`. Default: `auto`.

const (
	ImageGenToolBackgroundAuto        ImageGenToolBackground = "auto"
	ImageGenToolBackgroundOpaque      ImageGenToolBackground = "opaque"
	ImageGenToolBackgroundTransparent ImageGenToolBackground = "transparent"
)

Defines values for ImageGenToolBackground.

func (ImageGenToolBackground) Valid

func (e ImageGenToolBackground) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolBackground enum.

type ImageGenToolCall

type ImageGenToolCall struct {
	// Id The unique ID of the image generation call.
	Id     string  `json:"id"`
	Result *string `json:"result"`

	// Status The status of the image generation call.
	Status ImageGenToolCallStatus `json:"status"`

	// Type The type of the image generation call. Always `image_generation_call`.
	Type ImageGenToolCallType `json:"type"`
}

ImageGenToolCall An image generation request made by the model.

type ImageGenToolCallStatus

type ImageGenToolCallStatus string

ImageGenToolCallStatus The status of the image generation call.

const (
	ImageGenToolCallStatusCompleted  ImageGenToolCallStatus = "completed"
	ImageGenToolCallStatusFailed     ImageGenToolCallStatus = "failed"
	ImageGenToolCallStatusGenerating ImageGenToolCallStatus = "generating"
	ImageGenToolCallStatusInProgress ImageGenToolCallStatus = "in_progress"
)

Defines values for ImageGenToolCallStatus.

func (ImageGenToolCallStatus) Valid

func (e ImageGenToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolCallStatus enum.

type ImageGenToolCallType

type ImageGenToolCallType string

ImageGenToolCallType The type of the image generation call. Always `image_generation_call`.

const (
	ImageGenerationCall ImageGenToolCallType = "image_generation_call"
)

Defines values for ImageGenToolCallType.

func (ImageGenToolCallType) Valid

func (e ImageGenToolCallType) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolCallType enum.

type ImageGenToolModel0

type ImageGenToolModel0 = string

ImageGenToolModel0 defines model for ImageGenTool.Model.0.

type ImageGenToolModel1

type ImageGenToolModel1 string

ImageGenToolModel1 The image generation model to use. Default: `gpt-image-1`.

const (
	GptImage1     ImageGenToolModel1 = "gpt-image-1"
	GptImage15    ImageGenToolModel1 = "gpt-image-1.5"
	GptImage1Mini ImageGenToolModel1 = "gpt-image-1-mini"
)

Defines values for ImageGenToolModel1.

func (ImageGenToolModel1) Valid

func (e ImageGenToolModel1) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolModel1 enum.

type ImageGenToolModeration

type ImageGenToolModeration string

ImageGenToolModeration Moderation level for the generated image. Default: `auto`.

const (
	ImageGenToolModerationAuto ImageGenToolModeration = "auto"
	ImageGenToolModerationLow  ImageGenToolModeration = "low"
)

Defines values for ImageGenToolModeration.

func (ImageGenToolModeration) Valid

func (e ImageGenToolModeration) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolModeration enum.

type ImageGenToolOutputFormat

type ImageGenToolOutputFormat string

ImageGenToolOutputFormat The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.

const (
	Jpeg ImageGenToolOutputFormat = "jpeg"
	Png  ImageGenToolOutputFormat = "png"
	Webp ImageGenToolOutputFormat = "webp"
)

Defines values for ImageGenToolOutputFormat.

func (ImageGenToolOutputFormat) Valid

func (e ImageGenToolOutputFormat) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolOutputFormat enum.

type ImageGenToolQuality

type ImageGenToolQuality string

ImageGenToolQuality The quality of the generated image. One of `low`, `medium`, `high`, or `auto`. Default: `auto`.

const (
	ImageGenToolQualityAuto   ImageGenToolQuality = "auto"
	ImageGenToolQualityHigh   ImageGenToolQuality = "high"
	ImageGenToolQualityLow    ImageGenToolQuality = "low"
	ImageGenToolQualityMedium ImageGenToolQuality = "medium"
)

Defines values for ImageGenToolQuality.

func (ImageGenToolQuality) Valid

func (e ImageGenToolQuality) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolQuality enum.

type ImageGenToolSize0

type ImageGenToolSize0 = string

ImageGenToolSize0 defines model for ImageGenTool.Size.0.

type ImageGenToolSize1

type ImageGenToolSize1 string

ImageGenToolSize1 defines model for ImageGenTool.Size.1.

const (
	ImageGenToolSize1Auto       ImageGenToolSize1 = "auto"
	ImageGenToolSize1N1024x1024 ImageGenToolSize1 = "1024x1024"
	ImageGenToolSize1N1024x1536 ImageGenToolSize1 = "1024x1536"
	ImageGenToolSize1N1536x1024 ImageGenToolSize1 = "1536x1024"
)

Defines values for ImageGenToolSize1.

func (ImageGenToolSize1) Valid

func (e ImageGenToolSize1) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolSize1 enum.

type ImageGenToolType

type ImageGenToolType string

ImageGenToolType The type of the image generation tool. Always `image_generation`.

const (
	ImageGenToolTypeImageGeneration ImageGenToolType = "image_generation"
)

Defines values for ImageGenToolType.

func (ImageGenToolType) Valid

func (e ImageGenToolType) Valid() bool

Valid indicates whether the value is a known member of the ImageGenToolType enum.

type ImageGenTool_Model

type ImageGenTool_Model struct {
	// contains filtered or unexported fields
}

ImageGenTool_Model defines model for ImageGenTool.Model.

func (ImageGenTool_Model) AsImageGenToolModel0

func (t ImageGenTool_Model) AsImageGenToolModel0() (ImageGenToolModel0, error)

AsImageGenToolModel0 returns the union data inside the ImageGenTool_Model as a ImageGenToolModel0

func (ImageGenTool_Model) AsImageGenToolModel1

func (t ImageGenTool_Model) AsImageGenToolModel1() (ImageGenToolModel1, error)

AsImageGenToolModel1 returns the union data inside the ImageGenTool_Model as a ImageGenToolModel1

func (*ImageGenTool_Model) FromImageGenToolModel0

func (t *ImageGenTool_Model) FromImageGenToolModel0(v ImageGenToolModel0) error

FromImageGenToolModel0 overwrites any union data inside the ImageGenTool_Model as the provided ImageGenToolModel0

func (*ImageGenTool_Model) FromImageGenToolModel1

func (t *ImageGenTool_Model) FromImageGenToolModel1(v ImageGenToolModel1) error

FromImageGenToolModel1 overwrites any union data inside the ImageGenTool_Model as the provided ImageGenToolModel1

func (ImageGenTool_Model) MarshalJSON

func (t ImageGenTool_Model) MarshalJSON() ([]byte, error)

func (*ImageGenTool_Model) MergeImageGenToolModel0

func (t *ImageGenTool_Model) MergeImageGenToolModel0(v ImageGenToolModel0) error

MergeImageGenToolModel0 performs a merge with any union data inside the ImageGenTool_Model, using the provided ImageGenToolModel0

func (*ImageGenTool_Model) MergeImageGenToolModel1

func (t *ImageGenTool_Model) MergeImageGenToolModel1(v ImageGenToolModel1) error

MergeImageGenToolModel1 performs a merge with any union data inside the ImageGenTool_Model, using the provided ImageGenToolModel1

func (*ImageGenTool_Model) UnmarshalJSON

func (t *ImageGenTool_Model) UnmarshalJSON(b []byte) error

type ImageGenTool_Size

type ImageGenTool_Size struct {
	// contains filtered or unexported fields
}

ImageGenTool_Size The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

func (ImageGenTool_Size) AsImageGenToolSize0

func (t ImageGenTool_Size) AsImageGenToolSize0() (ImageGenToolSize0, error)

AsImageGenToolSize0 returns the union data inside the ImageGenTool_Size as a ImageGenToolSize0

func (ImageGenTool_Size) AsImageGenToolSize1

func (t ImageGenTool_Size) AsImageGenToolSize1() (ImageGenToolSize1, error)

AsImageGenToolSize1 returns the union data inside the ImageGenTool_Size as a ImageGenToolSize1

func (*ImageGenTool_Size) FromImageGenToolSize0

func (t *ImageGenTool_Size) FromImageGenToolSize0(v ImageGenToolSize0) error

FromImageGenToolSize0 overwrites any union data inside the ImageGenTool_Size as the provided ImageGenToolSize0

func (*ImageGenTool_Size) FromImageGenToolSize1

func (t *ImageGenTool_Size) FromImageGenToolSize1(v ImageGenToolSize1) error

FromImageGenToolSize1 overwrites any union data inside the ImageGenTool_Size as the provided ImageGenToolSize1

func (ImageGenTool_Size) MarshalJSON

func (t ImageGenTool_Size) MarshalJSON() ([]byte, error)

func (*ImageGenTool_Size) MergeImageGenToolSize0

func (t *ImageGenTool_Size) MergeImageGenToolSize0(v ImageGenToolSize0) error

MergeImageGenToolSize0 performs a merge with any union data inside the ImageGenTool_Size, using the provided ImageGenToolSize0

func (*ImageGenTool_Size) MergeImageGenToolSize1

func (t *ImageGenTool_Size) MergeImageGenToolSize1(v ImageGenToolSize1) error

MergeImageGenToolSize1 performs a merge with any union data inside the ImageGenTool_Size, using the provided ImageGenToolSize1

func (*ImageGenTool_Size) UnmarshalJSON

func (t *ImageGenTool_Size) UnmarshalJSON(b []byte) error

type IncludeEnum

type IncludeEnum string

IncludeEnum Specify additional output data to include in the model response. Currently supported values are: - `web_search_call.results`: Include the search results of the web search tool call. - `web_search_call.action.sources`: Include the sources of the web search tool call. - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items. - `computer_call_output.output.image_url`: Include image urls from the computer call output. - `file_search_call.results`: Include the search results of the file search tool call. - `message.input_image.image_url`: Include image urls from the input message. - `message.output_text.logprobs`: Include logprobs with assistant messages. - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).

const (
	CodeInterpreterCallOutputs       IncludeEnum = "code_interpreter_call.outputs"
	ComputerCallOutputOutputImageUrl IncludeEnum = "computer_call_output.output.image_url"
	FileSearchCallResults            IncludeEnum = "file_search_call.results"
	MessageInputImageImageUrl        IncludeEnum = "message.input_image.image_url"
	MessageOutputTextLogprobs        IncludeEnum = "message.output_text.logprobs"
	ReasoningEncryptedContent        IncludeEnum = "reasoning.encrypted_content"
	WebSearchCallActionSources       IncludeEnum = "web_search_call.action.sources"
	WebSearchCallResults             IncludeEnum = "web_search_call.results"
)

Defines values for IncludeEnum.

func (IncludeEnum) Valid

func (e IncludeEnum) Valid() bool

Valid indicates whether the value is a known member of the IncludeEnum enum.

type InlineSkillParam

type InlineSkillParam struct {
	// Description The description of the skill.
	Description string `json:"description"`

	// Name The name of the skill.
	Name string `json:"name"`

	// Source Inline skill payload
	Source InlineSkillSourceParam `json:"source"`

	// Type Defines an inline skill for this request.
	Type InlineSkillParamType `json:"type"`
}

InlineSkillParam defines model for InlineSkillParam.

type InlineSkillParamType

type InlineSkillParamType string

InlineSkillParamType Defines an inline skill for this request.

const (
	Inline InlineSkillParamType = "inline"
)

Defines values for InlineSkillParamType.

func (InlineSkillParamType) Valid

func (e InlineSkillParamType) Valid() bool

Valid indicates whether the value is a known member of the InlineSkillParamType enum.

type InlineSkillSourceParam

type InlineSkillSourceParam struct {
	// Data Base64-encoded skill zip bundle.
	Data string `json:"data"`

	// MediaType The media type of the inline skill payload. Must be `application/zip`.
	MediaType InlineSkillSourceParamMediaType `json:"media_type"`

	// Type The type of the inline skill source. Must be `base64`.
	Type InlineSkillSourceParamType `json:"type"`
}

InlineSkillSourceParam Inline skill payload

type InlineSkillSourceParamMediaType

type InlineSkillSourceParamMediaType string

InlineSkillSourceParamMediaType The media type of the inline skill payload. Must be `application/zip`.

const (
	Applicationzip InlineSkillSourceParamMediaType = "application/zip"
)

Defines values for InlineSkillSourceParamMediaType.

func (InlineSkillSourceParamMediaType) Valid

Valid indicates whether the value is a known member of the InlineSkillSourceParamMediaType enum.

type InlineSkillSourceParamType

type InlineSkillSourceParamType string

InlineSkillSourceParamType The type of the inline skill source. Must be `base64`.

const (
	Base64 InlineSkillSourceParamType = "base64"
)

Defines values for InlineSkillSourceParamType.

func (InlineSkillSourceParamType) Valid

func (e InlineSkillSourceParamType) Valid() bool

Valid indicates whether the value is a known member of the InlineSkillSourceParamType enum.

type InputContent

type InputContent struct {
	// contains filtered or unexported fields
}

InputContent defines model for InputContent.

func (InputContent) AsInputFileContent

func (t InputContent) AsInputFileContent() (InputFileContent, error)

AsInputFileContent returns the union data inside the InputContent as a InputFileContent

func (InputContent) AsInputImageContent

func (t InputContent) AsInputImageContent() (InputImageContent, error)

AsInputImageContent returns the union data inside the InputContent as a InputImageContent

func (InputContent) AsInputTextContent

func (t InputContent) AsInputTextContent() (InputTextContent, error)

AsInputTextContent returns the union data inside the InputContent as a InputTextContent

func (InputContent) Discriminator

func (t InputContent) Discriminator() (string, error)

func (*InputContent) FromInputFileContent

func (t *InputContent) FromInputFileContent(v InputFileContent) error

FromInputFileContent overwrites any union data inside the InputContent as the provided InputFileContent

func (*InputContent) FromInputImageContent

func (t *InputContent) FromInputImageContent(v InputImageContent) error

FromInputImageContent overwrites any union data inside the InputContent as the provided InputImageContent

func (*InputContent) FromInputTextContent

func (t *InputContent) FromInputTextContent(v InputTextContent) error

FromInputTextContent overwrites any union data inside the InputContent as the provided InputTextContent

func (InputContent) MarshalJSON

func (t InputContent) MarshalJSON() ([]byte, error)

func (*InputContent) MergeInputFileContent

func (t *InputContent) MergeInputFileContent(v InputFileContent) error

MergeInputFileContent performs a merge with any union data inside the InputContent, using the provided InputFileContent

func (*InputContent) MergeInputImageContent

func (t *InputContent) MergeInputImageContent(v InputImageContent) error

MergeInputImageContent performs a merge with any union data inside the InputContent, using the provided InputImageContent

func (*InputContent) MergeInputTextContent

func (t *InputContent) MergeInputTextContent(v InputTextContent) error

MergeInputTextContent performs a merge with any union data inside the InputContent, using the provided InputTextContent

func (*InputContent) UnmarshalJSON

func (t *InputContent) UnmarshalJSON(b []byte) error

func (InputContent) ValueByDiscriminator

func (t InputContent) ValueByDiscriminator() (interface{}, error)

type InputFidelity

type InputFidelity string

InputFidelity Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

const (
	InputFidelityHigh InputFidelity = "high"
	InputFidelityLow  InputFidelity = "low"
)

Defines values for InputFidelity.

func (InputFidelity) Valid

func (e InputFidelity) Valid() bool

Valid indicates whether the value is a known member of the InputFidelity enum.

type InputFileContent

type InputFileContent struct {
	// Detail The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.
	Detail *FileInputDetail `json:"detail,omitempty"`

	// FileData The content of the file to be sent to the model.
	FileData *string `json:"file_data,omitempty"`
	FileId   *string `json:"file_id,omitempty"`

	// FileUrl The URL of the file to be sent to the model.
	FileUrl *string `json:"file_url,omitempty"`

	// Filename The name of the file to be sent to the model.
	Filename *string `json:"filename,omitempty"`

	// PromptCacheBreakpoint Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
	PromptCacheBreakpoint *PromptCacheBreakpointConfig `json:"prompt_cache_breakpoint,omitempty"`

	// Type The type of the input item. Always `input_file`.
	Type InputFileContentType `json:"type"`
}

InputFileContent A file input to the model.

type InputFileContentParam

type InputFileContentParam struct {
	// Detail The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.
	Detail                *FileDetailEnum             `json:"detail,omitempty"`
	FileData              *string                     `json:"file_data,omitempty"`
	FileId                *string                     `json:"file_id,omitempty"`
	FileUrl               *string                     `json:"file_url,omitempty"`
	Filename              *string                     `json:"filename,omitempty"`
	PromptCacheBreakpoint *PromptCacheBreakpointParam `json:"prompt_cache_breakpoint,omitempty"`

	// Type The type of the input item. Always `input_file`.
	Type InputFileContentParamType `json:"type"`
}

InputFileContentParam A file input to the model.

type InputFileContentParamType

type InputFileContentParamType string

InputFileContentParamType The type of the input item. Always `input_file`.

const (
	InputFileContentParamTypeInputFile InputFileContentParamType = "input_file"
)

Defines values for InputFileContentParamType.

func (InputFileContentParamType) Valid

func (e InputFileContentParamType) Valid() bool

Valid indicates whether the value is a known member of the InputFileContentParamType enum.

type InputFileContentType

type InputFileContentType string

InputFileContentType The type of the input item. Always `input_file`.

const (
	InputFileContentTypeInputFile InputFileContentType = "input_file"
)

Defines values for InputFileContentType.

func (InputFileContentType) Valid

func (e InputFileContentType) Valid() bool

Valid indicates whether the value is a known member of the InputFileContentType enum.

type InputImageContent

type InputImageContent struct {
	// Detail The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
	Detail   ImageDetail `json:"detail"`
	FileId   *string     `json:"file_id,omitempty"`
	ImageUrl *string     `json:"image_url,omitempty"`

	// PromptCacheBreakpoint Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
	PromptCacheBreakpoint *PromptCacheBreakpointConfig `json:"prompt_cache_breakpoint,omitempty"`

	// Type The type of the input item. Always `input_image`.
	Type InputImageContentType `json:"type"`
}

InputImageContent An image input to the model. Learn about [image inputs](/docs/guides/vision).

type InputImageContentParamAutoParam

type InputImageContentParamAutoParam struct {
	Detail                *DetailEnum                 `json:"detail,omitempty"`
	FileId                *string                     `json:"file_id,omitempty"`
	ImageUrl              *string                     `json:"image_url,omitempty"`
	PromptCacheBreakpoint *PromptCacheBreakpointParam `json:"prompt_cache_breakpoint,omitempty"`

	// Type The type of the input item. Always `input_image`.
	Type InputImageContentParamAutoParamType `json:"type"`
}

InputImageContentParamAutoParam An image input to the model. Learn about [image inputs](/docs/guides/vision)

type InputImageContentParamAutoParamType

type InputImageContentParamAutoParamType string

InputImageContentParamAutoParamType The type of the input item. Always `input_image`.

const (
	InputImageContentParamAutoParamTypeInputImage InputImageContentParamAutoParamType = "input_image"
)

Defines values for InputImageContentParamAutoParamType.

func (InputImageContentParamAutoParamType) Valid

Valid indicates whether the value is a known member of the InputImageContentParamAutoParamType enum.

type InputImageContentType

type InputImageContentType string

InputImageContentType The type of the input item. Always `input_image`.

const (
	InputImageContentTypeInputImage InputImageContentType = "input_image"
)

Defines values for InputImageContentType.

func (InputImageContentType) Valid

func (e InputImageContentType) Valid() bool

Valid indicates whether the value is a known member of the InputImageContentType enum.

type InputItem

type InputItem struct {
	// contains filtered or unexported fields
}

InputItem defines model for InputItem.

func (InputItem) AsCompactionTriggerItemParam

func (t InputItem) AsCompactionTriggerItemParam() (CompactionTriggerItemParam, error)

AsCompactionTriggerItemParam returns the union data inside the InputItem as a CompactionTriggerItemParam

func (InputItem) AsEasyInputMessage

func (t InputItem) AsEasyInputMessage() (EasyInputMessage, error)

AsEasyInputMessage returns the union data inside the InputItem as a EasyInputMessage

func (InputItem) AsItem

func (t InputItem) AsItem() (Item, error)

AsItem returns the union data inside the InputItem as a Item

func (InputItem) AsItemReferenceParam

func (t InputItem) AsItemReferenceParam() (ItemReferenceParam, error)

AsItemReferenceParam returns the union data inside the InputItem as a ItemReferenceParam

func (InputItem) AsProgramItemParam

func (t InputItem) AsProgramItemParam() (ProgramItemParam, error)

AsProgramItemParam returns the union data inside the InputItem as a ProgramItemParam

func (InputItem) AsProgramOutputItemParam

func (t InputItem) AsProgramOutputItemParam() (ProgramOutputItemParam, error)

AsProgramOutputItemParam returns the union data inside the InputItem as a ProgramOutputItemParam

func (InputItem) Discriminator

func (t InputItem) Discriminator() (string, error)

func (*InputItem) FromCompactionTriggerItemParam

func (t *InputItem) FromCompactionTriggerItemParam(v CompactionTriggerItemParam) error

FromCompactionTriggerItemParam overwrites any union data inside the InputItem as the provided CompactionTriggerItemParam

func (*InputItem) FromEasyInputMessage

func (t *InputItem) FromEasyInputMessage(v EasyInputMessage) error

FromEasyInputMessage overwrites any union data inside the InputItem as the provided EasyInputMessage

func (*InputItem) FromItem

func (t *InputItem) FromItem(v Item) error

FromItem overwrites any union data inside the InputItem as the provided Item

func (*InputItem) FromItemReferenceParam

func (t *InputItem) FromItemReferenceParam(v ItemReferenceParam) error

FromItemReferenceParam overwrites any union data inside the InputItem as the provided ItemReferenceParam

func (*InputItem) FromProgramItemParam

func (t *InputItem) FromProgramItemParam(v ProgramItemParam) error

FromProgramItemParam overwrites any union data inside the InputItem as the provided ProgramItemParam

func (*InputItem) FromProgramOutputItemParam

func (t *InputItem) FromProgramOutputItemParam(v ProgramOutputItemParam) error

FromProgramOutputItemParam overwrites any union data inside the InputItem as the provided ProgramOutputItemParam

func (InputItem) MarshalJSON

func (t InputItem) MarshalJSON() ([]byte, error)

func (*InputItem) MergeCompactionTriggerItemParam

func (t *InputItem) MergeCompactionTriggerItemParam(v CompactionTriggerItemParam) error

MergeCompactionTriggerItemParam performs a merge with any union data inside the InputItem, using the provided CompactionTriggerItemParam

func (*InputItem) MergeEasyInputMessage

func (t *InputItem) MergeEasyInputMessage(v EasyInputMessage) error

MergeEasyInputMessage performs a merge with any union data inside the InputItem, using the provided EasyInputMessage

func (*InputItem) MergeItem

func (t *InputItem) MergeItem(v Item) error

MergeItem performs a merge with any union data inside the InputItem, using the provided Item

func (*InputItem) MergeItemReferenceParam

func (t *InputItem) MergeItemReferenceParam(v ItemReferenceParam) error

MergeItemReferenceParam performs a merge with any union data inside the InputItem, using the provided ItemReferenceParam

func (*InputItem) MergeProgramItemParam

func (t *InputItem) MergeProgramItemParam(v ProgramItemParam) error

MergeProgramItemParam performs a merge with any union data inside the InputItem, using the provided ProgramItemParam

func (*InputItem) MergeProgramOutputItemParam

func (t *InputItem) MergeProgramOutputItemParam(v ProgramOutputItemParam) error

MergeProgramOutputItemParam performs a merge with any union data inside the InputItem, using the provided ProgramOutputItemParam

func (*InputItem) UnmarshalJSON

func (t *InputItem) UnmarshalJSON(b []byte) error

func (InputItem) ValueByDiscriminator

func (t InputItem) ValueByDiscriminator() (interface{}, error)

type InputMessage

type InputMessage struct {
	// Content A list of one or many input items to the model, containing different content
	// types.
	Content InputMessageContentList `json:"content"`

	// Role The role of the message input. One of `user`, `system`, or `developer`.
	Role InputMessageRole `json:"role"`

	// Status The status of item. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when items are returned via API.
	Status *InputMessageStatus `json:"status,omitempty"`

	// Type The type of the message input. Always set to `message`.
	Type *InputMessageType `json:"type,omitempty"`
}

InputMessage A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role.

type InputMessageContentList

type InputMessageContentList = []InputContent

InputMessageContentList A list of one or many input items to the model, containing different content types.

type InputMessageRole

type InputMessageRole string

InputMessageRole The role of the message input. One of `user`, `system`, or `developer`.

const (
	InputMessageRoleDeveloper InputMessageRole = "developer"
	InputMessageRoleSystem    InputMessageRole = "system"
	InputMessageRoleUser      InputMessageRole = "user"
)

Defines values for InputMessageRole.

func (InputMessageRole) Valid

func (e InputMessageRole) Valid() bool

Valid indicates whether the value is a known member of the InputMessageRole enum.

type InputMessageStatus

type InputMessageStatus string

InputMessageStatus The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

const (
	InputMessageStatusCompleted  InputMessageStatus = "completed"
	InputMessageStatusInProgress InputMessageStatus = "in_progress"
	InputMessageStatusIncomplete InputMessageStatus = "incomplete"
)

Defines values for InputMessageStatus.

func (InputMessageStatus) Valid

func (e InputMessageStatus) Valid() bool

Valid indicates whether the value is a known member of the InputMessageStatus enum.

type InputMessageType

type InputMessageType string

InputMessageType The type of the message input. Always set to `message`.

const (
	InputMessageTypeMessage InputMessageType = "message"
)

Defines values for InputMessageType.

func (InputMessageType) Valid

func (e InputMessageType) Valid() bool

Valid indicates whether the value is a known member of the InputMessageType enum.

type InputParam

type InputParam struct {
	// contains filtered or unexported fields
}

InputParam Text, image, or file inputs to the model, used to generate a response.

Learn more: - [Text inputs and outputs](/docs/guides/text) - [Image inputs](/docs/guides/images) - [File inputs](/docs/guides/pdf-files) - [Conversation state](/docs/guides/conversation-state) - [Function calling](/docs/guides/function-calling)

func (InputParam) AsInputParam0

func (t InputParam) AsInputParam0() (InputParam0, error)

AsInputParam0 returns the union data inside the InputParam as a InputParam0

func (InputParam) AsInputParam1

func (t InputParam) AsInputParam1() (InputParam1, error)

AsInputParam1 returns the union data inside the InputParam as a InputParam1

func (*InputParam) FromInputParam0

func (t *InputParam) FromInputParam0(v InputParam0) error

FromInputParam0 overwrites any union data inside the InputParam as the provided InputParam0

func (*InputParam) FromInputParam1

func (t *InputParam) FromInputParam1(v InputParam1) error

FromInputParam1 overwrites any union data inside the InputParam as the provided InputParam1

func (InputParam) MarshalJSON

func (t InputParam) MarshalJSON() ([]byte, error)

func (*InputParam) MergeInputParam0

func (t *InputParam) MergeInputParam0(v InputParam0) error

MergeInputParam0 performs a merge with any union data inside the InputParam, using the provided InputParam0

func (*InputParam) MergeInputParam1

func (t *InputParam) MergeInputParam1(v InputParam1) error

MergeInputParam1 performs a merge with any union data inside the InputParam, using the provided InputParam1

func (*InputParam) UnmarshalJSON

func (t *InputParam) UnmarshalJSON(b []byte) error

type InputParam0

type InputParam0 = string

InputParam0 A text input to the model, equivalent to a text input with the `user` role.

type InputParam1

type InputParam1 = []InputItem

InputParam1 A list of one or many input items to the model, containing different content types.

type InputTextContent

type InputTextContent struct {
	// PromptCacheBreakpoint Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
	PromptCacheBreakpoint *PromptCacheBreakpointConfig `json:"prompt_cache_breakpoint,omitempty"`

	// Text The text input to the model.
	Text string `json:"text"`

	// Type The type of the input item. Always `input_text`.
	Type InputTextContentType `json:"type"`
}

InputTextContent A text input to the model.

type InputTextContentParam

type InputTextContentParam struct {
	PromptCacheBreakpoint *PromptCacheBreakpointParam `json:"prompt_cache_breakpoint,omitempty"`

	// Text The text input to the model.
	Text string `json:"text"`

	// Type The type of the input item. Always `input_text`.
	Type InputTextContentParamType `json:"type"`
}

InputTextContentParam A text input to the model.

type InputTextContentParamType

type InputTextContentParamType string

InputTextContentParamType The type of the input item. Always `input_text`.

const (
	InputTextContentParamTypeInputText InputTextContentParamType = "input_text"
)

Defines values for InputTextContentParamType.

func (InputTextContentParamType) Valid

func (e InputTextContentParamType) Valid() bool

Valid indicates whether the value is a known member of the InputTextContentParamType enum.

type InputTextContentType

type InputTextContentType string

InputTextContentType The type of the input item. Always `input_text`.

const (
	InputTextContentTypeInputText InputTextContentType = "input_text"
)

Defines values for InputTextContentType.

func (InputTextContentType) Valid

func (e InputTextContentType) Valid() bool

Valid indicates whether the value is a known member of the InputTextContentType enum.

type Item

type Item struct {
	// contains filtered or unexported fields
}

Item Content item used to generate a response.

func (Item) AsAdditionalToolsItemParam

func (t Item) AsAdditionalToolsItemParam() (AdditionalToolsItemParam, error)

AsAdditionalToolsItemParam returns the union data inside the Item as a AdditionalToolsItemParam

func (Item) AsApplyPatchToolCallItemParam

func (t Item) AsApplyPatchToolCallItemParam() (ApplyPatchToolCallItemParam, error)

AsApplyPatchToolCallItemParam returns the union data inside the Item as a ApplyPatchToolCallItemParam

func (Item) AsApplyPatchToolCallOutputItemParam

func (t Item) AsApplyPatchToolCallOutputItemParam() (ApplyPatchToolCallOutputItemParam, error)

AsApplyPatchToolCallOutputItemParam returns the union data inside the Item as a ApplyPatchToolCallOutputItemParam

func (Item) AsCodeInterpreterToolCall

func (t Item) AsCodeInterpreterToolCall() (CodeInterpreterToolCall, error)

AsCodeInterpreterToolCall returns the union data inside the Item as a CodeInterpreterToolCall

func (Item) AsCompactionSummaryItemParam

func (t Item) AsCompactionSummaryItemParam() (CompactionSummaryItemParam, error)

AsCompactionSummaryItemParam returns the union data inside the Item as a CompactionSummaryItemParam

func (Item) AsComputerCallOutputItemParam

func (t Item) AsComputerCallOutputItemParam() (ComputerCallOutputItemParam, error)

AsComputerCallOutputItemParam returns the union data inside the Item as a ComputerCallOutputItemParam

func (Item) AsComputerToolCall

func (t Item) AsComputerToolCall() (ComputerToolCall, error)

AsComputerToolCall returns the union data inside the Item as a ComputerToolCall

func (Item) AsCustomToolCall

func (t Item) AsCustomToolCall() (CustomToolCall, error)

AsCustomToolCall returns the union data inside the Item as a CustomToolCall

func (Item) AsCustomToolCallOutput

func (t Item) AsCustomToolCallOutput() (CustomToolCallOutput, error)

AsCustomToolCallOutput returns the union data inside the Item as a CustomToolCallOutput

func (Item) AsFileSearchToolCall

func (t Item) AsFileSearchToolCall() (FileSearchToolCall, error)

AsFileSearchToolCall returns the union data inside the Item as a FileSearchToolCall

func (Item) AsFunctionCallOutputItemParam

func (t Item) AsFunctionCallOutputItemParam() (FunctionCallOutputItemParam, error)

AsFunctionCallOutputItemParam returns the union data inside the Item as a FunctionCallOutputItemParam

func (Item) AsFunctionShellCallItemParam

func (t Item) AsFunctionShellCallItemParam() (FunctionShellCallItemParam, error)

AsFunctionShellCallItemParam returns the union data inside the Item as a FunctionShellCallItemParam

func (Item) AsFunctionShellCallOutputItemParam

func (t Item) AsFunctionShellCallOutputItemParam() (FunctionShellCallOutputItemParam, error)

AsFunctionShellCallOutputItemParam returns the union data inside the Item as a FunctionShellCallOutputItemParam

func (Item) AsFunctionToolCall

func (t Item) AsFunctionToolCall() (FunctionToolCall, error)

AsFunctionToolCall returns the union data inside the Item as a FunctionToolCall

func (Item) AsImageGenToolCall

func (t Item) AsImageGenToolCall() (ImageGenToolCall, error)

AsImageGenToolCall returns the union data inside the Item as a ImageGenToolCall

func (Item) AsInputMessage

func (t Item) AsInputMessage() (InputMessage, error)

AsInputMessage returns the union data inside the Item as a InputMessage

func (Item) AsLocalShellToolCall

func (t Item) AsLocalShellToolCall() (LocalShellToolCall, error)

AsLocalShellToolCall returns the union data inside the Item as a LocalShellToolCall

func (Item) AsLocalShellToolCallOutput

func (t Item) AsLocalShellToolCallOutput() (LocalShellToolCallOutput, error)

AsLocalShellToolCallOutput returns the union data inside the Item as a LocalShellToolCallOutput

func (Item) AsMCPApprovalRequest

func (t Item) AsMCPApprovalRequest() (MCPApprovalRequest, error)

AsMCPApprovalRequest returns the union data inside the Item as a MCPApprovalRequest

func (Item) AsMCPApprovalResponse

func (t Item) AsMCPApprovalResponse() (MCPApprovalResponse, error)

AsMCPApprovalResponse returns the union data inside the Item as a MCPApprovalResponse

func (Item) AsMCPListTools

func (t Item) AsMCPListTools() (MCPListTools, error)

AsMCPListTools returns the union data inside the Item as a MCPListTools

func (Item) AsMCPToolCall

func (t Item) AsMCPToolCall() (MCPToolCall, error)

AsMCPToolCall returns the union data inside the Item as a MCPToolCall

func (Item) AsOutputMessage

func (t Item) AsOutputMessage() (OutputMessage, error)

AsOutputMessage returns the union data inside the Item as a OutputMessage

func (Item) AsReasoningItem

func (t Item) AsReasoningItem() (ReasoningItem, error)

AsReasoningItem returns the union data inside the Item as a ReasoningItem

func (Item) AsToolSearchCallItemParam

func (t Item) AsToolSearchCallItemParam() (ToolSearchCallItemParam, error)

AsToolSearchCallItemParam returns the union data inside the Item as a ToolSearchCallItemParam

func (Item) AsToolSearchOutputItemParam

func (t Item) AsToolSearchOutputItemParam() (ToolSearchOutputItemParam, error)

AsToolSearchOutputItemParam returns the union data inside the Item as a ToolSearchOutputItemParam

func (Item) AsWebSearchToolCall

func (t Item) AsWebSearchToolCall() (WebSearchToolCall, error)

AsWebSearchToolCall returns the union data inside the Item as a WebSearchToolCall

func (Item) Discriminator

func (t Item) Discriminator() (string, error)

func (*Item) FromAdditionalToolsItemParam

func (t *Item) FromAdditionalToolsItemParam(v AdditionalToolsItemParam) error

FromAdditionalToolsItemParam overwrites any union data inside the Item as the provided AdditionalToolsItemParam

func (*Item) FromApplyPatchToolCallItemParam

func (t *Item) FromApplyPatchToolCallItemParam(v ApplyPatchToolCallItemParam) error

FromApplyPatchToolCallItemParam overwrites any union data inside the Item as the provided ApplyPatchToolCallItemParam

func (*Item) FromApplyPatchToolCallOutputItemParam

func (t *Item) FromApplyPatchToolCallOutputItemParam(v ApplyPatchToolCallOutputItemParam) error

FromApplyPatchToolCallOutputItemParam overwrites any union data inside the Item as the provided ApplyPatchToolCallOutputItemParam

func (*Item) FromCodeInterpreterToolCall

func (t *Item) FromCodeInterpreterToolCall(v CodeInterpreterToolCall) error

FromCodeInterpreterToolCall overwrites any union data inside the Item as the provided CodeInterpreterToolCall

func (*Item) FromCompactionSummaryItemParam

func (t *Item) FromCompactionSummaryItemParam(v CompactionSummaryItemParam) error

FromCompactionSummaryItemParam overwrites any union data inside the Item as the provided CompactionSummaryItemParam

func (*Item) FromComputerCallOutputItemParam

func (t *Item) FromComputerCallOutputItemParam(v ComputerCallOutputItemParam) error

FromComputerCallOutputItemParam overwrites any union data inside the Item as the provided ComputerCallOutputItemParam

func (*Item) FromComputerToolCall

func (t *Item) FromComputerToolCall(v ComputerToolCall) error

FromComputerToolCall overwrites any union data inside the Item as the provided ComputerToolCall

func (*Item) FromCustomToolCall

func (t *Item) FromCustomToolCall(v CustomToolCall) error

FromCustomToolCall overwrites any union data inside the Item as the provided CustomToolCall

func (*Item) FromCustomToolCallOutput

func (t *Item) FromCustomToolCallOutput(v CustomToolCallOutput) error

FromCustomToolCallOutput overwrites any union data inside the Item as the provided CustomToolCallOutput

func (*Item) FromFileSearchToolCall

func (t *Item) FromFileSearchToolCall(v FileSearchToolCall) error

FromFileSearchToolCall overwrites any union data inside the Item as the provided FileSearchToolCall

func (*Item) FromFunctionCallOutputItemParam

func (t *Item) FromFunctionCallOutputItemParam(v FunctionCallOutputItemParam) error

FromFunctionCallOutputItemParam overwrites any union data inside the Item as the provided FunctionCallOutputItemParam

func (*Item) FromFunctionShellCallItemParam

func (t *Item) FromFunctionShellCallItemParam(v FunctionShellCallItemParam) error

FromFunctionShellCallItemParam overwrites any union data inside the Item as the provided FunctionShellCallItemParam

func (*Item) FromFunctionShellCallOutputItemParam

func (t *Item) FromFunctionShellCallOutputItemParam(v FunctionShellCallOutputItemParam) error

FromFunctionShellCallOutputItemParam overwrites any union data inside the Item as the provided FunctionShellCallOutputItemParam

func (*Item) FromFunctionToolCall

func (t *Item) FromFunctionToolCall(v FunctionToolCall) error

FromFunctionToolCall overwrites any union data inside the Item as the provided FunctionToolCall

func (*Item) FromImageGenToolCall

func (t *Item) FromImageGenToolCall(v ImageGenToolCall) error

FromImageGenToolCall overwrites any union data inside the Item as the provided ImageGenToolCall

func (*Item) FromInputMessage

func (t *Item) FromInputMessage(v InputMessage) error

FromInputMessage overwrites any union data inside the Item as the provided InputMessage

func (*Item) FromLocalShellToolCall

func (t *Item) FromLocalShellToolCall(v LocalShellToolCall) error

FromLocalShellToolCall overwrites any union data inside the Item as the provided LocalShellToolCall

func (*Item) FromLocalShellToolCallOutput

func (t *Item) FromLocalShellToolCallOutput(v LocalShellToolCallOutput) error

FromLocalShellToolCallOutput overwrites any union data inside the Item as the provided LocalShellToolCallOutput

func (*Item) FromMCPApprovalRequest

func (t *Item) FromMCPApprovalRequest(v MCPApprovalRequest) error

FromMCPApprovalRequest overwrites any union data inside the Item as the provided MCPApprovalRequest

func (*Item) FromMCPApprovalResponse

func (t *Item) FromMCPApprovalResponse(v MCPApprovalResponse) error

FromMCPApprovalResponse overwrites any union data inside the Item as the provided MCPApprovalResponse

func (*Item) FromMCPListTools

func (t *Item) FromMCPListTools(v MCPListTools) error

FromMCPListTools overwrites any union data inside the Item as the provided MCPListTools

func (*Item) FromMCPToolCall

func (t *Item) FromMCPToolCall(v MCPToolCall) error

FromMCPToolCall overwrites any union data inside the Item as the provided MCPToolCall

func (*Item) FromOutputMessage

func (t *Item) FromOutputMessage(v OutputMessage) error

FromOutputMessage overwrites any union data inside the Item as the provided OutputMessage

func (*Item) FromReasoningItem

func (t *Item) FromReasoningItem(v ReasoningItem) error

FromReasoningItem overwrites any union data inside the Item as the provided ReasoningItem

func (*Item) FromToolSearchCallItemParam

func (t *Item) FromToolSearchCallItemParam(v ToolSearchCallItemParam) error

FromToolSearchCallItemParam overwrites any union data inside the Item as the provided ToolSearchCallItemParam

func (*Item) FromToolSearchOutputItemParam

func (t *Item) FromToolSearchOutputItemParam(v ToolSearchOutputItemParam) error

FromToolSearchOutputItemParam overwrites any union data inside the Item as the provided ToolSearchOutputItemParam

func (*Item) FromWebSearchToolCall

func (t *Item) FromWebSearchToolCall(v WebSearchToolCall) error

FromWebSearchToolCall overwrites any union data inside the Item as the provided WebSearchToolCall

func (Item) MarshalJSON

func (t Item) MarshalJSON() ([]byte, error)

func (*Item) MergeAdditionalToolsItemParam

func (t *Item) MergeAdditionalToolsItemParam(v AdditionalToolsItemParam) error

MergeAdditionalToolsItemParam performs a merge with any union data inside the Item, using the provided AdditionalToolsItemParam

func (*Item) MergeApplyPatchToolCallItemParam

func (t *Item) MergeApplyPatchToolCallItemParam(v ApplyPatchToolCallItemParam) error

MergeApplyPatchToolCallItemParam performs a merge with any union data inside the Item, using the provided ApplyPatchToolCallItemParam

func (*Item) MergeApplyPatchToolCallOutputItemParam

func (t *Item) MergeApplyPatchToolCallOutputItemParam(v ApplyPatchToolCallOutputItemParam) error

MergeApplyPatchToolCallOutputItemParam performs a merge with any union data inside the Item, using the provided ApplyPatchToolCallOutputItemParam

func (*Item) MergeCodeInterpreterToolCall

func (t *Item) MergeCodeInterpreterToolCall(v CodeInterpreterToolCall) error

MergeCodeInterpreterToolCall performs a merge with any union data inside the Item, using the provided CodeInterpreterToolCall

func (*Item) MergeCompactionSummaryItemParam

func (t *Item) MergeCompactionSummaryItemParam(v CompactionSummaryItemParam) error

MergeCompactionSummaryItemParam performs a merge with any union data inside the Item, using the provided CompactionSummaryItemParam

func (*Item) MergeComputerCallOutputItemParam

func (t *Item) MergeComputerCallOutputItemParam(v ComputerCallOutputItemParam) error

MergeComputerCallOutputItemParam performs a merge with any union data inside the Item, using the provided ComputerCallOutputItemParam

func (*Item) MergeComputerToolCall

func (t *Item) MergeComputerToolCall(v ComputerToolCall) error

MergeComputerToolCall performs a merge with any union data inside the Item, using the provided ComputerToolCall

func (*Item) MergeCustomToolCall

func (t *Item) MergeCustomToolCall(v CustomToolCall) error

MergeCustomToolCall performs a merge with any union data inside the Item, using the provided CustomToolCall

func (*Item) MergeCustomToolCallOutput

func (t *Item) MergeCustomToolCallOutput(v CustomToolCallOutput) error

MergeCustomToolCallOutput performs a merge with any union data inside the Item, using the provided CustomToolCallOutput

func (*Item) MergeFileSearchToolCall

func (t *Item) MergeFileSearchToolCall(v FileSearchToolCall) error

MergeFileSearchToolCall performs a merge with any union data inside the Item, using the provided FileSearchToolCall

func (*Item) MergeFunctionCallOutputItemParam

func (t *Item) MergeFunctionCallOutputItemParam(v FunctionCallOutputItemParam) error

MergeFunctionCallOutputItemParam performs a merge with any union data inside the Item, using the provided FunctionCallOutputItemParam

func (*Item) MergeFunctionShellCallItemParam

func (t *Item) MergeFunctionShellCallItemParam(v FunctionShellCallItemParam) error

MergeFunctionShellCallItemParam performs a merge with any union data inside the Item, using the provided FunctionShellCallItemParam

func (*Item) MergeFunctionShellCallOutputItemParam

func (t *Item) MergeFunctionShellCallOutputItemParam(v FunctionShellCallOutputItemParam) error

MergeFunctionShellCallOutputItemParam performs a merge with any union data inside the Item, using the provided FunctionShellCallOutputItemParam

func (*Item) MergeFunctionToolCall

func (t *Item) MergeFunctionToolCall(v FunctionToolCall) error

MergeFunctionToolCall performs a merge with any union data inside the Item, using the provided FunctionToolCall

func (*Item) MergeImageGenToolCall

func (t *Item) MergeImageGenToolCall(v ImageGenToolCall) error

MergeImageGenToolCall performs a merge with any union data inside the Item, using the provided ImageGenToolCall

func (*Item) MergeInputMessage

func (t *Item) MergeInputMessage(v InputMessage) error

MergeInputMessage performs a merge with any union data inside the Item, using the provided InputMessage

func (*Item) MergeLocalShellToolCall

func (t *Item) MergeLocalShellToolCall(v LocalShellToolCall) error

MergeLocalShellToolCall performs a merge with any union data inside the Item, using the provided LocalShellToolCall

func (*Item) MergeLocalShellToolCallOutput

func (t *Item) MergeLocalShellToolCallOutput(v LocalShellToolCallOutput) error

MergeLocalShellToolCallOutput performs a merge with any union data inside the Item, using the provided LocalShellToolCallOutput

func (*Item) MergeMCPApprovalRequest

func (t *Item) MergeMCPApprovalRequest(v MCPApprovalRequest) error

MergeMCPApprovalRequest performs a merge with any union data inside the Item, using the provided MCPApprovalRequest

func (*Item) MergeMCPApprovalResponse

func (t *Item) MergeMCPApprovalResponse(v MCPApprovalResponse) error

MergeMCPApprovalResponse performs a merge with any union data inside the Item, using the provided MCPApprovalResponse

func (*Item) MergeMCPListTools

func (t *Item) MergeMCPListTools(v MCPListTools) error

MergeMCPListTools performs a merge with any union data inside the Item, using the provided MCPListTools

func (*Item) MergeMCPToolCall

func (t *Item) MergeMCPToolCall(v MCPToolCall) error

MergeMCPToolCall performs a merge with any union data inside the Item, using the provided MCPToolCall

func (*Item) MergeOutputMessage

func (t *Item) MergeOutputMessage(v OutputMessage) error

MergeOutputMessage performs a merge with any union data inside the Item, using the provided OutputMessage

func (*Item) MergeReasoningItem

func (t *Item) MergeReasoningItem(v ReasoningItem) error

MergeReasoningItem performs a merge with any union data inside the Item, using the provided ReasoningItem

func (*Item) MergeToolSearchCallItemParam

func (t *Item) MergeToolSearchCallItemParam(v ToolSearchCallItemParam) error

MergeToolSearchCallItemParam performs a merge with any union data inside the Item, using the provided ToolSearchCallItemParam

func (*Item) MergeToolSearchOutputItemParam

func (t *Item) MergeToolSearchOutputItemParam(v ToolSearchOutputItemParam) error

MergeToolSearchOutputItemParam performs a merge with any union data inside the Item, using the provided ToolSearchOutputItemParam

func (*Item) MergeWebSearchToolCall

func (t *Item) MergeWebSearchToolCall(v WebSearchToolCall) error

MergeWebSearchToolCall performs a merge with any union data inside the Item, using the provided WebSearchToolCall

func (*Item) UnmarshalJSON

func (t *Item) UnmarshalJSON(b []byte) error

func (Item) ValueByDiscriminator

func (t Item) ValueByDiscriminator() (interface{}, error)

type ItemReferenceParam

type ItemReferenceParam struct {
	// Id The ID of the item to reference.
	Id   string                  `json:"id"`
	Type *ItemReferenceParamType `json:"type,omitempty"`
}

ItemReferenceParam An internal identifier for an item to reference.

type ItemReferenceParamType

type ItemReferenceParamType string

ItemReferenceParamType The type of item to reference. Always `item_reference`.

const (
	ItemReference ItemReferenceParamType = "item_reference"
)

Defines values for ItemReferenceParamType.

func (ItemReferenceParamType) Valid

func (e ItemReferenceParamType) Valid() bool

Valid indicates whether the value is a known member of the ItemReferenceParamType enum.

type KeyPressAction

type KeyPressAction struct {
	// Keys The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
	Keys []string `json:"keys"`

	// Type Specifies the event type. For a keypress action, this property is always set to `keypress`.
	Type KeyPressActionType `json:"type"`
}

KeyPressAction A collection of keypresses the model would like to perform.

type KeyPressActionType

type KeyPressActionType string

KeyPressActionType Specifies the event type. For a keypress action, this property is always set to `keypress`.

const (
	Keypress KeyPressActionType = "keypress"
)

Defines values for KeyPressActionType.

func (KeyPressActionType) Valid

func (e KeyPressActionType) Valid() bool

Valid indicates whether the value is a known member of the KeyPressActionType enum.

type LocalEnvironmentParam

type LocalEnvironmentParam struct {
	// Skills An optional list of skills.
	Skills *[]LocalSkillParam `json:"skills,omitempty"`

	// Type Use a local computer environment.
	Type LocalEnvironmentParamType `json:"type"`
}

LocalEnvironmentParam defines model for LocalEnvironmentParam.

type LocalEnvironmentParamType

type LocalEnvironmentParamType string

LocalEnvironmentParamType Use a local computer environment.

const (
	LocalEnvironmentParamTypeLocal LocalEnvironmentParamType = "local"
)

Defines values for LocalEnvironmentParamType.

func (LocalEnvironmentParamType) Valid

func (e LocalEnvironmentParamType) Valid() bool

Valid indicates whether the value is a known member of the LocalEnvironmentParamType enum.

type LocalEnvironmentResource

type LocalEnvironmentResource struct {
	// Type The environment type. Always `local`.
	Type LocalEnvironmentResourceType `json:"type"`
}

LocalEnvironmentResource Represents the use of a local environment to perform shell actions.

type LocalEnvironmentResourceType

type LocalEnvironmentResourceType string

LocalEnvironmentResourceType The environment type. Always `local`.

const (
	LocalEnvironmentResourceTypeLocal LocalEnvironmentResourceType = "local"
)

Defines values for LocalEnvironmentResourceType.

func (LocalEnvironmentResourceType) Valid

Valid indicates whether the value is a known member of the LocalEnvironmentResourceType enum.

type LocalShellExecAction

type LocalShellExecAction struct {
	// Command The command to run.
	Command []string `json:"command"`

	// Env Environment variables to set for the command.
	Env       map[string]string `json:"env"`
	TimeoutMs *int              `json:"timeout_ms,omitempty"`

	// Type The type of the local shell action. Always `exec`.
	Type             LocalShellExecActionType `json:"type"`
	User             *string                  `json:"user,omitempty"`
	WorkingDirectory *string                  `json:"working_directory,omitempty"`
}

LocalShellExecAction Execute a shell command on the server.

type LocalShellExecActionType

type LocalShellExecActionType string

LocalShellExecActionType The type of the local shell action. Always `exec`.

const (
	Exec LocalShellExecActionType = "exec"
)

Defines values for LocalShellExecActionType.

func (LocalShellExecActionType) Valid

func (e LocalShellExecActionType) Valid() bool

Valid indicates whether the value is a known member of the LocalShellExecActionType enum.

type LocalShellToolCall

type LocalShellToolCall struct {
	// Action Execute a shell command on the server.
	Action LocalShellExecAction `json:"action"`

	// CallId The unique ID of the local shell tool call generated by the model.
	CallId string `json:"call_id"`

	// Id The unique ID of the local shell call.
	Id string `json:"id"`

	// Status The status of the local shell call.
	Status LocalShellToolCallStatus `json:"status"`

	// Type The type of the local shell call. Always `local_shell_call`.
	Type LocalShellToolCallType `json:"type"`
}

LocalShellToolCall A tool call to run a command on the local shell.

type LocalShellToolCallOutput

type LocalShellToolCallOutput struct {
	// Id The unique ID of the local shell tool call generated by the model.
	Id string `json:"id"`

	// Output A JSON string of the output of the local shell tool call.
	Output string                          `json:"output"`
	Status *LocalShellToolCallOutputStatus `json:"status,omitempty"`

	// Type The type of the local shell tool call output. Always `local_shell_call_output`.
	Type LocalShellToolCallOutputType `json:"type"`
}

LocalShellToolCallOutput The output of a local shell tool call.

type LocalShellToolCallOutputStatus

type LocalShellToolCallOutputStatus string

LocalShellToolCallOutputStatus The status of the item. One of `in_progress`, `completed`, or `incomplete`.

const (
	LocalShellToolCallOutputStatusCompleted  LocalShellToolCallOutputStatus = "completed"
	LocalShellToolCallOutputStatusInProgress LocalShellToolCallOutputStatus = "in_progress"
	LocalShellToolCallOutputStatusIncomplete LocalShellToolCallOutputStatus = "incomplete"
)

Defines values for LocalShellToolCallOutputStatus.

func (LocalShellToolCallOutputStatus) Valid

Valid indicates whether the value is a known member of the LocalShellToolCallOutputStatus enum.

type LocalShellToolCallOutputType

type LocalShellToolCallOutputType string

LocalShellToolCallOutputType The type of the local shell tool call output. Always `local_shell_call_output`.

const (
	LocalShellCallOutput LocalShellToolCallOutputType = "local_shell_call_output"
)

Defines values for LocalShellToolCallOutputType.

func (LocalShellToolCallOutputType) Valid

Valid indicates whether the value is a known member of the LocalShellToolCallOutputType enum.

type LocalShellToolCallStatus

type LocalShellToolCallStatus string

LocalShellToolCallStatus The status of the local shell call.

const (
	LocalShellToolCallStatusCompleted  LocalShellToolCallStatus = "completed"
	LocalShellToolCallStatusInProgress LocalShellToolCallStatus = "in_progress"
	LocalShellToolCallStatusIncomplete LocalShellToolCallStatus = "incomplete"
)

Defines values for LocalShellToolCallStatus.

func (LocalShellToolCallStatus) Valid

func (e LocalShellToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the LocalShellToolCallStatus enum.

type LocalShellToolCallType

type LocalShellToolCallType string

LocalShellToolCallType The type of the local shell call. Always `local_shell_call`.

const (
	LocalShellCall LocalShellToolCallType = "local_shell_call"
)

Defines values for LocalShellToolCallType.

func (LocalShellToolCallType) Valid

func (e LocalShellToolCallType) Valid() bool

Valid indicates whether the value is a known member of the LocalShellToolCallType enum.

type LocalShellToolParam

type LocalShellToolParam struct {
	// Type The type of the local shell tool. Always `local_shell`.
	Type LocalShellToolParamType `json:"type"`
}

LocalShellToolParam A tool that allows the model to execute shell commands in a local environment.

type LocalShellToolParamType

type LocalShellToolParamType string

LocalShellToolParamType The type of the local shell tool. Always `local_shell`.

const (
	LocalShell LocalShellToolParamType = "local_shell"
)

Defines values for LocalShellToolParamType.

func (LocalShellToolParamType) Valid

func (e LocalShellToolParamType) Valid() bool

Valid indicates whether the value is a known member of the LocalShellToolParamType enum.

type LocalSkillParam

type LocalSkillParam struct {
	// Description The description of the skill.
	Description string `json:"description"`

	// Name The name of the skill.
	Name string `json:"name"`

	// Path The path to the directory containing the skill.
	Path string `json:"path"`
}

LocalSkillParam defines model for LocalSkillParam.

type LogProb

type LogProb struct {
	Bytes       []int        `json:"bytes"`
	Logprob     float32      `json:"logprob"`
	Token       string       `json:"token"`
	TopLogprobs []TopLogProb `json:"top_logprobs"`
}

LogProb The log probability of a token.

type MCPApprovalRequest

type MCPApprovalRequest struct {
	// Arguments A JSON string of arguments for the tool.
	Arguments string `json:"arguments"`

	// Id The unique ID of the approval request.
	Id string `json:"id"`

	// Name The name of the tool to run.
	Name string `json:"name"`

	// ServerLabel The label of the MCP server making the request.
	ServerLabel string `json:"server_label"`

	// Type The type of the item. Always `mcp_approval_request`.
	Type MCPApprovalRequestType `json:"type"`
}

MCPApprovalRequest A request for human approval of a tool invocation.

type MCPApprovalRequestType

type MCPApprovalRequestType string

MCPApprovalRequestType The type of the item. Always `mcp_approval_request`.

const (
	McpApprovalRequest MCPApprovalRequestType = "mcp_approval_request"
)

Defines values for MCPApprovalRequestType.

func (MCPApprovalRequestType) Valid

func (e MCPApprovalRequestType) Valid() bool

Valid indicates whether the value is a known member of the MCPApprovalRequestType enum.

type MCPApprovalResponse

type MCPApprovalResponse struct {
	// ApprovalRequestId The ID of the approval request being answered.
	ApprovalRequestId string `json:"approval_request_id"`

	// Approve Whether the request was approved.
	Approve bool    `json:"approve"`
	Id      *string `json:"id,omitempty"`
	Reason  *string `json:"reason,omitempty"`

	// Type The type of the item. Always `mcp_approval_response`.
	Type MCPApprovalResponseType `json:"type"`
}

MCPApprovalResponse A response to an MCP approval request.

type MCPApprovalResponseResource

type MCPApprovalResponseResource struct {
	// ApprovalRequestId The ID of the approval request being answered.
	ApprovalRequestId string `json:"approval_request_id"`

	// Approve Whether the request was approved.
	Approve bool `json:"approve"`

	// Id The unique ID of the approval response
	Id     string  `json:"id"`
	Reason *string `json:"reason,omitempty"`

	// Type The type of the item. Always `mcp_approval_response`.
	Type MCPApprovalResponseResourceType `json:"type"`
}

MCPApprovalResponseResource A response to an MCP approval request.

type MCPApprovalResponseResourceType

type MCPApprovalResponseResourceType string

MCPApprovalResponseResourceType The type of the item. Always `mcp_approval_response`.

const (
	MCPApprovalResponseResourceTypeMcpApprovalResponse MCPApprovalResponseResourceType = "mcp_approval_response"
)

Defines values for MCPApprovalResponseResourceType.

func (MCPApprovalResponseResourceType) Valid

Valid indicates whether the value is a known member of the MCPApprovalResponseResourceType enum.

type MCPApprovalResponseType

type MCPApprovalResponseType string

MCPApprovalResponseType The type of the item. Always `mcp_approval_response`.

const (
	MCPApprovalResponseTypeMcpApprovalResponse MCPApprovalResponseType = "mcp_approval_response"
)

Defines values for MCPApprovalResponseType.

func (MCPApprovalResponseType) Valid

func (e MCPApprovalResponseType) Valid() bool

Valid indicates whether the value is a known member of the MCPApprovalResponseType enum.

type MCPListTools

type MCPListTools struct {
	Error *string `json:"error,omitempty"`

	// Id The unique ID of the list.
	Id string `json:"id"`

	// ServerLabel The label of the MCP server.
	ServerLabel string `json:"server_label"`

	// Tools The tools available on the server.
	Tools []MCPListToolsTool `json:"tools"`

	// Type The type of the item. Always `mcp_list_tools`.
	Type MCPListToolsType `json:"type"`
}

MCPListTools A list of tools available on an MCP server.

type MCPListToolsTool

type MCPListToolsTool struct {
	Annotations *map[string]interface{} `json:"annotations,omitempty"`
	Description *string                 `json:"description,omitempty"`

	// InputSchema The JSON schema describing the tool's input.
	InputSchema map[string]interface{} `json:"input_schema"`

	// Name The name of the tool.
	Name string `json:"name"`
}

MCPListToolsTool A tool available on an MCP server.

type MCPListToolsType

type MCPListToolsType string

MCPListToolsType The type of the item. Always `mcp_list_tools`.

const (
	McpListTools MCPListToolsType = "mcp_list_tools"
)

Defines values for MCPListToolsType.

func (MCPListToolsType) Valid

func (e MCPListToolsType) Valid() bool

Valid indicates whether the value is a known member of the MCPListToolsType enum.

type MCPTool

type MCPTool struct {
	AllowedCallers *[]CallableToolAllowedCaller `json:"allowed_callers,omitempty"`
	AllowedTools   *struct {
		// contains filtered or unexported fields
	} `json:"allowed_tools,omitempty"`

	// Authorization An OAuth access token that can be used with a remote MCP server, either
	// with a custom MCP server URL or a service connector. Your application
	// must handle the OAuth authorization flow and provide the token here.
	Authorization *string `json:"authorization,omitempty"`

	// ConnectorId Identifier for service connectors, like those available in ChatGPT. One of
	// `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
	// about service connectors [here](/docs/guides/tools-remote-mcp#connectors).
	//
	// Currently supported `connector_id` values are:
	//
	// - Dropbox: `connector_dropbox`
	// - Gmail: `connector_gmail`
	// - Google Calendar: `connector_googlecalendar`
	// - Google Drive: `connector_googledrive`
	// - Microsoft Teams: `connector_microsoftteams`
	// - Outlook Calendar: `connector_outlookcalendar`
	// - Outlook Email: `connector_outlookemail`
	// - SharePoint: `connector_sharepoint`
	ConnectorId *MCPToolConnectorId `json:"connector_id,omitempty"`

	// DeferLoading Whether this MCP tool is deferred and discovered via tool search.
	DeferLoading    *bool              `json:"defer_loading,omitempty"`
	Headers         *map[string]string `json:"headers,omitempty"`
	RequireApproval *struct {
		// contains filtered or unexported fields
	} `json:"require_approval,omitempty"`

	// ServerDescription Optional description of the MCP server, used to provide more context.
	ServerDescription *string `json:"server_description,omitempty"`

	// ServerLabel A label for this MCP server, used to identify it in tool calls.
	ServerLabel string `json:"server_label"`

	// ServerUrl The URL for the MCP server. One of `server_url`, `connector_id`, or
	// `tunnel_id` must be provided.
	ServerUrl *string `json:"server_url,omitempty"`

	// TunnelId The Secure MCP Tunnel ID to use instead of a direct server URL. One of
	// `server_url`, `connector_id`, or `tunnel_id` must be provided.
	TunnelId *string `json:"tunnel_id,omitempty"`

	// Type The type of the MCP tool. Always `mcp`.
	Type MCPToolType `json:"type"`
}

MCPTool Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).

type MCPToolAllowedTools0

type MCPToolAllowedTools0 = []string

MCPToolAllowedTools0 A string array of allowed tool names

type MCPToolCall

type MCPToolCall struct {
	ApprovalRequestId *string `json:"approval_request_id,omitempty"`

	// Arguments A JSON string of the arguments passed to the tool.
	Arguments string  `json:"arguments"`
	Error     *string `json:"error,omitempty"`

	// Id The unique ID of the tool call.
	Id string `json:"id"`

	// Name The name of the tool that was run.
	Name   string  `json:"name"`
	Output *string `json:"output,omitempty"`

	// ServerLabel The label of the MCP server running the tool.
	ServerLabel string `json:"server_label"`

	// Status The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
	Status *MCPToolCallStatus `json:"status,omitempty"`

	// Type The type of the item. Always `mcp_call`.
	Type MCPToolCallType `json:"type"`
}

MCPToolCall An invocation of a tool on an MCP server.

type MCPToolCallStatus

type MCPToolCallStatus string

MCPToolCallStatus defines model for MCPToolCallStatus.

const (
	MCPToolCallStatusCalling    MCPToolCallStatus = "calling"
	MCPToolCallStatusCompleted  MCPToolCallStatus = "completed"
	MCPToolCallStatusFailed     MCPToolCallStatus = "failed"
	MCPToolCallStatusInProgress MCPToolCallStatus = "in_progress"
	MCPToolCallStatusIncomplete MCPToolCallStatus = "incomplete"
)

Defines values for MCPToolCallStatus.

func (MCPToolCallStatus) Valid

func (e MCPToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the MCPToolCallStatus enum.

type MCPToolCallType

type MCPToolCallType string

MCPToolCallType The type of the item. Always `mcp_call`.

const (
	McpCall MCPToolCallType = "mcp_call"
)

Defines values for MCPToolCallType.

func (MCPToolCallType) Valid

func (e MCPToolCallType) Valid() bool

Valid indicates whether the value is a known member of the MCPToolCallType enum.

type MCPToolConnectorId

type MCPToolConnectorId string

MCPToolConnectorId Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors [here](/docs/guides/tools-remote-mcp#connectors).

Currently supported `connector_id` values are:

- Dropbox: `connector_dropbox` - Gmail: `connector_gmail` - Google Calendar: `connector_googlecalendar` - Google Drive: `connector_googledrive` - Microsoft Teams: `connector_microsoftteams` - Outlook Calendar: `connector_outlookcalendar` - Outlook Email: `connector_outlookemail` - SharePoint: `connector_sharepoint`

const (
	ConnectorDropbox         MCPToolConnectorId = "connector_dropbox"
	ConnectorGmail           MCPToolConnectorId = "connector_gmail"
	ConnectorGooglecalendar  MCPToolConnectorId = "connector_googlecalendar"
	ConnectorGoogledrive     MCPToolConnectorId = "connector_googledrive"
	ConnectorMicrosoftteams  MCPToolConnectorId = "connector_microsoftteams"
	ConnectorOutlookcalendar MCPToolConnectorId = "connector_outlookcalendar"
	ConnectorOutlookemail    MCPToolConnectorId = "connector_outlookemail"
	ConnectorSharepoint      MCPToolConnectorId = "connector_sharepoint"
)

Defines values for MCPToolConnectorId.

func (MCPToolConnectorId) Valid

func (e MCPToolConnectorId) Valid() bool

Valid indicates whether the value is a known member of the MCPToolConnectorId enum.

type MCPToolFilter

type MCPToolFilter struct {
	// ReadOnly Indicates whether or not a tool modifies data or is read-only. If an
	// MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
	// it will match this filter.
	ReadOnly *bool `json:"read_only,omitempty"`

	// ToolNames List of allowed tool names.
	ToolNames *[]string `json:"tool_names,omitempty"`
}

MCPToolFilter A filter object to specify which tools are allowed.

type MCPToolRequireApproval0

type MCPToolRequireApproval0 struct {
	// Always A filter object to specify which tools are allowed.
	Always *MCPToolFilter `json:"always,omitempty"`

	// Never A filter object to specify which tools are allowed.
	Never *MCPToolFilter `json:"never,omitempty"`
}

MCPToolRequireApproval0 Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools that require approval.

type MCPToolRequireApproval1

type MCPToolRequireApproval1 string

MCPToolRequireApproval1 Specify a single approval policy for all tools. One of `always` or `never`. When set to `always`, all tools will require approval. When set to `never`, all tools will not require approval.

const (
	Always MCPToolRequireApproval1 = "always"
	Never  MCPToolRequireApproval1 = "never"
)

Defines values for MCPToolRequireApproval1.

func (MCPToolRequireApproval1) Valid

func (e MCPToolRequireApproval1) Valid() bool

Valid indicates whether the value is a known member of the MCPToolRequireApproval1 enum.

type MCPToolType

type MCPToolType string

MCPToolType The type of the MCP tool. Always `mcp`.

const (
	MCPToolTypeMcp MCPToolType = "mcp"
)

Defines values for MCPToolType.

func (MCPToolType) Valid

func (e MCPToolType) Valid() bool

Valid indicates whether the value is a known member of the MCPToolType enum.

type MessagePhase

type MessagePhase string

MessagePhase Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.

const (
	Commentary  MessagePhase = "commentary"
	FinalAnswer MessagePhase = "final_answer"
)

Defines values for MessagePhase.

func (MessagePhase) Valid

func (e MessagePhase) Valid() bool

Valid indicates whether the value is a known member of the MessagePhase enum.

type MessageRole

type MessageRole string

MessageRole defines model for MessageRole.

const (
	MessageRoleAssistant     MessageRole = "assistant"
	MessageRoleCritic        MessageRole = "critic"
	MessageRoleDeveloper     MessageRole = "developer"
	MessageRoleDiscriminator MessageRole = "discriminator"
	MessageRoleSystem        MessageRole = "system"
	MessageRoleTool          MessageRole = "tool"
	MessageRoleUnknown       MessageRole = "unknown"
	MessageRoleUser          MessageRole = "user"
)

Defines values for MessageRole.

func (MessageRole) Valid

func (e MessageRole) Valid() bool

Valid indicates whether the value is a known member of the MessageRole enum.

type Metadata

type Metadata map[string]string

Metadata defines model for Metadata.

type ModelIdsResponses

type ModelIdsResponses struct {
	// contains filtered or unexported fields
}

ModelIdsResponses defines model for ModelIdsResponses.

func (ModelIdsResponses) AsModelIdsResponses1

func (t ModelIdsResponses) AsModelIdsResponses1() (ModelIdsResponses1, error)

AsModelIdsResponses1 returns the union data inside the ModelIdsResponses as a ModelIdsResponses1

func (ModelIdsResponses) AsModelIdsShared

func (t ModelIdsResponses) AsModelIdsShared() (ModelIdsShared, error)

AsModelIdsShared returns the union data inside the ModelIdsResponses as a ModelIdsShared

func (*ModelIdsResponses) FromModelIdsResponses1

func (t *ModelIdsResponses) FromModelIdsResponses1(v ModelIdsResponses1) error

FromModelIdsResponses1 overwrites any union data inside the ModelIdsResponses as the provided ModelIdsResponses1

func (*ModelIdsResponses) FromModelIdsShared

func (t *ModelIdsResponses) FromModelIdsShared(v ModelIdsShared) error

FromModelIdsShared overwrites any union data inside the ModelIdsResponses as the provided ModelIdsShared

func (ModelIdsResponses) MarshalJSON

func (t ModelIdsResponses) MarshalJSON() ([]byte, error)

func (*ModelIdsResponses) MergeModelIdsResponses1

func (t *ModelIdsResponses) MergeModelIdsResponses1(v ModelIdsResponses1) error

MergeModelIdsResponses1 performs a merge with any union data inside the ModelIdsResponses, using the provided ModelIdsResponses1

func (*ModelIdsResponses) MergeModelIdsShared

func (t *ModelIdsResponses) MergeModelIdsShared(v ModelIdsShared) error

MergeModelIdsShared performs a merge with any union data inside the ModelIdsResponses, using the provided ModelIdsShared

func (*ModelIdsResponses) UnmarshalJSON

func (t *ModelIdsResponses) UnmarshalJSON(b []byte) error

type ModelIdsResponses1

type ModelIdsResponses1 string

ModelIdsResponses1 defines model for ModelIdsResponses.1.

const (
	ModelIdsResponses1ComputerUsePreview         ModelIdsResponses1 = "computer-use-preview"
	ModelIdsResponses1ComputerUsePreview20250311 ModelIdsResponses1 = "computer-use-preview-2025-03-11"
	ModelIdsResponses1Gpt51CodexMax              ModelIdsResponses1 = "gpt-5.1-codex-max"
	ModelIdsResponses1Gpt5Codex                  ModelIdsResponses1 = "gpt-5-codex"
	ModelIdsResponses1Gpt5Pro                    ModelIdsResponses1 = "gpt-5-pro"
	ModelIdsResponses1Gpt5Pro20251006            ModelIdsResponses1 = "gpt-5-pro-2025-10-06"
	ModelIdsResponses1O1Pro                      ModelIdsResponses1 = "o1-pro"
	ModelIdsResponses1O1Pro20250319              ModelIdsResponses1 = "o1-pro-2025-03-19"
	ModelIdsResponses1O3DeepResearch             ModelIdsResponses1 = "o3-deep-research"
	ModelIdsResponses1O3DeepResearch20250626     ModelIdsResponses1 = "o3-deep-research-2025-06-26"
	ModelIdsResponses1O3Pro                      ModelIdsResponses1 = "o3-pro"
	ModelIdsResponses1O3Pro20250610              ModelIdsResponses1 = "o3-pro-2025-06-10"
	ModelIdsResponses1O4MiniDeepResearch         ModelIdsResponses1 = "o4-mini-deep-research"
	ModelIdsResponses1O4MiniDeepResearch20250626 ModelIdsResponses1 = "o4-mini-deep-research-2025-06-26"
)

Defines values for ModelIdsResponses1.

func (ModelIdsResponses1) Valid

func (e ModelIdsResponses1) Valid() bool

Valid indicates whether the value is a known member of the ModelIdsResponses1 enum.

type ModelIdsShared

type ModelIdsShared struct {
	// contains filtered or unexported fields
}

ModelIdsShared defines model for ModelIdsShared.

func (ModelIdsShared) AsModelIdsShared0

func (t ModelIdsShared) AsModelIdsShared0() (ModelIdsShared0, error)

AsModelIdsShared0 returns the union data inside the ModelIdsShared as a ModelIdsShared0

func (ModelIdsShared) AsModelIdsShared1

func (t ModelIdsShared) AsModelIdsShared1() (ModelIdsShared1, error)

AsModelIdsShared1 returns the union data inside the ModelIdsShared as a ModelIdsShared1

func (*ModelIdsShared) FromModelIdsShared0

func (t *ModelIdsShared) FromModelIdsShared0(v ModelIdsShared0) error

FromModelIdsShared0 overwrites any union data inside the ModelIdsShared as the provided ModelIdsShared0

func (*ModelIdsShared) FromModelIdsShared1

func (t *ModelIdsShared) FromModelIdsShared1(v ModelIdsShared1) error

FromModelIdsShared1 overwrites any union data inside the ModelIdsShared as the provided ModelIdsShared1

func (ModelIdsShared) MarshalJSON

func (t ModelIdsShared) MarshalJSON() ([]byte, error)

func (*ModelIdsShared) MergeModelIdsShared0

func (t *ModelIdsShared) MergeModelIdsShared0(v ModelIdsShared0) error

MergeModelIdsShared0 performs a merge with any union data inside the ModelIdsShared, using the provided ModelIdsShared0

func (*ModelIdsShared) MergeModelIdsShared1

func (t *ModelIdsShared) MergeModelIdsShared1(v ModelIdsShared1) error

MergeModelIdsShared1 performs a merge with any union data inside the ModelIdsShared, using the provided ModelIdsShared1

func (*ModelIdsShared) UnmarshalJSON

func (t *ModelIdsShared) UnmarshalJSON(b []byte) error

type ModelIdsShared0

type ModelIdsShared0 = string

ModelIdsShared0 defines model for ModelIdsShared.0.

type ModelIdsShared1

type ModelIdsShared1 string

ModelIdsShared1 defines model for ModelIdsShared.1.

const (
	Chatgpt4oLatest                ModelIdsShared1 = "chatgpt-4o-latest"
	CodexMiniLatest                ModelIdsShared1 = "codex-mini-latest"
	Gpt35Turbo                     ModelIdsShared1 = "gpt-3.5-turbo"
	Gpt35Turbo0125                 ModelIdsShared1 = "gpt-3.5-turbo-0125"
	Gpt35Turbo0301                 ModelIdsShared1 = "gpt-3.5-turbo-0301"
	Gpt35Turbo0613                 ModelIdsShared1 = "gpt-3.5-turbo-0613"
	Gpt35Turbo1106                 ModelIdsShared1 = "gpt-3.5-turbo-1106"
	Gpt35Turbo16k                  ModelIdsShared1 = "gpt-3.5-turbo-16k"
	Gpt35Turbo16k0613              ModelIdsShared1 = "gpt-3.5-turbo-16k-0613"
	Gpt4                           ModelIdsShared1 = "gpt-4"
	Gpt40125Preview                ModelIdsShared1 = "gpt-4-0125-preview"
	Gpt40314                       ModelIdsShared1 = "gpt-4-0314"
	Gpt40613                       ModelIdsShared1 = "gpt-4-0613"
	Gpt41                          ModelIdsShared1 = "gpt-4.1"
	Gpt41106Preview                ModelIdsShared1 = "gpt-4-1106-preview"
	Gpt4120250414                  ModelIdsShared1 = "gpt-4.1-2025-04-14"
	Gpt41Mini                      ModelIdsShared1 = "gpt-4.1-mini"
	Gpt41Mini20250414              ModelIdsShared1 = "gpt-4.1-mini-2025-04-14"
	Gpt41Nano                      ModelIdsShared1 = "gpt-4.1-nano"
	Gpt41Nano20250414              ModelIdsShared1 = "gpt-4.1-nano-2025-04-14"
	Gpt432k                        ModelIdsShared1 = "gpt-4-32k"
	Gpt432k0314                    ModelIdsShared1 = "gpt-4-32k-0314"
	Gpt432k0613                    ModelIdsShared1 = "gpt-4-32k-0613"
	Gpt4Turbo                      ModelIdsShared1 = "gpt-4-turbo"
	Gpt4Turbo20240409              ModelIdsShared1 = "gpt-4-turbo-2024-04-09"
	Gpt4TurboPreview               ModelIdsShared1 = "gpt-4-turbo-preview"
	Gpt4VisionPreview              ModelIdsShared1 = "gpt-4-vision-preview"
	Gpt4o                          ModelIdsShared1 = "gpt-4o"
	Gpt4o20240513                  ModelIdsShared1 = "gpt-4o-2024-05-13"
	Gpt4o20240806                  ModelIdsShared1 = "gpt-4o-2024-08-06"
	Gpt4o20241120                  ModelIdsShared1 = "gpt-4o-2024-11-20"
	Gpt4oAudioPreview              ModelIdsShared1 = "gpt-4o-audio-preview"
	Gpt4oAudioPreview20241001      ModelIdsShared1 = "gpt-4o-audio-preview-2024-10-01"
	Gpt4oAudioPreview20241217      ModelIdsShared1 = "gpt-4o-audio-preview-2024-12-17"
	Gpt4oAudioPreview20250603      ModelIdsShared1 = "gpt-4o-audio-preview-2025-06-03"
	Gpt4oMini                      ModelIdsShared1 = "gpt-4o-mini"
	Gpt4oMini20240718              ModelIdsShared1 = "gpt-4o-mini-2024-07-18"
	Gpt4oMiniAudioPreview          ModelIdsShared1 = "gpt-4o-mini-audio-preview"
	Gpt4oMiniAudioPreview20241217  ModelIdsShared1 = "gpt-4o-mini-audio-preview-2024-12-17"
	Gpt4oMiniSearchPreview         ModelIdsShared1 = "gpt-4o-mini-search-preview"
	Gpt4oMiniSearchPreview20250311 ModelIdsShared1 = "gpt-4o-mini-search-preview-2025-03-11"
	Gpt4oSearchPreview             ModelIdsShared1 = "gpt-4o-search-preview"
	Gpt4oSearchPreview20250311     ModelIdsShared1 = "gpt-4o-search-preview-2025-03-11"
	Gpt5                           ModelIdsShared1 = "gpt-5"
	Gpt51                          ModelIdsShared1 = "gpt-5.1"
	Gpt5120251113                  ModelIdsShared1 = "gpt-5.1-2025-11-13"
	Gpt51ChatLatest                ModelIdsShared1 = "gpt-5.1-chat-latest"
	Gpt51Codex                     ModelIdsShared1 = "gpt-5.1-codex"
	Gpt51Mini                      ModelIdsShared1 = "gpt-5.1-mini"
	Gpt52                          ModelIdsShared1 = "gpt-5.2"
	Gpt520250807                   ModelIdsShared1 = "gpt-5-2025-08-07"
	Gpt5220251211                  ModelIdsShared1 = "gpt-5.2-2025-12-11"
	Gpt52ChatLatest                ModelIdsShared1 = "gpt-5.2-chat-latest"
	Gpt52Pro                       ModelIdsShared1 = "gpt-5.2-pro"
	Gpt52Pro20251211               ModelIdsShared1 = "gpt-5.2-pro-2025-12-11"
	Gpt53ChatLatest                ModelIdsShared1 = "gpt-5.3-chat-latest"
	Gpt54                          ModelIdsShared1 = "gpt-5.4"
	Gpt54Mini                      ModelIdsShared1 = "gpt-5.4-mini"
	Gpt54Mini20260317              ModelIdsShared1 = "gpt-5.4-mini-2026-03-17"
	Gpt54Nano                      ModelIdsShared1 = "gpt-5.4-nano"
	Gpt54Nano20260317              ModelIdsShared1 = "gpt-5.4-nano-2026-03-17"
	Gpt55                          ModelIdsShared1 = "gpt-5.5"
	Gpt56Luna                      ModelIdsShared1 = "gpt-5.6-luna"
	Gpt56Sol                       ModelIdsShared1 = "gpt-5.6-sol"
	Gpt56Terra                     ModelIdsShared1 = "gpt-5.6-terra"
	Gpt5ChatLatest                 ModelIdsShared1 = "gpt-5-chat-latest"
	Gpt5Mini                       ModelIdsShared1 = "gpt-5-mini"
	Gpt5Mini20250807               ModelIdsShared1 = "gpt-5-mini-2025-08-07"
	Gpt5Nano                       ModelIdsShared1 = "gpt-5-nano"
	Gpt5Nano20250807               ModelIdsShared1 = "gpt-5-nano-2025-08-07"
	O1                             ModelIdsShared1 = "o1"
	O120241217                     ModelIdsShared1 = "o1-2024-12-17"
	O1Mini                         ModelIdsShared1 = "o1-mini"
	O1Mini20240912                 ModelIdsShared1 = "o1-mini-2024-09-12"
	O1Preview                      ModelIdsShared1 = "o1-preview"
	O1Preview20240912              ModelIdsShared1 = "o1-preview-2024-09-12"
	O3                             ModelIdsShared1 = "o3"
	O320250416                     ModelIdsShared1 = "o3-2025-04-16"
	O3Mini                         ModelIdsShared1 = "o3-mini"
	O3Mini20250131                 ModelIdsShared1 = "o3-mini-2025-01-31"
	O4Mini                         ModelIdsShared1 = "o4-mini"
	O4Mini20250416                 ModelIdsShared1 = "o4-mini-2025-04-16"
)

Defines values for ModelIdsShared1.

func (ModelIdsShared1) Valid

func (e ModelIdsShared1) Valid() bool

Valid indicates whether the value is a known member of the ModelIdsShared1 enum.

type ModelResponseProperties

type ModelResponseProperties struct {
	Metadata       *Metadata `json:"metadata,omitempty"`
	PromptCacheKey *string   `json:"prompt_cache_key,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PromptCacheRetention *ModelResponsePropertiesPromptCacheRetention `json:"prompt_cache_retention,omitempty"`
	SafetyIdentifier     *string                                      `json:"safety_identifier,omitempty"`
	ServiceTier          *ServiceTier                                 `json:"service_tier,omitempty"`
	Temperature          *float32                                     `json:"temperature,omitempty"`
	TopLogprobs          *int                                         `json:"top_logprobs,omitempty"`
	TopP                 *float32                                     `json:"top_p,omitempty"`

	// User This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
	// A stable identifier for your end-users.
	// Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	User *string `json:"user,omitempty"`
}

ModelResponseProperties defines model for ModelResponseProperties.

type ModelResponsePropertiesPromptCacheRetention

type ModelResponsePropertiesPromptCacheRetention string

ModelResponsePropertiesPromptCacheRetention Deprecated. Use `prompt_cache_options.ttl` instead.

The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

  • Organizations without ZDR enabled default to `24h`.
  • Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.
const (
	ModelResponsePropertiesPromptCacheRetentionInMemory ModelResponsePropertiesPromptCacheRetention = "in_memory"
	ModelResponsePropertiesPromptCacheRetentionN24h     ModelResponsePropertiesPromptCacheRetention = "24h"
)

Defines values for ModelResponsePropertiesPromptCacheRetention.

func (ModelResponsePropertiesPromptCacheRetention) Valid

Valid indicates whether the value is a known member of the ModelResponsePropertiesPromptCacheRetention enum.

type Moderation

type Moderation struct {
	// Input Moderation for the response input.
	Input Moderation_Input `json:"input"`

	// Output Moderation for the response output.
	Output Moderation_Output `json:"output"`
}

Moderation Moderation results or errors for the response input and output.

type ModerationConfigParam

type ModerationConfigParam struct {
	Mode ModerationMode `json:"mode"`
}

ModerationConfigParam The moderation policy for the response input.

type ModerationErrorBody

type ModerationErrorBody struct {
	// Code The error code.
	Code string `json:"code"`

	// Message The error message.
	Message string `json:"message"`

	// Type The object type, which was always `error` for moderation failures.
	Type ModerationErrorBodyType `json:"type"`
}

ModerationErrorBody An error produced while attempting moderation for the response input or output.

type ModerationErrorBodyType

type ModerationErrorBodyType string

ModerationErrorBodyType The object type, which was always `error` for moderation failures.

const (
	ModerationErrorBodyTypeError ModerationErrorBodyType = "error"
)

Defines values for ModerationErrorBodyType.

func (ModerationErrorBodyType) Valid

func (e ModerationErrorBodyType) Valid() bool

Valid indicates whether the value is a known member of the ModerationErrorBodyType enum.

type ModerationInputType

type ModerationInputType string

ModerationInputType defines model for ModerationInputType.

const (
	ModerationInputTypeImage ModerationInputType = "image"
	ModerationInputTypeText  ModerationInputType = "text"
)

Defines values for ModerationInputType.

func (ModerationInputType) Valid

func (e ModerationInputType) Valid() bool

Valid indicates whether the value is a known member of the ModerationInputType enum.

type ModerationMode

type ModerationMode string

ModerationMode defines model for ModerationMode.

const (
	Block ModerationMode = "block"
	Score ModerationMode = "score"
)

Defines values for ModerationMode.

func (ModerationMode) Valid

func (e ModerationMode) Valid() bool

Valid indicates whether the value is a known member of the ModerationMode enum.

type ModerationParam

type ModerationParam struct {
	// Model The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'.
	Model  string                 `json:"model"`
	Policy *ModerationPolicyParam `json:"policy,omitempty"`
}

ModerationParam Configuration for running moderation on the input and output of this response.

type ModerationPolicyParam

type ModerationPolicyParam struct {
	Input  *ModerationConfigParam `json:"input,omitempty"`
	Output *ModerationConfigParam `json:"output,omitempty"`
}

ModerationPolicyParam The policy to apply to moderated response input and output.

type ModerationResultBody

type ModerationResultBody struct {
	// Categories A dictionary of moderation categories to booleans, True if the input is flagged under this category.
	Categories map[string]bool `json:"categories"`

	// CategoryAppliedInputTypes Which modalities of input are reflected by the score for each category.
	CategoryAppliedInputTypes map[string][]ModerationInputType `json:"category_applied_input_types"`

	// CategoryScores A dictionary of moderation categories to scores.
	CategoryScores map[string]float32 `json:"category_scores"`

	// Flagged A boolean indicating whether the content was flagged by any category.
	Flagged bool `json:"flagged"`

	// Model The moderation model that produced this result.
	Model string `json:"model"`

	// Type The object type, which was always `moderation_result` for successful moderation results.
	Type ModerationResultBodyType `json:"type"`
}

ModerationResultBody A moderation result produced for the response input or output.

type ModerationResultBodyType

type ModerationResultBodyType string

ModerationResultBodyType The object type, which was always `moderation_result` for successful moderation results.

const (
	ModerationResult ModerationResultBodyType = "moderation_result"
)

Defines values for ModerationResultBodyType.

func (ModerationResultBodyType) Valid

func (e ModerationResultBodyType) Valid() bool

Valid indicates whether the value is a known member of the ModerationResultBodyType enum.

type Moderation_Input

type Moderation_Input struct {
	// contains filtered or unexported fields
}

Moderation_Input Moderation for the response input.

func (Moderation_Input) AsModerationErrorBody

func (t Moderation_Input) AsModerationErrorBody() (ModerationErrorBody, error)

AsModerationErrorBody returns the union data inside the Moderation_Input as a ModerationErrorBody

func (Moderation_Input) AsModerationResultBody

func (t Moderation_Input) AsModerationResultBody() (ModerationResultBody, error)

AsModerationResultBody returns the union data inside the Moderation_Input as a ModerationResultBody

func (Moderation_Input) Discriminator

func (t Moderation_Input) Discriminator() (string, error)

func (*Moderation_Input) FromModerationErrorBody

func (t *Moderation_Input) FromModerationErrorBody(v ModerationErrorBody) error

FromModerationErrorBody overwrites any union data inside the Moderation_Input as the provided ModerationErrorBody

func (*Moderation_Input) FromModerationResultBody

func (t *Moderation_Input) FromModerationResultBody(v ModerationResultBody) error

FromModerationResultBody overwrites any union data inside the Moderation_Input as the provided ModerationResultBody

func (Moderation_Input) MarshalJSON

func (t Moderation_Input) MarshalJSON() ([]byte, error)

func (*Moderation_Input) MergeModerationErrorBody

func (t *Moderation_Input) MergeModerationErrorBody(v ModerationErrorBody) error

MergeModerationErrorBody performs a merge with any union data inside the Moderation_Input, using the provided ModerationErrorBody

func (*Moderation_Input) MergeModerationResultBody

func (t *Moderation_Input) MergeModerationResultBody(v ModerationResultBody) error

MergeModerationResultBody performs a merge with any union data inside the Moderation_Input, using the provided ModerationResultBody

func (*Moderation_Input) UnmarshalJSON

func (t *Moderation_Input) UnmarshalJSON(b []byte) error

func (Moderation_Input) ValueByDiscriminator

func (t Moderation_Input) ValueByDiscriminator() (interface{}, error)

type Moderation_Output

type Moderation_Output struct {
	// contains filtered or unexported fields
}

Moderation_Output Moderation for the response output.

func (Moderation_Output) AsModerationErrorBody

func (t Moderation_Output) AsModerationErrorBody() (ModerationErrorBody, error)

AsModerationErrorBody returns the union data inside the Moderation_Output as a ModerationErrorBody

func (Moderation_Output) AsModerationResultBody

func (t Moderation_Output) AsModerationResultBody() (ModerationResultBody, error)

AsModerationResultBody returns the union data inside the Moderation_Output as a ModerationResultBody

func (Moderation_Output) Discriminator

func (t Moderation_Output) Discriminator() (string, error)

func (*Moderation_Output) FromModerationErrorBody

func (t *Moderation_Output) FromModerationErrorBody(v ModerationErrorBody) error

FromModerationErrorBody overwrites any union data inside the Moderation_Output as the provided ModerationErrorBody

func (*Moderation_Output) FromModerationResultBody

func (t *Moderation_Output) FromModerationResultBody(v ModerationResultBody) error

FromModerationResultBody overwrites any union data inside the Moderation_Output as the provided ModerationResultBody

func (Moderation_Output) MarshalJSON

func (t Moderation_Output) MarshalJSON() ([]byte, error)

func (*Moderation_Output) MergeModerationErrorBody

func (t *Moderation_Output) MergeModerationErrorBody(v ModerationErrorBody) error

MergeModerationErrorBody performs a merge with any union data inside the Moderation_Output, using the provided ModerationErrorBody

func (*Moderation_Output) MergeModerationResultBody

func (t *Moderation_Output) MergeModerationResultBody(v ModerationResultBody) error

MergeModerationResultBody performs a merge with any union data inside the Moderation_Output, using the provided ModerationResultBody

func (*Moderation_Output) UnmarshalJSON

func (t *Moderation_Output) UnmarshalJSON(b []byte) error

func (Moderation_Output) ValueByDiscriminator

func (t Moderation_Output) ValueByDiscriminator() (interface{}, error)

type MoveParam

type MoveParam struct {
	Keys *[]string `json:"keys,omitempty"`

	// Type Specifies the event type. For a move action, this property is always set to `move`.
	Type MoveParamType `json:"type"`

	// X The x-coordinate to move to.
	X int `json:"x"`

	// Y The y-coordinate to move to.
	Y int `json:"y"`
}

MoveParam A mouse move action.

type MoveParamType

type MoveParamType string

MoveParamType Specifies the event type. For a move action, this property is always set to `move`.

const (
	Move MoveParamType = "move"
)

Defines values for MoveParamType.

func (MoveParamType) Valid

func (e MoveParamType) Valid() bool

Valid indicates whether the value is a known member of the MoveParamType enum.

type NamespaceToolParam

type NamespaceToolParam struct {
	// Description A description of the namespace shown to the model.
	Description string `json:"description"`

	// Name The namespace name used in tool calls (for example, `crm`).
	Name string `json:"name"`

	// Tools The function/custom tools available inside this namespace.
	Tools []NamespaceToolParam_Tools_Item `json:"tools"`

	// Type The type of the tool. Always `namespace`.
	Type NamespaceToolParamType `json:"type"`
}

NamespaceToolParam Groups function/custom tools under a shared namespace.

type NamespaceToolParamType

type NamespaceToolParamType string

NamespaceToolParamType The type of the tool. Always `namespace`.

const (
	Namespace NamespaceToolParamType = "namespace"
)

Defines values for NamespaceToolParamType.

func (NamespaceToolParamType) Valid

func (e NamespaceToolParamType) Valid() bool

Valid indicates whether the value is a known member of the NamespaceToolParamType enum.

type NamespaceToolParam_Tools_Item

type NamespaceToolParam_Tools_Item struct {
	// contains filtered or unexported fields
}

NamespaceToolParam_Tools_Item A function or custom tool that belongs to a namespace.

func (NamespaceToolParam_Tools_Item) AsCustomToolParam

func (t NamespaceToolParam_Tools_Item) AsCustomToolParam() (CustomToolParam, error)

AsCustomToolParam returns the union data inside the NamespaceToolParam_Tools_Item as a CustomToolParam

func (NamespaceToolParam_Tools_Item) AsFunctionToolParam

func (t NamespaceToolParam_Tools_Item) AsFunctionToolParam() (FunctionToolParam, error)

AsFunctionToolParam returns the union data inside the NamespaceToolParam_Tools_Item as a FunctionToolParam

func (NamespaceToolParam_Tools_Item) Discriminator

func (t NamespaceToolParam_Tools_Item) Discriminator() (string, error)

func (*NamespaceToolParam_Tools_Item) FromCustomToolParam

func (t *NamespaceToolParam_Tools_Item) FromCustomToolParam(v CustomToolParam) error

FromCustomToolParam overwrites any union data inside the NamespaceToolParam_Tools_Item as the provided CustomToolParam

func (*NamespaceToolParam_Tools_Item) FromFunctionToolParam

func (t *NamespaceToolParam_Tools_Item) FromFunctionToolParam(v FunctionToolParam) error

FromFunctionToolParam overwrites any union data inside the NamespaceToolParam_Tools_Item as the provided FunctionToolParam

func (NamespaceToolParam_Tools_Item) MarshalJSON

func (t NamespaceToolParam_Tools_Item) MarshalJSON() ([]byte, error)

func (*NamespaceToolParam_Tools_Item) MergeCustomToolParam

func (t *NamespaceToolParam_Tools_Item) MergeCustomToolParam(v CustomToolParam) error

MergeCustomToolParam performs a merge with any union data inside the NamespaceToolParam_Tools_Item, using the provided CustomToolParam

func (*NamespaceToolParam_Tools_Item) MergeFunctionToolParam

func (t *NamespaceToolParam_Tools_Item) MergeFunctionToolParam(v FunctionToolParam) error

MergeFunctionToolParam performs a merge with any union data inside the NamespaceToolParam_Tools_Item, using the provided FunctionToolParam

func (*NamespaceToolParam_Tools_Item) UnmarshalJSON

func (t *NamespaceToolParam_Tools_Item) UnmarshalJSON(b []byte) error

func (NamespaceToolParam_Tools_Item) ValueByDiscriminator

func (t NamespaceToolParam_Tools_Item) ValueByDiscriminator() (interface{}, error)

type OutputContent

type OutputContent struct {
	// contains filtered or unexported fields
}

OutputContent defines model for OutputContent.

func (OutputContent) AsOutputTextContent

func (t OutputContent) AsOutputTextContent() (OutputTextContent, error)

AsOutputTextContent returns the union data inside the OutputContent as a OutputTextContent

func (OutputContent) AsReasoningTextContent

func (t OutputContent) AsReasoningTextContent() (ReasoningTextContent, error)

AsReasoningTextContent returns the union data inside the OutputContent as a ReasoningTextContent

func (OutputContent) AsRefusalContent

func (t OutputContent) AsRefusalContent() (RefusalContent, error)

AsRefusalContent returns the union data inside the OutputContent as a RefusalContent

func (OutputContent) Discriminator

func (t OutputContent) Discriminator() (string, error)

func (*OutputContent) FromOutputTextContent

func (t *OutputContent) FromOutputTextContent(v OutputTextContent) error

FromOutputTextContent overwrites any union data inside the OutputContent as the provided OutputTextContent

func (*OutputContent) FromReasoningTextContent

func (t *OutputContent) FromReasoningTextContent(v ReasoningTextContent) error

FromReasoningTextContent overwrites any union data inside the OutputContent as the provided ReasoningTextContent

func (*OutputContent) FromRefusalContent

func (t *OutputContent) FromRefusalContent(v RefusalContent) error

FromRefusalContent overwrites any union data inside the OutputContent as the provided RefusalContent

func (OutputContent) MarshalJSON

func (t OutputContent) MarshalJSON() ([]byte, error)

func (*OutputContent) MergeOutputTextContent

func (t *OutputContent) MergeOutputTextContent(v OutputTextContent) error

MergeOutputTextContent performs a merge with any union data inside the OutputContent, using the provided OutputTextContent

func (*OutputContent) MergeReasoningTextContent

func (t *OutputContent) MergeReasoningTextContent(v ReasoningTextContent) error

MergeReasoningTextContent performs a merge with any union data inside the OutputContent, using the provided ReasoningTextContent

func (*OutputContent) MergeRefusalContent

func (t *OutputContent) MergeRefusalContent(v RefusalContent) error

MergeRefusalContent performs a merge with any union data inside the OutputContent, using the provided RefusalContent

func (*OutputContent) UnmarshalJSON

func (t *OutputContent) UnmarshalJSON(b []byte) error

func (OutputContent) ValueByDiscriminator

func (t OutputContent) ValueByDiscriminator() (interface{}, error)

type OutputItem

type OutputItem struct {
	// contains filtered or unexported fields
}

OutputItem defines model for OutputItem.

func (OutputItem) AsAdditionalTools

func (t OutputItem) AsAdditionalTools() (AdditionalTools, error)

AsAdditionalTools returns the union data inside the OutputItem as a AdditionalTools

func (OutputItem) AsApplyPatchToolCall

func (t OutputItem) AsApplyPatchToolCall() (ApplyPatchToolCall, error)

AsApplyPatchToolCall returns the union data inside the OutputItem as a ApplyPatchToolCall

func (OutputItem) AsApplyPatchToolCallOutput

func (t OutputItem) AsApplyPatchToolCallOutput() (ApplyPatchToolCallOutput, error)

AsApplyPatchToolCallOutput returns the union data inside the OutputItem as a ApplyPatchToolCallOutput

func (OutputItem) AsCodeInterpreterToolCall

func (t OutputItem) AsCodeInterpreterToolCall() (CodeInterpreterToolCall, error)

AsCodeInterpreterToolCall returns the union data inside the OutputItem as a CodeInterpreterToolCall

func (OutputItem) AsCompactionBody

func (t OutputItem) AsCompactionBody() (CompactionBody, error)

AsCompactionBody returns the union data inside the OutputItem as a CompactionBody

func (OutputItem) AsComputerToolCall

func (t OutputItem) AsComputerToolCall() (ComputerToolCall, error)

AsComputerToolCall returns the union data inside the OutputItem as a ComputerToolCall

func (OutputItem) AsComputerToolCallOutputResource

func (t OutputItem) AsComputerToolCallOutputResource() (ComputerToolCallOutputResource, error)

AsComputerToolCallOutputResource returns the union data inside the OutputItem as a ComputerToolCallOutputResource

func (OutputItem) AsCustomToolCall

func (t OutputItem) AsCustomToolCall() (CustomToolCall, error)

AsCustomToolCall returns the union data inside the OutputItem as a CustomToolCall

func (OutputItem) AsCustomToolCallOutputResource

func (t OutputItem) AsCustomToolCallOutputResource() (CustomToolCallOutputResource, error)

AsCustomToolCallOutputResource returns the union data inside the OutputItem as a CustomToolCallOutputResource

func (OutputItem) AsFileSearchToolCall

func (t OutputItem) AsFileSearchToolCall() (FileSearchToolCall, error)

AsFileSearchToolCall returns the union data inside the OutputItem as a FileSearchToolCall

func (OutputItem) AsFunctionShellCall

func (t OutputItem) AsFunctionShellCall() (FunctionShellCall, error)

AsFunctionShellCall returns the union data inside the OutputItem as a FunctionShellCall

func (OutputItem) AsFunctionShellCallOutput

func (t OutputItem) AsFunctionShellCallOutput() (FunctionShellCallOutput, error)

AsFunctionShellCallOutput returns the union data inside the OutputItem as a FunctionShellCallOutput

func (OutputItem) AsFunctionToolCall

func (t OutputItem) AsFunctionToolCall() (FunctionToolCall, error)

AsFunctionToolCall returns the union data inside the OutputItem as a FunctionToolCall

func (OutputItem) AsFunctionToolCallOutputResource

func (t OutputItem) AsFunctionToolCallOutputResource() (FunctionToolCallOutputResource, error)

AsFunctionToolCallOutputResource returns the union data inside the OutputItem as a FunctionToolCallOutputResource

func (OutputItem) AsImageGenToolCall

func (t OutputItem) AsImageGenToolCall() (ImageGenToolCall, error)

AsImageGenToolCall returns the union data inside the OutputItem as a ImageGenToolCall

func (OutputItem) AsLocalShellToolCall

func (t OutputItem) AsLocalShellToolCall() (LocalShellToolCall, error)

AsLocalShellToolCall returns the union data inside the OutputItem as a LocalShellToolCall

func (OutputItem) AsLocalShellToolCallOutput

func (t OutputItem) AsLocalShellToolCallOutput() (LocalShellToolCallOutput, error)

AsLocalShellToolCallOutput returns the union data inside the OutputItem as a LocalShellToolCallOutput

func (OutputItem) AsMCPApprovalRequest

func (t OutputItem) AsMCPApprovalRequest() (MCPApprovalRequest, error)

AsMCPApprovalRequest returns the union data inside the OutputItem as a MCPApprovalRequest

func (OutputItem) AsMCPApprovalResponseResource

func (t OutputItem) AsMCPApprovalResponseResource() (MCPApprovalResponseResource, error)

AsMCPApprovalResponseResource returns the union data inside the OutputItem as a MCPApprovalResponseResource

func (OutputItem) AsMCPListTools

func (t OutputItem) AsMCPListTools() (MCPListTools, error)

AsMCPListTools returns the union data inside the OutputItem as a MCPListTools

func (OutputItem) AsMCPToolCall

func (t OutputItem) AsMCPToolCall() (MCPToolCall, error)

AsMCPToolCall returns the union data inside the OutputItem as a MCPToolCall

func (OutputItem) AsOutputMessage

func (t OutputItem) AsOutputMessage() (OutputMessage, error)

AsOutputMessage returns the union data inside the OutputItem as a OutputMessage

func (OutputItem) AsProgram

func (t OutputItem) AsProgram() (Program, error)

AsProgram returns the union data inside the OutputItem as a Program

func (OutputItem) AsProgramOutput

func (t OutputItem) AsProgramOutput() (ProgramOutput, error)

AsProgramOutput returns the union data inside the OutputItem as a ProgramOutput

func (OutputItem) AsReasoningItem

func (t OutputItem) AsReasoningItem() (ReasoningItem, error)

AsReasoningItem returns the union data inside the OutputItem as a ReasoningItem

func (OutputItem) AsToolSearchCall

func (t OutputItem) AsToolSearchCall() (ToolSearchCall, error)

AsToolSearchCall returns the union data inside the OutputItem as a ToolSearchCall

func (OutputItem) AsToolSearchOutput

func (t OutputItem) AsToolSearchOutput() (ToolSearchOutput, error)

AsToolSearchOutput returns the union data inside the OutputItem as a ToolSearchOutput

func (OutputItem) AsWebSearchToolCall

func (t OutputItem) AsWebSearchToolCall() (WebSearchToolCall, error)

AsWebSearchToolCall returns the union data inside the OutputItem as a WebSearchToolCall

func (OutputItem) Discriminator

func (t OutputItem) Discriminator() (string, error)

func (*OutputItem) FromAdditionalTools

func (t *OutputItem) FromAdditionalTools(v AdditionalTools) error

FromAdditionalTools overwrites any union data inside the OutputItem as the provided AdditionalTools

func (*OutputItem) FromApplyPatchToolCall

func (t *OutputItem) FromApplyPatchToolCall(v ApplyPatchToolCall) error

FromApplyPatchToolCall overwrites any union data inside the OutputItem as the provided ApplyPatchToolCall

func (*OutputItem) FromApplyPatchToolCallOutput

func (t *OutputItem) FromApplyPatchToolCallOutput(v ApplyPatchToolCallOutput) error

FromApplyPatchToolCallOutput overwrites any union data inside the OutputItem as the provided ApplyPatchToolCallOutput

func (*OutputItem) FromCodeInterpreterToolCall

func (t *OutputItem) FromCodeInterpreterToolCall(v CodeInterpreterToolCall) error

FromCodeInterpreterToolCall overwrites any union data inside the OutputItem as the provided CodeInterpreterToolCall

func (*OutputItem) FromCompactionBody

func (t *OutputItem) FromCompactionBody(v CompactionBody) error

FromCompactionBody overwrites any union data inside the OutputItem as the provided CompactionBody

func (*OutputItem) FromComputerToolCall

func (t *OutputItem) FromComputerToolCall(v ComputerToolCall) error

FromComputerToolCall overwrites any union data inside the OutputItem as the provided ComputerToolCall

func (*OutputItem) FromComputerToolCallOutputResource

func (t *OutputItem) FromComputerToolCallOutputResource(v ComputerToolCallOutputResource) error

FromComputerToolCallOutputResource overwrites any union data inside the OutputItem as the provided ComputerToolCallOutputResource

func (*OutputItem) FromCustomToolCall

func (t *OutputItem) FromCustomToolCall(v CustomToolCall) error

FromCustomToolCall overwrites any union data inside the OutputItem as the provided CustomToolCall

func (*OutputItem) FromCustomToolCallOutputResource

func (t *OutputItem) FromCustomToolCallOutputResource(v CustomToolCallOutputResource) error

FromCustomToolCallOutputResource overwrites any union data inside the OutputItem as the provided CustomToolCallOutputResource

func (*OutputItem) FromFileSearchToolCall

func (t *OutputItem) FromFileSearchToolCall(v FileSearchToolCall) error

FromFileSearchToolCall overwrites any union data inside the OutputItem as the provided FileSearchToolCall

func (*OutputItem) FromFunctionShellCall

func (t *OutputItem) FromFunctionShellCall(v FunctionShellCall) error

FromFunctionShellCall overwrites any union data inside the OutputItem as the provided FunctionShellCall

func (*OutputItem) FromFunctionShellCallOutput

func (t *OutputItem) FromFunctionShellCallOutput(v FunctionShellCallOutput) error

FromFunctionShellCallOutput overwrites any union data inside the OutputItem as the provided FunctionShellCallOutput

func (*OutputItem) FromFunctionToolCall

func (t *OutputItem) FromFunctionToolCall(v FunctionToolCall) error

FromFunctionToolCall overwrites any union data inside the OutputItem as the provided FunctionToolCall

func (*OutputItem) FromFunctionToolCallOutputResource

func (t *OutputItem) FromFunctionToolCallOutputResource(v FunctionToolCallOutputResource) error

FromFunctionToolCallOutputResource overwrites any union data inside the OutputItem as the provided FunctionToolCallOutputResource

func (*OutputItem) FromImageGenToolCall

func (t *OutputItem) FromImageGenToolCall(v ImageGenToolCall) error

FromImageGenToolCall overwrites any union data inside the OutputItem as the provided ImageGenToolCall

func (*OutputItem) FromLocalShellToolCall

func (t *OutputItem) FromLocalShellToolCall(v LocalShellToolCall) error

FromLocalShellToolCall overwrites any union data inside the OutputItem as the provided LocalShellToolCall

func (*OutputItem) FromLocalShellToolCallOutput

func (t *OutputItem) FromLocalShellToolCallOutput(v LocalShellToolCallOutput) error

FromLocalShellToolCallOutput overwrites any union data inside the OutputItem as the provided LocalShellToolCallOutput

func (*OutputItem) FromMCPApprovalRequest

func (t *OutputItem) FromMCPApprovalRequest(v MCPApprovalRequest) error

FromMCPApprovalRequest overwrites any union data inside the OutputItem as the provided MCPApprovalRequest

func (*OutputItem) FromMCPApprovalResponseResource

func (t *OutputItem) FromMCPApprovalResponseResource(v MCPApprovalResponseResource) error

FromMCPApprovalResponseResource overwrites any union data inside the OutputItem as the provided MCPApprovalResponseResource

func (*OutputItem) FromMCPListTools

func (t *OutputItem) FromMCPListTools(v MCPListTools) error

FromMCPListTools overwrites any union data inside the OutputItem as the provided MCPListTools

func (*OutputItem) FromMCPToolCall

func (t *OutputItem) FromMCPToolCall(v MCPToolCall) error

FromMCPToolCall overwrites any union data inside the OutputItem as the provided MCPToolCall

func (*OutputItem) FromOutputMessage

func (t *OutputItem) FromOutputMessage(v OutputMessage) error

FromOutputMessage overwrites any union data inside the OutputItem as the provided OutputMessage

func (*OutputItem) FromProgram

func (t *OutputItem) FromProgram(v Program) error

FromProgram overwrites any union data inside the OutputItem as the provided Program

func (*OutputItem) FromProgramOutput

func (t *OutputItem) FromProgramOutput(v ProgramOutput) error

FromProgramOutput overwrites any union data inside the OutputItem as the provided ProgramOutput

func (*OutputItem) FromReasoningItem

func (t *OutputItem) FromReasoningItem(v ReasoningItem) error

FromReasoningItem overwrites any union data inside the OutputItem as the provided ReasoningItem

func (*OutputItem) FromToolSearchCall

func (t *OutputItem) FromToolSearchCall(v ToolSearchCall) error

FromToolSearchCall overwrites any union data inside the OutputItem as the provided ToolSearchCall

func (*OutputItem) FromToolSearchOutput

func (t *OutputItem) FromToolSearchOutput(v ToolSearchOutput) error

FromToolSearchOutput overwrites any union data inside the OutputItem as the provided ToolSearchOutput

func (*OutputItem) FromWebSearchToolCall

func (t *OutputItem) FromWebSearchToolCall(v WebSearchToolCall) error

FromWebSearchToolCall overwrites any union data inside the OutputItem as the provided WebSearchToolCall

func (OutputItem) MarshalJSON

func (t OutputItem) MarshalJSON() ([]byte, error)

func (*OutputItem) MergeAdditionalTools

func (t *OutputItem) MergeAdditionalTools(v AdditionalTools) error

MergeAdditionalTools performs a merge with any union data inside the OutputItem, using the provided AdditionalTools

func (*OutputItem) MergeApplyPatchToolCall

func (t *OutputItem) MergeApplyPatchToolCall(v ApplyPatchToolCall) error

MergeApplyPatchToolCall performs a merge with any union data inside the OutputItem, using the provided ApplyPatchToolCall

func (*OutputItem) MergeApplyPatchToolCallOutput

func (t *OutputItem) MergeApplyPatchToolCallOutput(v ApplyPatchToolCallOutput) error

MergeApplyPatchToolCallOutput performs a merge with any union data inside the OutputItem, using the provided ApplyPatchToolCallOutput

func (*OutputItem) MergeCodeInterpreterToolCall

func (t *OutputItem) MergeCodeInterpreterToolCall(v CodeInterpreterToolCall) error

MergeCodeInterpreterToolCall performs a merge with any union data inside the OutputItem, using the provided CodeInterpreterToolCall

func (*OutputItem) MergeCompactionBody

func (t *OutputItem) MergeCompactionBody(v CompactionBody) error

MergeCompactionBody performs a merge with any union data inside the OutputItem, using the provided CompactionBody

func (*OutputItem) MergeComputerToolCall

func (t *OutputItem) MergeComputerToolCall(v ComputerToolCall) error

MergeComputerToolCall performs a merge with any union data inside the OutputItem, using the provided ComputerToolCall

func (*OutputItem) MergeComputerToolCallOutputResource

func (t *OutputItem) MergeComputerToolCallOutputResource(v ComputerToolCallOutputResource) error

MergeComputerToolCallOutputResource performs a merge with any union data inside the OutputItem, using the provided ComputerToolCallOutputResource

func (*OutputItem) MergeCustomToolCall

func (t *OutputItem) MergeCustomToolCall(v CustomToolCall) error

MergeCustomToolCall performs a merge with any union data inside the OutputItem, using the provided CustomToolCall

func (*OutputItem) MergeCustomToolCallOutputResource

func (t *OutputItem) MergeCustomToolCallOutputResource(v CustomToolCallOutputResource) error

MergeCustomToolCallOutputResource performs a merge with any union data inside the OutputItem, using the provided CustomToolCallOutputResource

func (*OutputItem) MergeFileSearchToolCall

func (t *OutputItem) MergeFileSearchToolCall(v FileSearchToolCall) error

MergeFileSearchToolCall performs a merge with any union data inside the OutputItem, using the provided FileSearchToolCall

func (*OutputItem) MergeFunctionShellCall

func (t *OutputItem) MergeFunctionShellCall(v FunctionShellCall) error

MergeFunctionShellCall performs a merge with any union data inside the OutputItem, using the provided FunctionShellCall

func (*OutputItem) MergeFunctionShellCallOutput

func (t *OutputItem) MergeFunctionShellCallOutput(v FunctionShellCallOutput) error

MergeFunctionShellCallOutput performs a merge with any union data inside the OutputItem, using the provided FunctionShellCallOutput

func (*OutputItem) MergeFunctionToolCall

func (t *OutputItem) MergeFunctionToolCall(v FunctionToolCall) error

MergeFunctionToolCall performs a merge with any union data inside the OutputItem, using the provided FunctionToolCall

func (*OutputItem) MergeFunctionToolCallOutputResource

func (t *OutputItem) MergeFunctionToolCallOutputResource(v FunctionToolCallOutputResource) error

MergeFunctionToolCallOutputResource performs a merge with any union data inside the OutputItem, using the provided FunctionToolCallOutputResource

func (*OutputItem) MergeImageGenToolCall

func (t *OutputItem) MergeImageGenToolCall(v ImageGenToolCall) error

MergeImageGenToolCall performs a merge with any union data inside the OutputItem, using the provided ImageGenToolCall

func (*OutputItem) MergeLocalShellToolCall

func (t *OutputItem) MergeLocalShellToolCall(v LocalShellToolCall) error

MergeLocalShellToolCall performs a merge with any union data inside the OutputItem, using the provided LocalShellToolCall

func (*OutputItem) MergeLocalShellToolCallOutput

func (t *OutputItem) MergeLocalShellToolCallOutput(v LocalShellToolCallOutput) error

MergeLocalShellToolCallOutput performs a merge with any union data inside the OutputItem, using the provided LocalShellToolCallOutput

func (*OutputItem) MergeMCPApprovalRequest

func (t *OutputItem) MergeMCPApprovalRequest(v MCPApprovalRequest) error

MergeMCPApprovalRequest performs a merge with any union data inside the OutputItem, using the provided MCPApprovalRequest

func (*OutputItem) MergeMCPApprovalResponseResource

func (t *OutputItem) MergeMCPApprovalResponseResource(v MCPApprovalResponseResource) error

MergeMCPApprovalResponseResource performs a merge with any union data inside the OutputItem, using the provided MCPApprovalResponseResource

func (*OutputItem) MergeMCPListTools

func (t *OutputItem) MergeMCPListTools(v MCPListTools) error

MergeMCPListTools performs a merge with any union data inside the OutputItem, using the provided MCPListTools

func (*OutputItem) MergeMCPToolCall

func (t *OutputItem) MergeMCPToolCall(v MCPToolCall) error

MergeMCPToolCall performs a merge with any union data inside the OutputItem, using the provided MCPToolCall

func (*OutputItem) MergeOutputMessage

func (t *OutputItem) MergeOutputMessage(v OutputMessage) error

MergeOutputMessage performs a merge with any union data inside the OutputItem, using the provided OutputMessage

func (*OutputItem) MergeProgram

func (t *OutputItem) MergeProgram(v Program) error

MergeProgram performs a merge with any union data inside the OutputItem, using the provided Program

func (*OutputItem) MergeProgramOutput

func (t *OutputItem) MergeProgramOutput(v ProgramOutput) error

MergeProgramOutput performs a merge with any union data inside the OutputItem, using the provided ProgramOutput

func (*OutputItem) MergeReasoningItem

func (t *OutputItem) MergeReasoningItem(v ReasoningItem) error

MergeReasoningItem performs a merge with any union data inside the OutputItem, using the provided ReasoningItem

func (*OutputItem) MergeToolSearchCall

func (t *OutputItem) MergeToolSearchCall(v ToolSearchCall) error

MergeToolSearchCall performs a merge with any union data inside the OutputItem, using the provided ToolSearchCall

func (*OutputItem) MergeToolSearchOutput

func (t *OutputItem) MergeToolSearchOutput(v ToolSearchOutput) error

MergeToolSearchOutput performs a merge with any union data inside the OutputItem, using the provided ToolSearchOutput

func (*OutputItem) MergeWebSearchToolCall

func (t *OutputItem) MergeWebSearchToolCall(v WebSearchToolCall) error

MergeWebSearchToolCall performs a merge with any union data inside the OutputItem, using the provided WebSearchToolCall

func (*OutputItem) UnmarshalJSON

func (t *OutputItem) UnmarshalJSON(b []byte) error

func (OutputItem) ValueByDiscriminator

func (t OutputItem) ValueByDiscriminator() (interface{}, error)

type OutputMessage

type OutputMessage struct {
	// Content The content of the output message.
	Content []OutputMessageContent `json:"content"`

	// Id The unique ID of the output message.
	Id    string        `json:"id"`
	Phase *MessagePhase `json:"phase,omitempty"`

	// Role The role of the output message. Always `assistant`.
	Role OutputMessageRole `json:"role"`

	// Status The status of the message input. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when input items are returned via API.
	Status OutputMessageStatus `json:"status"`

	// Type The type of the output message. Always `message`.
	Type OutputMessageType `json:"type"`
}

OutputMessage An output message from the model.

type OutputMessageContent

type OutputMessageContent struct {
	// contains filtered or unexported fields
}

OutputMessageContent defines model for OutputMessageContent.

func (OutputMessageContent) AsOutputTextContent

func (t OutputMessageContent) AsOutputTextContent() (OutputTextContent, error)

AsOutputTextContent returns the union data inside the OutputMessageContent as a OutputTextContent

func (OutputMessageContent) AsRefusalContent

func (t OutputMessageContent) AsRefusalContent() (RefusalContent, error)

AsRefusalContent returns the union data inside the OutputMessageContent as a RefusalContent

func (OutputMessageContent) Discriminator

func (t OutputMessageContent) Discriminator() (string, error)

func (*OutputMessageContent) FromOutputTextContent

func (t *OutputMessageContent) FromOutputTextContent(v OutputTextContent) error

FromOutputTextContent overwrites any union data inside the OutputMessageContent as the provided OutputTextContent

func (*OutputMessageContent) FromRefusalContent

func (t *OutputMessageContent) FromRefusalContent(v RefusalContent) error

FromRefusalContent overwrites any union data inside the OutputMessageContent as the provided RefusalContent

func (OutputMessageContent) MarshalJSON

func (t OutputMessageContent) MarshalJSON() ([]byte, error)

func (*OutputMessageContent) MergeOutputTextContent

func (t *OutputMessageContent) MergeOutputTextContent(v OutputTextContent) error

MergeOutputTextContent performs a merge with any union data inside the OutputMessageContent, using the provided OutputTextContent

func (*OutputMessageContent) MergeRefusalContent

func (t *OutputMessageContent) MergeRefusalContent(v RefusalContent) error

MergeRefusalContent performs a merge with any union data inside the OutputMessageContent, using the provided RefusalContent

func (*OutputMessageContent) UnmarshalJSON

func (t *OutputMessageContent) UnmarshalJSON(b []byte) error

func (OutputMessageContent) ValueByDiscriminator

func (t OutputMessageContent) ValueByDiscriminator() (interface{}, error)

type OutputMessageRole

type OutputMessageRole string

OutputMessageRole The role of the output message. Always `assistant`.

const (
	OutputMessageRoleAssistant OutputMessageRole = "assistant"
)

Defines values for OutputMessageRole.

func (OutputMessageRole) Valid

func (e OutputMessageRole) Valid() bool

Valid indicates whether the value is a known member of the OutputMessageRole enum.

type OutputMessageStatus

type OutputMessageStatus string

OutputMessageStatus The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

const (
	OutputMessageStatusCompleted  OutputMessageStatus = "completed"
	OutputMessageStatusInProgress OutputMessageStatus = "in_progress"
	OutputMessageStatusIncomplete OutputMessageStatus = "incomplete"
)

Defines values for OutputMessageStatus.

func (OutputMessageStatus) Valid

func (e OutputMessageStatus) Valid() bool

Valid indicates whether the value is a known member of the OutputMessageStatus enum.

type OutputMessageType

type OutputMessageType string

OutputMessageType The type of the output message. Always `message`.

const (
	OutputMessageTypeMessage OutputMessageType = "message"
)

Defines values for OutputMessageType.

func (OutputMessageType) Valid

func (e OutputMessageType) Valid() bool

Valid indicates whether the value is a known member of the OutputMessageType enum.

type OutputTextContent

type OutputTextContent struct {
	// Annotations The annotations of the text output.
	Annotations []Annotation `json:"annotations"`
	Logprobs    []LogProb    `json:"logprobs"`

	// Text The text output from the model.
	Text string `json:"text"`

	// Type The type of the output text. Always `output_text`.
	Type OutputTextContentType `json:"type"`
}

OutputTextContent A text output from the model.

type OutputTextContentType

type OutputTextContentType string

OutputTextContentType The type of the output text. Always `output_text`.

const (
	OutputText OutputTextContentType = "output_text"
)

Defines values for OutputTextContentType.

func (OutputTextContentType) Valid

func (e OutputTextContentType) Valid() bool

Valid indicates whether the value is a known member of the OutputTextContentType enum.

type Program

type Program struct {
	// CallId The stable call ID of the program item.
	CallId string `json:"call_id"`

	// Code The JavaScript source executed by programmatic tool calling.
	Code string `json:"code"`

	// Fingerprint Opaque program replay fingerprint that must be round-tripped.
	Fingerprint string `json:"fingerprint"`

	// Id The unique ID of the program item.
	Id string `json:"id"`

	// Type The type of the item. Always `program`.
	Type ProgramType `json:"type"`
}

Program defines model for Program.

type ProgramItemParam

type ProgramItemParam struct {
	// CallId The stable call ID of the program item.
	CallId string `json:"call_id"`

	// Code The JavaScript source executed by programmatic tool calling.
	Code string `json:"code"`

	// Fingerprint Opaque program replay fingerprint that must be round-tripped.
	Fingerprint string `json:"fingerprint"`

	// Id The unique ID of this program item.
	Id string `json:"id"`

	// Type The item type. Always `program`.
	Type ProgramItemParamType `json:"type"`
}

ProgramItemParam defines model for ProgramItemParam.

type ProgramItemParamType

type ProgramItemParamType string

ProgramItemParamType The item type. Always `program`.

const (
	ProgramItemParamTypeProgram ProgramItemParamType = "program"
)

Defines values for ProgramItemParamType.

func (ProgramItemParamType) Valid

func (e ProgramItemParamType) Valid() bool

Valid indicates whether the value is a known member of the ProgramItemParamType enum.

type ProgramOutput

type ProgramOutput struct {
	// CallId The call ID of the program item.
	CallId string `json:"call_id"`

	// Id The unique ID of the program output item.
	Id string `json:"id"`

	// Result The result produced by the program item.
	Result string `json:"result"`

	// Status The terminal status of the program output item.
	Status ProgramOutputStatus `json:"status"`

	// Type The type of the item. Always `program_output`.
	Type ProgramOutputType `json:"type"`
}

ProgramOutput defines model for ProgramOutput.

type ProgramOutputItemParam

type ProgramOutputItemParam struct {
	// CallId The call ID of the program item.
	CallId string `json:"call_id"`

	// Id The unique ID of this program output item.
	Id string `json:"id"`

	// Result The result produced by the program item.
	Result string `json:"result"`

	// Status The terminal status of the program output.
	Status ProgramOutputItemStatus `json:"status"`

	// Type The item type. Always `program_output`.
	Type ProgramOutputItemParamType `json:"type"`
}

ProgramOutputItemParam defines model for ProgramOutputItemParam.

type ProgramOutputItemParamType

type ProgramOutputItemParamType string

ProgramOutputItemParamType The item type. Always `program_output`.

const (
	ProgramOutputItemParamTypeProgramOutput ProgramOutputItemParamType = "program_output"
)

Defines values for ProgramOutputItemParamType.

func (ProgramOutputItemParamType) Valid

func (e ProgramOutputItemParamType) Valid() bool

Valid indicates whether the value is a known member of the ProgramOutputItemParamType enum.

type ProgramOutputItemStatus

type ProgramOutputItemStatus string

ProgramOutputItemStatus defines model for ProgramOutputItemStatus.

const (
	ProgramOutputItemStatusCompleted  ProgramOutputItemStatus = "completed"
	ProgramOutputItemStatusIncomplete ProgramOutputItemStatus = "incomplete"
)

Defines values for ProgramOutputItemStatus.

func (ProgramOutputItemStatus) Valid

func (e ProgramOutputItemStatus) Valid() bool

Valid indicates whether the value is a known member of the ProgramOutputItemStatus enum.

type ProgramOutputStatus

type ProgramOutputStatus string

ProgramOutputStatus defines model for ProgramOutputStatus.

const (
	ProgramOutputStatusCompleted  ProgramOutputStatus = "completed"
	ProgramOutputStatusIncomplete ProgramOutputStatus = "incomplete"
)

Defines values for ProgramOutputStatus.

func (ProgramOutputStatus) Valid

func (e ProgramOutputStatus) Valid() bool

Valid indicates whether the value is a known member of the ProgramOutputStatus enum.

type ProgramOutputType

type ProgramOutputType string

ProgramOutputType The type of the item. Always `program_output`.

const (
	ProgramOutputTypeProgramOutput ProgramOutputType = "program_output"
)

Defines values for ProgramOutputType.

func (ProgramOutputType) Valid

func (e ProgramOutputType) Valid() bool

Valid indicates whether the value is a known member of the ProgramOutputType enum.

type ProgramToolCallCaller

type ProgramToolCallCaller struct {
	// CallerId The call ID of the program item that produced this tool call.
	CallerId string                    `json:"caller_id"`
	Type     ProgramToolCallCallerType `json:"type"`
}

ProgramToolCallCaller defines model for ProgramToolCallCaller.

type ProgramToolCallCallerParam

type ProgramToolCallCallerParam struct {
	// CallerId The call ID of the program item that produced this tool call.
	CallerId string `json:"caller_id"`

	// Type The caller type. Always `program`.
	Type ProgramToolCallCallerParamType `json:"type"`
}

ProgramToolCallCallerParam defines model for ProgramToolCallCallerParam.

type ProgramToolCallCallerParamType

type ProgramToolCallCallerParamType string

ProgramToolCallCallerParamType The caller type. Always `program`.

const (
	ProgramToolCallCallerParamTypeProgram ProgramToolCallCallerParamType = "program"
)

Defines values for ProgramToolCallCallerParamType.

func (ProgramToolCallCallerParamType) Valid

Valid indicates whether the value is a known member of the ProgramToolCallCallerParamType enum.

type ProgramToolCallCallerType

type ProgramToolCallCallerType string

ProgramToolCallCallerType defines model for ProgramToolCallCaller.Type.

const (
	ProgramToolCallCallerTypeProgram ProgramToolCallCallerType = "program"
)

Defines values for ProgramToolCallCallerType.

func (ProgramToolCallCallerType) Valid

func (e ProgramToolCallCallerType) Valid() bool

Valid indicates whether the value is a known member of the ProgramToolCallCallerType enum.

type ProgramType

type ProgramType string

ProgramType The type of the item. Always `program`.

const (
	ProgramTypeProgram ProgramType = "program"
)

Defines values for ProgramType.

func (ProgramType) Valid

func (e ProgramType) Valid() bool

Valid indicates whether the value is a known member of the ProgramType enum.

type ProgrammaticToolCallingParam

type ProgrammaticToolCallingParam struct {
	// Type The type of the tool. Always `programmatic_tool_calling`.
	Type ProgrammaticToolCallingParamType `json:"type"`
}

ProgrammaticToolCallingParam defines model for ProgrammaticToolCallingParam.

type ProgrammaticToolCallingParamType

type ProgrammaticToolCallingParamType string

ProgrammaticToolCallingParamType The type of the tool. Always `programmatic_tool_calling`.

const (
	ProgrammaticToolCallingParamTypeProgrammaticToolCalling ProgrammaticToolCallingParamType = "programmatic_tool_calling"
)

Defines values for ProgrammaticToolCallingParamType.

func (ProgrammaticToolCallingParamType) Valid

Valid indicates whether the value is a known member of the ProgrammaticToolCallingParamType enum.

type Prompt

type Prompt struct {
	// Id The unique identifier of the prompt template to use.
	Id        string                   `json:"id"`
	Variables *ResponsePromptVariables `json:"variables,omitempty"`
	Version   *string                  `json:"version,omitempty"`
}

Prompt defines model for Prompt.

type PromptCacheBreakpointConfig

type PromptCacheBreakpointConfig struct {
	// Mode The breakpoint mode. Always `explicit`.
	Mode PromptCacheBreakpointConfigMode `json:"mode"`
}

PromptCacheBreakpointConfig Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.

type PromptCacheBreakpointConfigMode

type PromptCacheBreakpointConfigMode string

PromptCacheBreakpointConfigMode The breakpoint mode. Always `explicit`.

const (
	PromptCacheBreakpointConfigModeExplicit PromptCacheBreakpointConfigMode = "explicit"
)

Defines values for PromptCacheBreakpointConfigMode.

func (PromptCacheBreakpointConfigMode) Valid

Valid indicates whether the value is a known member of the PromptCacheBreakpointConfigMode enum.

type PromptCacheBreakpointParam

type PromptCacheBreakpointParam struct {
	// Mode The breakpoint mode. Always `explicit`.
	Mode PromptCacheBreakpointParamMode `json:"mode"`
}

PromptCacheBreakpointParam Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.

type PromptCacheBreakpointParamMode

type PromptCacheBreakpointParamMode string

PromptCacheBreakpointParamMode The breakpoint mode. Always `explicit`.

const (
	PromptCacheBreakpointParamModeExplicit PromptCacheBreakpointParamMode = "explicit"
)

Defines values for PromptCacheBreakpointParamMode.

func (PromptCacheBreakpointParamMode) Valid

Valid indicates whether the value is a known member of the PromptCacheBreakpointParamMode enum.

type PromptCacheModeEnum

type PromptCacheModeEnum string

PromptCacheModeEnum defines model for PromptCacheModeEnum.

const (
	PromptCacheModeEnumExplicit PromptCacheModeEnum = "explicit"
	PromptCacheModeEnumImplicit PromptCacheModeEnum = "implicit"
)

Defines values for PromptCacheModeEnum.

func (PromptCacheModeEnum) Valid

func (e PromptCacheModeEnum) Valid() bool

Valid indicates whether the value is a known member of the PromptCacheModeEnum enum.

type PromptCacheOptions

type PromptCacheOptions struct {
	// Mode Whether implicit prompt-cache breakpoints were enabled.
	Mode PromptCacheModeEnum `json:"mode"`

	// Ttl The minimum lifetime applied to each cache breakpoint.
	Ttl PromptCacheTTLEnum `json:"ttl"`
}

PromptCacheOptions The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

type PromptCacheOptionsParam

type PromptCacheOptionsParam struct {
	// Mode Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.
	Mode *PromptCacheModeEnum `json:"mode,omitempty"`

	// Ttl The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.
	Ttl *PromptCacheTTLEnum `json:"ttl,omitempty"`
}

PromptCacheOptionsParam Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/docs/guides/prompt-caching) for current details.

type PromptCacheTTLEnum

type PromptCacheTTLEnum string

PromptCacheTTLEnum defines model for PromptCacheTTLEnum.

const (
	N30m PromptCacheTTLEnum = "30m"
)

Defines values for PromptCacheTTLEnum.

func (PromptCacheTTLEnum) Valid

func (e PromptCacheTTLEnum) Valid() bool

Valid indicates whether the value is a known member of the PromptCacheTTLEnum enum.

type RankerVersionType

type RankerVersionType string

RankerVersionType defines model for RankerVersionType.

const (
	RankerVersionTypeAuto            RankerVersionType = "auto"
	RankerVersionTypeDefault20241115 RankerVersionType = "default-2024-11-15"
)

Defines values for RankerVersionType.

func (RankerVersionType) Valid

func (e RankerVersionType) Valid() bool

Valid indicates whether the value is a known member of the RankerVersionType enum.

type RankingOptions

type RankingOptions struct {
	// HybridSearch Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
	HybridSearch *HybridSearchOptions `json:"hybrid_search,omitempty"`

	// Ranker The ranker to use for the file search.
	Ranker *RankerVersionType `json:"ranker,omitempty"`

	// ScoreThreshold The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
	ScoreThreshold *float32 `json:"score_threshold,omitempty"`
}

RankingOptions defines model for RankingOptions.

type Reasoning

type Reasoning struct {
	Context         *ReasoningContext         `json:"context,omitempty"`
	Effort          *ReasoningEffort          `json:"effort,omitempty"`
	GenerateSummary *ReasoningGenerateSummary `json:"generate_summary,omitempty"`

	// Mode Controls the reasoning execution mode for the request.
	//
	// When returned on a response, this is the effective execution mode.
	Mode    *ReasoningModeEnum `json:"mode,omitempty"`
	Summary *ReasoningSummary  `json:"summary,omitempty"`
}

Reasoning **gpt-5 and o-series models only**

Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).

type ReasoningContext

type ReasoningContext string

ReasoningContext Controls which reasoning items are rendered back to the model on later turns. If omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` model family defaults to `all_turns`; earlier models default to `current_turn`.

When returned on a response, this is the effective reasoning context mode used for the response.

const (
	ReasoningContextAllTurns    ReasoningContext = "all_turns"
	ReasoningContextAuto        ReasoningContext = "auto"
	ReasoningContextCurrentTurn ReasoningContext = "current_turn"
)

Defines values for ReasoningContext.

func (ReasoningContext) Valid

func (e ReasoningContext) Valid() bool

Valid indicates whether the value is a known member of the ReasoningContext enum.

type ReasoningEffort

type ReasoningEffort string

ReasoningEffort defines model for ReasoningEffort.

type ReasoningGenerateSummary deprecated

type ReasoningGenerateSummary string

ReasoningGenerateSummary **Deprecated:** use `summary` instead.

A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of `auto`, `concise`, or `detailed`.

Deprecated: this type has been marked as deprecated upstream, but no `x-deprecated-reason` was set

const (
	ReasoningGenerateSummaryAuto     ReasoningGenerateSummary = "auto"
	ReasoningGenerateSummaryConcise  ReasoningGenerateSummary = "concise"
	ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
)

Defines values for ReasoningGenerateSummary.

func (ReasoningGenerateSummary) Valid

func (e ReasoningGenerateSummary) Valid() bool

Valid indicates whether the value is a known member of the ReasoningGenerateSummary enum.

type ReasoningItem

type ReasoningItem struct {
	// Content Reasoning text content.
	Content          *[]ReasoningTextContent `json:"content,omitempty"`
	EncryptedContent *string                 `json:"encrypted_content,omitempty"`

	// Id The unique identifier of the reasoning content.
	Id string `json:"id"`

	// Status The status of the item. One of `in_progress`, `completed`, or
	// `incomplete`. Populated when items are returned via API.
	Status *ReasoningItemStatus `json:"status,omitempty"`

	// Summary Reasoning summary content.
	Summary []SummaryTextContent `json:"summary"`

	// Type The type of the object. Always `reasoning`.
	Type ReasoningItemType `json:"type"`
}

ReasoningItem A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually [managing context](/docs/guides/conversation-state).

type ReasoningItemStatus

type ReasoningItemStatus string

ReasoningItemStatus The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

const (
	ReasoningItemStatusCompleted  ReasoningItemStatus = "completed"
	ReasoningItemStatusInProgress ReasoningItemStatus = "in_progress"
	ReasoningItemStatusIncomplete ReasoningItemStatus = "incomplete"
)

Defines values for ReasoningItemStatus.

func (ReasoningItemStatus) Valid

func (e ReasoningItemStatus) Valid() bool

Valid indicates whether the value is a known member of the ReasoningItemStatus enum.

type ReasoningItemType

type ReasoningItemType string

ReasoningItemType The type of the object. Always `reasoning`.

const (
	ReasoningItemTypeReasoning ReasoningItemType = "reasoning"
)

Defines values for ReasoningItemType.

func (ReasoningItemType) Valid

func (e ReasoningItemType) Valid() bool

Valid indicates whether the value is a known member of the ReasoningItemType enum.

type ReasoningModeEnum

type ReasoningModeEnum struct {
	// contains filtered or unexported fields
}

ReasoningModeEnum defines model for ReasoningModeEnum.

func (ReasoningModeEnum) AsReasoningModeEnum0

func (t ReasoningModeEnum) AsReasoningModeEnum0() (ReasoningModeEnum0, error)

AsReasoningModeEnum0 returns the union data inside the ReasoningModeEnum as a ReasoningModeEnum0

func (ReasoningModeEnum) AsReasoningModeEnum1

func (t ReasoningModeEnum) AsReasoningModeEnum1() (ReasoningModeEnum1, error)

AsReasoningModeEnum1 returns the union data inside the ReasoningModeEnum as a ReasoningModeEnum1

func (*ReasoningModeEnum) FromReasoningModeEnum0

func (t *ReasoningModeEnum) FromReasoningModeEnum0(v ReasoningModeEnum0) error

FromReasoningModeEnum0 overwrites any union data inside the ReasoningModeEnum as the provided ReasoningModeEnum0

func (*ReasoningModeEnum) FromReasoningModeEnum1

func (t *ReasoningModeEnum) FromReasoningModeEnum1(v ReasoningModeEnum1) error

FromReasoningModeEnum1 overwrites any union data inside the ReasoningModeEnum as the provided ReasoningModeEnum1

func (ReasoningModeEnum) MarshalJSON

func (t ReasoningModeEnum) MarshalJSON() ([]byte, error)

func (*ReasoningModeEnum) MergeReasoningModeEnum0

func (t *ReasoningModeEnum) MergeReasoningModeEnum0(v ReasoningModeEnum0) error

MergeReasoningModeEnum0 performs a merge with any union data inside the ReasoningModeEnum, using the provided ReasoningModeEnum0

func (*ReasoningModeEnum) MergeReasoningModeEnum1

func (t *ReasoningModeEnum) MergeReasoningModeEnum1(v ReasoningModeEnum1) error

MergeReasoningModeEnum1 performs a merge with any union data inside the ReasoningModeEnum, using the provided ReasoningModeEnum1

func (*ReasoningModeEnum) UnmarshalJSON

func (t *ReasoningModeEnum) UnmarshalJSON(b []byte) error

type ReasoningModeEnum0

type ReasoningModeEnum0 = string

ReasoningModeEnum0 defines model for ReasoningModeEnum.0.

type ReasoningModeEnum1

type ReasoningModeEnum1 string

ReasoningModeEnum1 defines model for ReasoningModeEnum.1.

const (
	Pro      ReasoningModeEnum1 = "pro"
	Standard ReasoningModeEnum1 = "standard"
)

Defines values for ReasoningModeEnum1.

func (ReasoningModeEnum1) Valid

func (e ReasoningModeEnum1) Valid() bool

Valid indicates whether the value is a known member of the ReasoningModeEnum1 enum.

type ReasoningSummary

type ReasoningSummary string

ReasoningSummary A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of `auto`, `concise`, or `detailed`.

`concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

const (
	ReasoningSummaryAuto     ReasoningSummary = "auto"
	ReasoningSummaryConcise  ReasoningSummary = "concise"
	ReasoningSummaryDetailed ReasoningSummary = "detailed"
)

Defines values for ReasoningSummary.

func (ReasoningSummary) Valid

func (e ReasoningSummary) Valid() bool

Valid indicates whether the value is a known member of the ReasoningSummary enum.

type ReasoningTextContent

type ReasoningTextContent struct {
	// Text The reasoning text from the model.
	Text string `json:"text"`

	// Type The type of the reasoning text. Always `reasoning_text`.
	Type ReasoningTextContentType `json:"type"`
}

ReasoningTextContent Reasoning text from the model.

type ReasoningTextContentType

type ReasoningTextContentType string

ReasoningTextContentType The type of the reasoning text. Always `reasoning_text`.

const (
	ReasoningText ReasoningTextContentType = "reasoning_text"
)

Defines values for ReasoningTextContentType.

func (ReasoningTextContentType) Valid

func (e ReasoningTextContentType) Valid() bool

Valid indicates whether the value is a known member of the ReasoningTextContentType enum.

type RefusalContent

type RefusalContent struct {
	// Refusal The refusal explanation from the model.
	Refusal string `json:"refusal"`

	// Type The type of the refusal. Always `refusal`.
	Type RefusalContentType `json:"type"`
}

RefusalContent A refusal from the model.

type RefusalContentType

type RefusalContentType string

RefusalContentType The type of the refusal. Always `refusal`.

const (
	Refusal RefusalContentType = "refusal"
)

Defines values for RefusalContentType.

func (RefusalContentType) Valid

func (e RefusalContentType) Valid() bool

Valid indicates whether the value is a known member of the RefusalContentType enum.

type Response

type Response struct {
	Background   *bool                 `json:"background,omitempty"`
	CompletedAt  *float32              `json:"completed_at,omitempty"`
	Conversation *ResponseConversation `json:"conversation,omitempty"`

	// CreatedAt Unix timestamp (in seconds) of when this Response was created.
	CreatedAt float32        `json:"created_at"`
	Error     *ResponseError `json:"error"`

	// Id Unique identifier for this Response.
	Id                string `json:"id"`
	IncompleteDetails *struct {
		// Reason The reason why the response is incomplete.
		Reason *ResponseIncompleteDetailsReason `json:"reason,omitempty"`
	} `json:"incomplete_details"`
	Instructions *struct {
		// contains filtered or unexported fields
	} `json:"instructions"`
	MaxOutputTokens *int      `json:"max_output_tokens,omitempty"`
	MaxToolCalls    *int      `json:"max_tool_calls,omitempty"`
	Metadata        *Metadata `json:"metadata"`

	// Model Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
	// offers a wide range of models with different capabilities, performance
	// characteristics, and price points. Refer to the [model guide](/docs/models)
	// to browse and compare available models.
	Model      ModelIdsResponses `json:"model"`
	Moderation *Moderation       `json:"moderation,omitempty"`

	// Object The object type of this resource - always set to `response`.
	Object ResponseObject `json:"object"`

	// Output An array of content items generated by the model.
	//
	// - The length and order of items in the `output` array is dependent
	//   on the model's response.
	// - Rather than accessing the first item in the `output` array and
	//   assuming it's an `assistant` message with the content generated by
	//   the model, you might consider using the `output_text` property where
	//   supported in SDKs.
	Output     []OutputItem `json:"output"`
	OutputText *string      `json:"output_text,omitempty"`

	// ParallelToolCalls Whether to allow the model to run tool calls in parallel.
	ParallelToolCalls  bool    `json:"parallel_tool_calls"`
	PreviousResponseId *string `json:"previous_response_id,omitempty"`
	Prompt             *Prompt `json:"prompt,omitempty"`
	PromptCacheKey     *string `json:"prompt_cache_key,omitempty"`

	// PromptCacheOptions The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.
	PromptCacheOptions *PromptCacheOptions `json:"prompt_cache_options,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PromptCacheRetention *ResponsePromptCacheRetention `json:"prompt_cache_retention,omitempty"`
	Reasoning            *Reasoning                    `json:"reasoning,omitempty"`
	SafetyIdentifier     *string                       `json:"safety_identifier,omitempty"`
	ServiceTier          *ServiceTier                  `json:"service_tier,omitempty"`

	// Status The status of the response generation. One of `completed`, `failed`,
	// `in_progress`, `cancelled`, `queued`, or `incomplete`.
	Status      *ResponseStatus `json:"status,omitempty"`
	Temperature *float32        `json:"temperature"`

	// Text Configuration options for a text response from the model. Can be plain
	// text or structured JSON data. Learn more:
	// - [Text inputs and outputs](/docs/guides/text)
	// - [Structured Outputs](/docs/guides/structured-outputs)
	Text *ResponseTextParam `json:"text,omitempty"`

	// ToolChoice How the model should select which tool (or tools) to use when generating
	// a response. See the `tools` parameter to see how to specify which tools
	// the model can call.
	ToolChoice ToolChoiceParam `json:"tool_choice"`

	// Tools An array of tools the model may call while generating a response. You
	// can specify which tool to use by setting the `tool_choice` parameter.
	//
	// We support the following categories of tools:
	// - **Built-in tools**: Tools that are provided by OpenAI that extend the
	//   model's capabilities, like [web search](/docs/guides/tools-web-search)
	//   or [file search](/docs/guides/tools-file-search). Learn more about
	//   [built-in tools](/docs/guides/tools).
	// - **MCP Tools**: Integrations with third-party systems via custom MCP servers
	//   or predefined connectors such as Google Drive and SharePoint. Learn more about
	//   [MCP Tools](/docs/guides/tools-connectors-mcp).
	// - **Function calls (custom tools)**: Functions that are defined by you,
	//   enabling the model to call your own code with strongly typed arguments
	//   and outputs. Learn more about
	//   [function calling](/docs/guides/function-calling). You can also use
	//   custom tools to call your own code.
	Tools       ToolsArray          `json:"tools"`
	TopLogprobs *int                `json:"top_logprobs,omitempty"`
	TopP        *float32            `json:"top_p"`
	Truncation  *ResponseTruncation `json:"truncation,omitempty"`

	// Usage Represents token usage details including input tokens, output tokens,
	// a breakdown of output tokens, and the total tokens used.
	Usage *ResponseUsage `json:"usage,omitempty"`

	// User This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
	// A stable identifier for your end-users.
	// Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	User *string `json:"user,omitempty"`
}

Response defines model for Response.

type ResponseAudioDeltaEvent

type ResponseAudioDeltaEvent struct {
	// Delta A chunk of Base64 encoded response audio bytes.
	Delta string `json:"delta"`

	// SequenceNumber A sequence number for this chunk of the stream response.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.audio.delta`.
	Type ResponseAudioDeltaEventType `json:"type"`
}

ResponseAudioDeltaEvent Emitted when there is a partial audio response.

type ResponseAudioDeltaEventType

type ResponseAudioDeltaEventType string

ResponseAudioDeltaEventType The type of the event. Always `response.audio.delta`.

const (
	ResponseAudioDelta ResponseAudioDeltaEventType = "response.audio.delta"
)

Defines values for ResponseAudioDeltaEventType.

func (ResponseAudioDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseAudioDeltaEventType enum.

type ResponseAudioDoneEvent

type ResponseAudioDoneEvent struct {
	// SequenceNumber The sequence number of the delta.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.audio.done`.
	Type ResponseAudioDoneEventType `json:"type"`
}

ResponseAudioDoneEvent Emitted when the audio response is complete.

type ResponseAudioDoneEventType

type ResponseAudioDoneEventType string

ResponseAudioDoneEventType The type of the event. Always `response.audio.done`.

const (
	ResponseAudioDone ResponseAudioDoneEventType = "response.audio.done"
)

Defines values for ResponseAudioDoneEventType.

func (ResponseAudioDoneEventType) Valid

func (e ResponseAudioDoneEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseAudioDoneEventType enum.

type ResponseAudioTranscriptDeltaEvent

type ResponseAudioTranscriptDeltaEvent struct {
	// Delta The partial transcript of the audio response.
	Delta string `json:"delta"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.audio.transcript.delta`.
	Type ResponseAudioTranscriptDeltaEventType `json:"type"`
}

ResponseAudioTranscriptDeltaEvent Emitted when there is a partial transcript of audio.

type ResponseAudioTranscriptDeltaEventType

type ResponseAudioTranscriptDeltaEventType string

ResponseAudioTranscriptDeltaEventType The type of the event. Always `response.audio.transcript.delta`.

const (
	ResponseAudioTranscriptDelta ResponseAudioTranscriptDeltaEventType = "response.audio.transcript.delta"
)

Defines values for ResponseAudioTranscriptDeltaEventType.

func (ResponseAudioTranscriptDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseAudioTranscriptDeltaEventType enum.

type ResponseAudioTranscriptDoneEvent

type ResponseAudioTranscriptDoneEvent struct {
	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.audio.transcript.done`.
	Type ResponseAudioTranscriptDoneEventType `json:"type"`
}

ResponseAudioTranscriptDoneEvent Emitted when the full audio transcript is completed.

type ResponseAudioTranscriptDoneEventType

type ResponseAudioTranscriptDoneEventType string

ResponseAudioTranscriptDoneEventType The type of the event. Always `response.audio.transcript.done`.

const (
	ResponseAudioTranscriptDone ResponseAudioTranscriptDoneEventType = "response.audio.transcript.done"
)

Defines values for ResponseAudioTranscriptDoneEventType.

func (ResponseAudioTranscriptDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseAudioTranscriptDoneEventType enum.

type ResponseCodeInterpreterCallCodeDeltaEvent

type ResponseCodeInterpreterCallCodeDeltaEvent struct {
	// Delta The partial code snippet being streamed by the code interpreter.
	Delta string `json:"delta"`

	// ItemId The unique identifier of the code interpreter tool call item.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response for which the code is being streamed.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event, used to order streaming events.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.code_interpreter_call_code.delta`.
	Type ResponseCodeInterpreterCallCodeDeltaEventType `json:"type"`
}

ResponseCodeInterpreterCallCodeDeltaEvent Emitted when a partial code snippet is streamed by the code interpreter.

type ResponseCodeInterpreterCallCodeDeltaEventType

type ResponseCodeInterpreterCallCodeDeltaEventType string

ResponseCodeInterpreterCallCodeDeltaEventType The type of the event. Always `response.code_interpreter_call_code.delta`.

const (
	ResponseCodeInterpreterCallCodeDelta ResponseCodeInterpreterCallCodeDeltaEventType = "response.code_interpreter_call_code.delta"
)

Defines values for ResponseCodeInterpreterCallCodeDeltaEventType.

func (ResponseCodeInterpreterCallCodeDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseCodeInterpreterCallCodeDeltaEventType enum.

type ResponseCodeInterpreterCallCodeDoneEvent

type ResponseCodeInterpreterCallCodeDoneEvent struct {
	// Code The final code snippet output by the code interpreter.
	Code string `json:"code"`

	// ItemId The unique identifier of the code interpreter tool call item.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response for which the code is finalized.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event, used to order streaming events.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.code_interpreter_call_code.done`.
	Type ResponseCodeInterpreterCallCodeDoneEventType `json:"type"`
}

ResponseCodeInterpreterCallCodeDoneEvent Emitted when the code snippet is finalized by the code interpreter.

type ResponseCodeInterpreterCallCodeDoneEventType

type ResponseCodeInterpreterCallCodeDoneEventType string

ResponseCodeInterpreterCallCodeDoneEventType The type of the event. Always `response.code_interpreter_call_code.done`.

const (
	ResponseCodeInterpreterCallCodeDone ResponseCodeInterpreterCallCodeDoneEventType = "response.code_interpreter_call_code.done"
)

Defines values for ResponseCodeInterpreterCallCodeDoneEventType.

func (ResponseCodeInterpreterCallCodeDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseCodeInterpreterCallCodeDoneEventType enum.

type ResponseCodeInterpreterCallCompletedEvent

type ResponseCodeInterpreterCallCompletedEvent struct {
	// ItemId The unique identifier of the code interpreter tool call item.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response for which the code interpreter call is completed.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event, used to order streaming events.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.code_interpreter_call.completed`.
	Type ResponseCodeInterpreterCallCompletedEventType `json:"type"`
}

ResponseCodeInterpreterCallCompletedEvent Emitted when the code interpreter call is completed.

type ResponseCodeInterpreterCallCompletedEventType

type ResponseCodeInterpreterCallCompletedEventType string

ResponseCodeInterpreterCallCompletedEventType The type of the event. Always `response.code_interpreter_call.completed`.

const (
	ResponseCodeInterpreterCallCompleted ResponseCodeInterpreterCallCompletedEventType = "response.code_interpreter_call.completed"
)

Defines values for ResponseCodeInterpreterCallCompletedEventType.

func (ResponseCodeInterpreterCallCompletedEventType) Valid

Valid indicates whether the value is a known member of the ResponseCodeInterpreterCallCompletedEventType enum.

type ResponseCodeInterpreterCallInProgressEvent

type ResponseCodeInterpreterCallInProgressEvent struct {
	// ItemId The unique identifier of the code interpreter tool call item.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response for which the code interpreter call is in progress.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event, used to order streaming events.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.code_interpreter_call.in_progress`.
	Type ResponseCodeInterpreterCallInProgressEventType `json:"type"`
}

ResponseCodeInterpreterCallInProgressEvent Emitted when a code interpreter call is in progress.

type ResponseCodeInterpreterCallInProgressEventType

type ResponseCodeInterpreterCallInProgressEventType string

ResponseCodeInterpreterCallInProgressEventType The type of the event. Always `response.code_interpreter_call.in_progress`.

const (
	ResponseCodeInterpreterCallInProgress ResponseCodeInterpreterCallInProgressEventType = "response.code_interpreter_call.in_progress"
)

Defines values for ResponseCodeInterpreterCallInProgressEventType.

func (ResponseCodeInterpreterCallInProgressEventType) Valid

Valid indicates whether the value is a known member of the ResponseCodeInterpreterCallInProgressEventType enum.

type ResponseCodeInterpreterCallInterpretingEvent

type ResponseCodeInterpreterCallInterpretingEvent struct {
	// ItemId The unique identifier of the code interpreter tool call item.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response for which the code interpreter is interpreting code.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event, used to order streaming events.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.code_interpreter_call.interpreting`.
	Type ResponseCodeInterpreterCallInterpretingEventType `json:"type"`
}

ResponseCodeInterpreterCallInterpretingEvent Emitted when the code interpreter is actively interpreting the code snippet.

type ResponseCodeInterpreterCallInterpretingEventType

type ResponseCodeInterpreterCallInterpretingEventType string

ResponseCodeInterpreterCallInterpretingEventType The type of the event. Always `response.code_interpreter_call.interpreting`.

const (
	ResponseCodeInterpreterCallInterpreting ResponseCodeInterpreterCallInterpretingEventType = "response.code_interpreter_call.interpreting"
)

Defines values for ResponseCodeInterpreterCallInterpretingEventType.

func (ResponseCodeInterpreterCallInterpretingEventType) Valid

Valid indicates whether the value is a known member of the ResponseCodeInterpreterCallInterpretingEventType enum.

type ResponseCompletedEvent

type ResponseCompletedEvent struct {
	// Response Properties of the completed response.
	Response Response `json:"response"`

	// SequenceNumber The sequence number for this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.completed`.
	Type ResponseCompletedEventType `json:"type"`
}

ResponseCompletedEvent Emitted when the model response is complete.

type ResponseCompletedEventType

type ResponseCompletedEventType string

ResponseCompletedEventType The type of the event. Always `response.completed`.

const (
	ResponseCompleted ResponseCompletedEventType = "response.completed"
)

Defines values for ResponseCompletedEventType.

func (ResponseCompletedEventType) Valid

func (e ResponseCompletedEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseCompletedEventType enum.

type ResponseContentPartAddedEvent

type ResponseContentPartAddedEvent struct {
	// ContentIndex The index of the content part that was added.
	ContentIndex int `json:"content_index"`

	// ItemId The ID of the output item that the content part was added to.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the content part was added to.
	OutputIndex int `json:"output_index"`

	// Part The content part that was added.
	Part OutputContent `json:"part"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.content_part.added`.
	Type ResponseContentPartAddedEventType `json:"type"`
}

ResponseContentPartAddedEvent Emitted when a new content part is added.

type ResponseContentPartAddedEventType

type ResponseContentPartAddedEventType string

ResponseContentPartAddedEventType The type of the event. Always `response.content_part.added`.

const (
	ResponseContentPartAdded ResponseContentPartAddedEventType = "response.content_part.added"
)

Defines values for ResponseContentPartAddedEventType.

func (ResponseContentPartAddedEventType) Valid

Valid indicates whether the value is a known member of the ResponseContentPartAddedEventType enum.

type ResponseContentPartDoneEvent

type ResponseContentPartDoneEvent struct {
	// ContentIndex The index of the content part that is done.
	ContentIndex int `json:"content_index"`

	// ItemId The ID of the output item that the content part was added to.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the content part was added to.
	OutputIndex int `json:"output_index"`

	// Part The content part that is done.
	Part OutputContent `json:"part"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.content_part.done`.
	Type ResponseContentPartDoneEventType `json:"type"`
}

ResponseContentPartDoneEvent Emitted when a content part is done.

type ResponseContentPartDoneEventType

type ResponseContentPartDoneEventType string

ResponseContentPartDoneEventType The type of the event. Always `response.content_part.done`.

const (
	ResponseContentPartDone ResponseContentPartDoneEventType = "response.content_part.done"
)

Defines values for ResponseContentPartDoneEventType.

func (ResponseContentPartDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseContentPartDoneEventType enum.

type ResponseConversation

type ResponseConversation struct {
	// Id The unique ID of the conversation that this response was associated with.
	Id string `json:"id"`
}

ResponseConversation The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

type ResponseCreatedEvent

type ResponseCreatedEvent struct {
	// Response The response that was created.
	Response Response `json:"response"`

	// SequenceNumber The sequence number for this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.created`.
	Type ResponseCreatedEventType `json:"type"`
}

ResponseCreatedEvent An event that is emitted when a response is created.

type ResponseCreatedEventType

type ResponseCreatedEventType string

ResponseCreatedEventType The type of the event. Always `response.created`.

const (
	ResponseCreated ResponseCreatedEventType = "response.created"
)

Defines values for ResponseCreatedEventType.

func (ResponseCreatedEventType) Valid

func (e ResponseCreatedEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseCreatedEventType enum.

type ResponseCustomToolCallInputDeltaEvent

type ResponseCustomToolCallInputDeltaEvent struct {
	// Delta The incremental input data (delta) for the custom tool call.
	Delta string `json:"delta"`

	// ItemId Unique identifier for the API item associated with this event.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output this delta applies to.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The event type identifier.
	Type ResponseCustomToolCallInputDeltaEventType `json:"type"`
}

ResponseCustomToolCallInputDeltaEvent Event representing a delta (partial update) to the input of a custom tool call.

type ResponseCustomToolCallInputDeltaEventType

type ResponseCustomToolCallInputDeltaEventType string

ResponseCustomToolCallInputDeltaEventType The event type identifier.

const (
	ResponseCustomToolCallInputDelta ResponseCustomToolCallInputDeltaEventType = "response.custom_tool_call_input.delta"
)

Defines values for ResponseCustomToolCallInputDeltaEventType.

func (ResponseCustomToolCallInputDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseCustomToolCallInputDeltaEventType enum.

type ResponseCustomToolCallInputDoneEvent

type ResponseCustomToolCallInputDoneEvent struct {
	// Input The complete input data for the custom tool call.
	Input string `json:"input"`

	// ItemId Unique identifier for the API item associated with this event.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output this event applies to.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The event type identifier.
	Type ResponseCustomToolCallInputDoneEventType `json:"type"`
}

ResponseCustomToolCallInputDoneEvent Event indicating that input for a custom tool call is complete.

type ResponseCustomToolCallInputDoneEventType

type ResponseCustomToolCallInputDoneEventType string

ResponseCustomToolCallInputDoneEventType The event type identifier.

const (
	ResponseCustomToolCallInputDone ResponseCustomToolCallInputDoneEventType = "response.custom_tool_call_input.done"
)

Defines values for ResponseCustomToolCallInputDoneEventType.

func (ResponseCustomToolCallInputDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseCustomToolCallInputDoneEventType enum.

type ResponseError

type ResponseError struct {
	// Code The error code for the response.
	Code ResponseErrorCode `json:"code"`

	// Message A human-readable description of the error.
	Message string `json:"message"`
}

ResponseError defines model for ResponseError.

type ResponseErrorCode

type ResponseErrorCode string

ResponseErrorCode The error code for the response.

const (
	BioPolicy                   ResponseErrorCode = "bio_policy"
	DataResidencyMismatch       ResponseErrorCode = "data_residency_mismatch"
	EmptyImageFile              ResponseErrorCode = "empty_image_file"
	FailedToDownloadImage       ResponseErrorCode = "failed_to_download_image"
	ImageContentPolicyViolation ResponseErrorCode = "image_content_policy_violation"
	ImageFileNotFound           ResponseErrorCode = "image_file_not_found"
	ImageFileTooLarge           ResponseErrorCode = "image_file_too_large"
	ImageParseError             ResponseErrorCode = "image_parse_error"
	ImageTooLarge               ResponseErrorCode = "image_too_large"
	ImageTooSmall               ResponseErrorCode = "image_too_small"
	InvalidBase64Image          ResponseErrorCode = "invalid_base64_image"
	InvalidImage                ResponseErrorCode = "invalid_image"
	InvalidImageFormat          ResponseErrorCode = "invalid_image_format"
	InvalidImageMode            ResponseErrorCode = "invalid_image_mode"
	InvalidImageUrl             ResponseErrorCode = "invalid_image_url"
	InvalidPrompt               ResponseErrorCode = "invalid_prompt"
	RateLimitExceeded           ResponseErrorCode = "rate_limit_exceeded"
	ServerError                 ResponseErrorCode = "server_error"
	UnsupportedImageMediaType   ResponseErrorCode = "unsupported_image_media_type"
	VectorStoreTimeout          ResponseErrorCode = "vector_store_timeout"
)

Defines values for ResponseErrorCode.

func (ResponseErrorCode) Valid

func (e ResponseErrorCode) Valid() bool

Valid indicates whether the value is a known member of the ResponseErrorCode enum.

type ResponseErrorEvent

type ResponseErrorEvent struct {
	Code *string `json:"code"`

	// Message The error message.
	Message string  `json:"message"`
	Param   *string `json:"param"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `error`.
	Type ResponseErrorEventType `json:"type"`
}

ResponseErrorEvent Emitted when an error occurs.

type ResponseErrorEventType

type ResponseErrorEventType string

ResponseErrorEventType The type of the event. Always `error`.

const (
	ResponseErrorEventTypeError ResponseErrorEventType = "error"
)

Defines values for ResponseErrorEventType.

func (ResponseErrorEventType) Valid

func (e ResponseErrorEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseErrorEventType enum.

type ResponseFailedEvent

type ResponseFailedEvent struct {
	// Response The response that failed.
	Response Response `json:"response"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.failed`.
	Type ResponseFailedEventType `json:"type"`
}

ResponseFailedEvent An event that is emitted when a response fails.

type ResponseFailedEventType

type ResponseFailedEventType string

ResponseFailedEventType The type of the event. Always `response.failed`.

const (
	ResponseFailed ResponseFailedEventType = "response.failed"
)

Defines values for ResponseFailedEventType.

func (ResponseFailedEventType) Valid

func (e ResponseFailedEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseFailedEventType enum.

type ResponseFileSearchCallCompletedEvent

type ResponseFileSearchCallCompletedEvent struct {
	// ItemId The ID of the output item that the file search call is initiated.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the file search call is initiated.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.file_search_call.completed`.
	Type ResponseFileSearchCallCompletedEventType `json:"type"`
}

ResponseFileSearchCallCompletedEvent Emitted when a file search call is completed (results found).

type ResponseFileSearchCallCompletedEventType

type ResponseFileSearchCallCompletedEventType string

ResponseFileSearchCallCompletedEventType The type of the event. Always `response.file_search_call.completed`.

const (
	ResponseFileSearchCallCompleted ResponseFileSearchCallCompletedEventType = "response.file_search_call.completed"
)

Defines values for ResponseFileSearchCallCompletedEventType.

func (ResponseFileSearchCallCompletedEventType) Valid

Valid indicates whether the value is a known member of the ResponseFileSearchCallCompletedEventType enum.

type ResponseFileSearchCallInProgressEvent

type ResponseFileSearchCallInProgressEvent struct {
	// ItemId The ID of the output item that the file search call is initiated.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the file search call is initiated.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.file_search_call.in_progress`.
	Type ResponseFileSearchCallInProgressEventType `json:"type"`
}

ResponseFileSearchCallInProgressEvent Emitted when a file search call is initiated.

type ResponseFileSearchCallInProgressEventType

type ResponseFileSearchCallInProgressEventType string

ResponseFileSearchCallInProgressEventType The type of the event. Always `response.file_search_call.in_progress`.

const (
	ResponseFileSearchCallInProgress ResponseFileSearchCallInProgressEventType = "response.file_search_call.in_progress"
)

Defines values for ResponseFileSearchCallInProgressEventType.

func (ResponseFileSearchCallInProgressEventType) Valid

Valid indicates whether the value is a known member of the ResponseFileSearchCallInProgressEventType enum.

type ResponseFileSearchCallSearchingEvent

type ResponseFileSearchCallSearchingEvent struct {
	// ItemId The ID of the output item that the file search call is initiated.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the file search call is searching.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.file_search_call.searching`.
	Type ResponseFileSearchCallSearchingEventType `json:"type"`
}

ResponseFileSearchCallSearchingEvent Emitted when a file search is currently searching.

type ResponseFileSearchCallSearchingEventType

type ResponseFileSearchCallSearchingEventType string

ResponseFileSearchCallSearchingEventType The type of the event. Always `response.file_search_call.searching`.

const (
	ResponseFileSearchCallSearching ResponseFileSearchCallSearchingEventType = "response.file_search_call.searching"
)

Defines values for ResponseFileSearchCallSearchingEventType.

func (ResponseFileSearchCallSearchingEventType) Valid

Valid indicates whether the value is a known member of the ResponseFileSearchCallSearchingEventType enum.

type ResponseFormatJsonObject

type ResponseFormatJsonObject struct {
	// Type The type of response format being defined. Always `json_object`.
	Type ResponseFormatJsonObjectType `json:"type"`
}

ResponseFormatJsonObject JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.

type ResponseFormatJsonObjectType

type ResponseFormatJsonObjectType string

ResponseFormatJsonObjectType The type of response format being defined. Always `json_object`.

const (
	JsonObject ResponseFormatJsonObjectType = "json_object"
)

Defines values for ResponseFormatJsonObjectType.

func (ResponseFormatJsonObjectType) Valid

Valid indicates whether the value is a known member of the ResponseFormatJsonObjectType enum.

type ResponseFormatJsonSchemaSchema

type ResponseFormatJsonSchemaSchema map[string]interface{}

ResponseFormatJsonSchemaSchema The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas [here](https://json-schema.org/).

type ResponseFormatText

type ResponseFormatText struct {
	// Type The type of response format being defined. Always `text`.
	Type ResponseFormatTextType `json:"type"`
}

ResponseFormatText Default response format. Used to generate text responses.

type ResponseFormatTextType

type ResponseFormatTextType string

ResponseFormatTextType The type of response format being defined. Always `text`.

const (
	ResponseFormatTextTypeText ResponseFormatTextType = "text"
)

Defines values for ResponseFormatTextType.

func (ResponseFormatTextType) Valid

func (e ResponseFormatTextType) Valid() bool

Valid indicates whether the value is a known member of the ResponseFormatTextType enum.

type ResponseFunctionCallArgumentsDeltaEvent

type ResponseFunctionCallArgumentsDeltaEvent struct {
	// Delta The function-call arguments delta that is added.
	Delta string `json:"delta"`

	// ItemId The ID of the output item that the function-call arguments delta is added to.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the function-call arguments delta is added to.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.function_call_arguments.delta`.
	Type ResponseFunctionCallArgumentsDeltaEventType `json:"type"`
}

ResponseFunctionCallArgumentsDeltaEvent Emitted when there is a partial function-call arguments delta.

type ResponseFunctionCallArgumentsDeltaEventType

type ResponseFunctionCallArgumentsDeltaEventType string

ResponseFunctionCallArgumentsDeltaEventType The type of the event. Always `response.function_call_arguments.delta`.

const (
	ResponseFunctionCallArgumentsDelta ResponseFunctionCallArgumentsDeltaEventType = "response.function_call_arguments.delta"
)

Defines values for ResponseFunctionCallArgumentsDeltaEventType.

func (ResponseFunctionCallArgumentsDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseFunctionCallArgumentsDeltaEventType enum.

type ResponseFunctionCallArgumentsDoneEvent

type ResponseFunctionCallArgumentsDoneEvent struct {
	// Arguments The function-call arguments.
	Arguments string `json:"arguments"`

	// ItemId The ID of the item.
	ItemId string `json:"item_id"`

	// Name The name of the function that was called.
	Name string `json:"name"`

	// OutputIndex The index of the output item.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int                                        `json:"sequence_number"`
	Type           ResponseFunctionCallArgumentsDoneEventType `json:"type"`
}

ResponseFunctionCallArgumentsDoneEvent Emitted when function-call arguments are finalized.

type ResponseFunctionCallArgumentsDoneEventType

type ResponseFunctionCallArgumentsDoneEventType string

ResponseFunctionCallArgumentsDoneEventType defines model for ResponseFunctionCallArgumentsDoneEvent.Type.

const (
	ResponseFunctionCallArgumentsDone ResponseFunctionCallArgumentsDoneEventType = "response.function_call_arguments.done"
)

Defines values for ResponseFunctionCallArgumentsDoneEventType.

func (ResponseFunctionCallArgumentsDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseFunctionCallArgumentsDoneEventType enum.

type ResponseImageGenCallCompletedEvent

type ResponseImageGenCallCompletedEvent struct {
	// ItemId The unique identifier of the image generation item being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.image_generation_call.completed'.
	Type ResponseImageGenCallCompletedEventType `json:"type"`
}

ResponseImageGenCallCompletedEvent Emitted when an image generation tool call has completed and the final image is available.

type ResponseImageGenCallCompletedEventType

type ResponseImageGenCallCompletedEventType string

ResponseImageGenCallCompletedEventType The type of the event. Always 'response.image_generation_call.completed'.

const (
	ResponseImageGenerationCallCompleted ResponseImageGenCallCompletedEventType = "response.image_generation_call.completed"
)

Defines values for ResponseImageGenCallCompletedEventType.

func (ResponseImageGenCallCompletedEventType) Valid

Valid indicates whether the value is a known member of the ResponseImageGenCallCompletedEventType enum.

type ResponseImageGenCallGeneratingEvent

type ResponseImageGenCallGeneratingEvent struct {
	// ItemId The unique identifier of the image generation item being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of the image generation item being processed.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.image_generation_call.generating'.
	Type ResponseImageGenCallGeneratingEventType `json:"type"`
}

ResponseImageGenCallGeneratingEvent Emitted when an image generation tool call is actively generating an image (intermediate state).

type ResponseImageGenCallGeneratingEventType

type ResponseImageGenCallGeneratingEventType string

ResponseImageGenCallGeneratingEventType The type of the event. Always 'response.image_generation_call.generating'.

const (
	ResponseImageGenerationCallGenerating ResponseImageGenCallGeneratingEventType = "response.image_generation_call.generating"
)

Defines values for ResponseImageGenCallGeneratingEventType.

func (ResponseImageGenCallGeneratingEventType) Valid

Valid indicates whether the value is a known member of the ResponseImageGenCallGeneratingEventType enum.

type ResponseImageGenCallInProgressEvent

type ResponseImageGenCallInProgressEvent struct {
	// ItemId The unique identifier of the image generation item being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of the image generation item being processed.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.image_generation_call.in_progress'.
	Type ResponseImageGenCallInProgressEventType `json:"type"`
}

ResponseImageGenCallInProgressEvent Emitted when an image generation tool call is in progress.

type ResponseImageGenCallInProgressEventType

type ResponseImageGenCallInProgressEventType string

ResponseImageGenCallInProgressEventType The type of the event. Always 'response.image_generation_call.in_progress'.

const (
	ResponseImageGenerationCallInProgress ResponseImageGenCallInProgressEventType = "response.image_generation_call.in_progress"
)

Defines values for ResponseImageGenCallInProgressEventType.

func (ResponseImageGenCallInProgressEventType) Valid

Valid indicates whether the value is a known member of the ResponseImageGenCallInProgressEventType enum.

type ResponseImageGenCallPartialImageEvent

type ResponseImageGenCallPartialImageEvent struct {
	// ItemId The unique identifier of the image generation item being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// PartialImageB64 Base64-encoded partial image data, suitable for rendering as an image.
	PartialImageB64 string `json:"partial_image_b64"`

	// PartialImageIndex 0-based index for the partial image (backend is 1-based, but this is 0-based for the user).
	PartialImageIndex int `json:"partial_image_index"`

	// SequenceNumber The sequence number of the image generation item being processed.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.image_generation_call.partial_image'.
	Type ResponseImageGenCallPartialImageEventType `json:"type"`
}

ResponseImageGenCallPartialImageEvent Emitted when a partial image is available during image generation streaming.

type ResponseImageGenCallPartialImageEventType

type ResponseImageGenCallPartialImageEventType string

ResponseImageGenCallPartialImageEventType The type of the event. Always 'response.image_generation_call.partial_image'.

const (
	ResponseImageGenerationCallPartialImage ResponseImageGenCallPartialImageEventType = "response.image_generation_call.partial_image"
)

Defines values for ResponseImageGenCallPartialImageEventType.

func (ResponseImageGenCallPartialImageEventType) Valid

Valid indicates whether the value is a known member of the ResponseImageGenCallPartialImageEventType enum.

type ResponseInProgressEvent

type ResponseInProgressEvent struct {
	// Response The response that is in progress.
	Response Response `json:"response"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.in_progress`.
	Type ResponseInProgressEventType `json:"type"`
}

ResponseInProgressEvent Emitted when the response is in progress.

type ResponseInProgressEventType

type ResponseInProgressEventType string

ResponseInProgressEventType The type of the event. Always `response.in_progress`.

const (
	ResponseInProgress ResponseInProgressEventType = "response.in_progress"
)

Defines values for ResponseInProgressEventType.

func (ResponseInProgressEventType) Valid

Valid indicates whether the value is a known member of the ResponseInProgressEventType enum.

type ResponseIncompleteDetailsReason

type ResponseIncompleteDetailsReason string

ResponseIncompleteDetailsReason The reason why the response is incomplete.

const (
	ContentFilter   ResponseIncompleteDetailsReason = "content_filter"
	MaxOutputTokens ResponseIncompleteDetailsReason = "max_output_tokens"
)

Defines values for ResponseIncompleteDetailsReason.

func (ResponseIncompleteDetailsReason) Valid

Valid indicates whether the value is a known member of the ResponseIncompleteDetailsReason enum.

type ResponseIncompleteEvent

type ResponseIncompleteEvent struct {
	// Response The response that was incomplete.
	Response Response `json:"response"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.incomplete`.
	Type ResponseIncompleteEventType `json:"type"`
}

ResponseIncompleteEvent An event that is emitted when a response finishes as incomplete.

type ResponseIncompleteEventType

type ResponseIncompleteEventType string

ResponseIncompleteEventType The type of the event. Always `response.incomplete`.

const (
	ResponseIncomplete ResponseIncompleteEventType = "response.incomplete"
)

Defines values for ResponseIncompleteEventType.

func (ResponseIncompleteEventType) Valid

Valid indicates whether the value is a known member of the ResponseIncompleteEventType enum.

type ResponseInstructions0

type ResponseInstructions0 = string

ResponseInstructions0 A text input to the model, equivalent to a text input with the `developer` role.

type ResponseInstructions1

type ResponseInstructions1 = []InputItem

ResponseInstructions1 A list of one or many input items to the model, containing different content types.

type ResponseLogProb

type ResponseLogProb struct {
	// Logprob The log probability of this token.
	Logprob float32 `json:"logprob"`

	// Token A possible text token.
	Token string `json:"token"`

	// TopLogprobs The log probabilities of up to 20 of the most likely tokens.
	TopLogprobs *[]struct {
		// Logprob The log probability of this token.
		Logprob *float32 `json:"logprob,omitempty"`

		// Token A possible text token.
		Token *string `json:"token,omitempty"`
	} `json:"top_logprobs,omitempty"`
}

ResponseLogProb A logprob is the logarithmic probability that the model assigns to producing a particular token at a given position in the sequence. Less-negative (higher) logprob values indicate greater model confidence in that token choice.

type ResponseMCPCallArgumentsDeltaEvent

type ResponseMCPCallArgumentsDeltaEvent struct {
	// Delta A JSON string containing the partial update to the arguments for the MCP tool call.
	Delta string `json:"delta"`

	// ItemId The unique identifier of the MCP tool call item being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_call_arguments.delta'.
	Type ResponseMCPCallArgumentsDeltaEventType `json:"type"`
}

ResponseMCPCallArgumentsDeltaEvent Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

type ResponseMCPCallArgumentsDeltaEventType

type ResponseMCPCallArgumentsDeltaEventType string

ResponseMCPCallArgumentsDeltaEventType The type of the event. Always 'response.mcp_call_arguments.delta'.

const (
	ResponseMcpCallArgumentsDelta ResponseMCPCallArgumentsDeltaEventType = "response.mcp_call_arguments.delta"
)

Defines values for ResponseMCPCallArgumentsDeltaEventType.

func (ResponseMCPCallArgumentsDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPCallArgumentsDeltaEventType enum.

type ResponseMCPCallArgumentsDoneEvent

type ResponseMCPCallArgumentsDoneEvent struct {
	// Arguments A JSON string containing the finalized arguments for the MCP tool call.
	Arguments string `json:"arguments"`

	// ItemId The unique identifier of the MCP tool call item being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_call_arguments.done'.
	Type ResponseMCPCallArgumentsDoneEventType `json:"type"`
}

ResponseMCPCallArgumentsDoneEvent Emitted when the arguments for an MCP tool call are finalized.

type ResponseMCPCallArgumentsDoneEventType

type ResponseMCPCallArgumentsDoneEventType string

ResponseMCPCallArgumentsDoneEventType The type of the event. Always 'response.mcp_call_arguments.done'.

const (
	ResponseMcpCallArgumentsDone ResponseMCPCallArgumentsDoneEventType = "response.mcp_call_arguments.done"
)

Defines values for ResponseMCPCallArgumentsDoneEventType.

func (ResponseMCPCallArgumentsDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPCallArgumentsDoneEventType enum.

type ResponseMCPCallCompletedEvent

type ResponseMCPCallCompletedEvent struct {
	// ItemId The ID of the MCP tool call item that completed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that completed.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_call.completed'.
	Type ResponseMCPCallCompletedEventType `json:"type"`
}

ResponseMCPCallCompletedEvent Emitted when an MCP tool call has completed successfully.

type ResponseMCPCallCompletedEventType

type ResponseMCPCallCompletedEventType string

ResponseMCPCallCompletedEventType The type of the event. Always 'response.mcp_call.completed'.

const (
	ResponseMcpCallCompleted ResponseMCPCallCompletedEventType = "response.mcp_call.completed"
)

Defines values for ResponseMCPCallCompletedEventType.

func (ResponseMCPCallCompletedEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPCallCompletedEventType enum.

type ResponseMCPCallFailedEvent

type ResponseMCPCallFailedEvent struct {
	// ItemId The ID of the MCP tool call item that failed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that failed.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_call.failed'.
	Type ResponseMCPCallFailedEventType `json:"type"`
}

ResponseMCPCallFailedEvent Emitted when an MCP tool call has failed.

type ResponseMCPCallFailedEventType

type ResponseMCPCallFailedEventType string

ResponseMCPCallFailedEventType The type of the event. Always 'response.mcp_call.failed'.

const (
	ResponseMcpCallFailed ResponseMCPCallFailedEventType = "response.mcp_call.failed"
)

Defines values for ResponseMCPCallFailedEventType.

func (ResponseMCPCallFailedEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPCallFailedEventType enum.

type ResponseMCPCallInProgressEvent

type ResponseMCPCallInProgressEvent struct {
	// ItemId The unique identifier of the MCP tool call item being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_call.in_progress'.
	Type ResponseMCPCallInProgressEventType `json:"type"`
}

ResponseMCPCallInProgressEvent Emitted when an MCP tool call is in progress.

type ResponseMCPCallInProgressEventType

type ResponseMCPCallInProgressEventType string

ResponseMCPCallInProgressEventType The type of the event. Always 'response.mcp_call.in_progress'.

const (
	ResponseMcpCallInProgress ResponseMCPCallInProgressEventType = "response.mcp_call.in_progress"
)

Defines values for ResponseMCPCallInProgressEventType.

func (ResponseMCPCallInProgressEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPCallInProgressEventType enum.

type ResponseMCPListToolsCompletedEvent

type ResponseMCPListToolsCompletedEvent struct {
	// ItemId The ID of the MCP tool call item that produced this output.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that was processed.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_list_tools.completed'.
	Type ResponseMCPListToolsCompletedEventType `json:"type"`
}

ResponseMCPListToolsCompletedEvent Emitted when the list of available MCP tools has been successfully retrieved.

type ResponseMCPListToolsCompletedEventType

type ResponseMCPListToolsCompletedEventType string

ResponseMCPListToolsCompletedEventType The type of the event. Always 'response.mcp_list_tools.completed'.

const (
	ResponseMcpListToolsCompleted ResponseMCPListToolsCompletedEventType = "response.mcp_list_tools.completed"
)

Defines values for ResponseMCPListToolsCompletedEventType.

func (ResponseMCPListToolsCompletedEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPListToolsCompletedEventType enum.

type ResponseMCPListToolsFailedEvent

type ResponseMCPListToolsFailedEvent struct {
	// ItemId The ID of the MCP tool call item that failed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that failed.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_list_tools.failed'.
	Type ResponseMCPListToolsFailedEventType `json:"type"`
}

ResponseMCPListToolsFailedEvent Emitted when the attempt to list available MCP tools has failed.

type ResponseMCPListToolsFailedEventType

type ResponseMCPListToolsFailedEventType string

ResponseMCPListToolsFailedEventType The type of the event. Always 'response.mcp_list_tools.failed'.

const (
	ResponseMcpListToolsFailed ResponseMCPListToolsFailedEventType = "response.mcp_list_tools.failed"
)

Defines values for ResponseMCPListToolsFailedEventType.

func (ResponseMCPListToolsFailedEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPListToolsFailedEventType enum.

type ResponseMCPListToolsInProgressEvent

type ResponseMCPListToolsInProgressEvent struct {
	// ItemId The ID of the MCP tool call item that is being processed.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that is being processed.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.mcp_list_tools.in_progress'.
	Type ResponseMCPListToolsInProgressEventType `json:"type"`
}

ResponseMCPListToolsInProgressEvent Emitted when the system is in the process of retrieving the list of available MCP tools.

type ResponseMCPListToolsInProgressEventType

type ResponseMCPListToolsInProgressEventType string

ResponseMCPListToolsInProgressEventType The type of the event. Always 'response.mcp_list_tools.in_progress'.

const (
	ResponseMcpListToolsInProgress ResponseMCPListToolsInProgressEventType = "response.mcp_list_tools.in_progress"
)

Defines values for ResponseMCPListToolsInProgressEventType.

func (ResponseMCPListToolsInProgressEventType) Valid

Valid indicates whether the value is a known member of the ResponseMCPListToolsInProgressEventType enum.

type ResponseObject

type ResponseObject string

ResponseObject The object type of this resource - always set to `response`.

const (
	ResponseObjectResponse ResponseObject = "response"
)

Defines values for ResponseObject.

func (ResponseObject) Valid

func (e ResponseObject) Valid() bool

Valid indicates whether the value is a known member of the ResponseObject enum.

type ResponseOutputItemAddedEvent

type ResponseOutputItemAddedEvent struct {
	// Item The output item that was added.
	Item OutputItem `json:"item"`

	// OutputIndex The index of the output item that was added.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.output_item.added`.
	Type ResponseOutputItemAddedEventType `json:"type"`
}

ResponseOutputItemAddedEvent Emitted when a new output item is added.

type ResponseOutputItemAddedEventType

type ResponseOutputItemAddedEventType string

ResponseOutputItemAddedEventType The type of the event. Always `response.output_item.added`.

const (
	ResponseOutputItemAdded ResponseOutputItemAddedEventType = "response.output_item.added"
)

Defines values for ResponseOutputItemAddedEventType.

func (ResponseOutputItemAddedEventType) Valid

Valid indicates whether the value is a known member of the ResponseOutputItemAddedEventType enum.

type ResponseOutputItemDoneEvent

type ResponseOutputItemDoneEvent struct {
	// Item The output item that was marked done.
	Item OutputItem `json:"item"`

	// OutputIndex The index of the output item that was marked done.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.output_item.done`.
	Type ResponseOutputItemDoneEventType `json:"type"`
}

ResponseOutputItemDoneEvent Emitted when an output item is marked done.

type ResponseOutputItemDoneEventType

type ResponseOutputItemDoneEventType string

ResponseOutputItemDoneEventType The type of the event. Always `response.output_item.done`.

const (
	ResponseOutputItemDone ResponseOutputItemDoneEventType = "response.output_item.done"
)

Defines values for ResponseOutputItemDoneEventType.

func (ResponseOutputItemDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseOutputItemDoneEventType enum.

type ResponseOutputTextAnnotationAddedEvent

type ResponseOutputTextAnnotationAddedEvent struct {
	// Annotation The annotation object being added. (See annotation schema for details.)
	Annotation map[string]interface{} `json:"annotation"`

	// AnnotationIndex The index of the annotation within the content part.
	AnnotationIndex int `json:"annotation_index"`

	// ContentIndex The index of the content part within the output item.
	ContentIndex int `json:"content_index"`

	// ItemId The unique identifier of the item to which the annotation is being added.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item in the response's output array.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.output_text.annotation.added'.
	Type ResponseOutputTextAnnotationAddedEventType `json:"type"`
}

ResponseOutputTextAnnotationAddedEvent Emitted when an annotation is added to output text content.

type ResponseOutputTextAnnotationAddedEventType

type ResponseOutputTextAnnotationAddedEventType string

ResponseOutputTextAnnotationAddedEventType The type of the event. Always 'response.output_text.annotation.added'.

const (
	ResponseOutputTextAnnotationAdded ResponseOutputTextAnnotationAddedEventType = "response.output_text.annotation.added"
)

Defines values for ResponseOutputTextAnnotationAddedEventType.

func (ResponseOutputTextAnnotationAddedEventType) Valid

Valid indicates whether the value is a known member of the ResponseOutputTextAnnotationAddedEventType enum.

type ResponsePromptCacheRetention

type ResponsePromptCacheRetention string

ResponsePromptCacheRetention Deprecated. Use `prompt_cache_options.ttl` instead.

The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

  • Organizations without ZDR enabled default to `24h`.
  • Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.
const (
	ResponsePromptCacheRetentionInMemory ResponsePromptCacheRetention = "in_memory"
	ResponsePromptCacheRetentionN24h     ResponsePromptCacheRetention = "24h"
)

Defines values for ResponsePromptCacheRetention.

func (ResponsePromptCacheRetention) Valid

Valid indicates whether the value is a known member of the ResponsePromptCacheRetention enum.

type ResponsePromptVariables

type ResponsePromptVariables map[string]ResponsePromptVariables_AdditionalProperties

ResponsePromptVariables defines model for ResponsePromptVariables.

type ResponsePromptVariables0

type ResponsePromptVariables0 = string

ResponsePromptVariables0 defines model for ResponsePromptVariables.0.

type ResponsePromptVariables_AdditionalProperties

type ResponsePromptVariables_AdditionalProperties struct {
	// contains filtered or unexported fields
}

ResponsePromptVariables_AdditionalProperties defines model for ResponsePromptVariables.AdditionalProperties.

func (ResponsePromptVariables_AdditionalProperties) AsInputFileContent

AsInputFileContent returns the union data inside the ResponsePromptVariables_AdditionalProperties as a InputFileContent

func (ResponsePromptVariables_AdditionalProperties) AsInputImageContent

AsInputImageContent returns the union data inside the ResponsePromptVariables_AdditionalProperties as a InputImageContent

func (ResponsePromptVariables_AdditionalProperties) AsInputTextContent

AsInputTextContent returns the union data inside the ResponsePromptVariables_AdditionalProperties as a InputTextContent

func (ResponsePromptVariables_AdditionalProperties) AsResponsePromptVariables0

AsResponsePromptVariables0 returns the union data inside the ResponsePromptVariables_AdditionalProperties as a ResponsePromptVariables0

func (*ResponsePromptVariables_AdditionalProperties) FromInputFileContent

FromInputFileContent overwrites any union data inside the ResponsePromptVariables_AdditionalProperties as the provided InputFileContent

func (*ResponsePromptVariables_AdditionalProperties) FromInputImageContent

FromInputImageContent overwrites any union data inside the ResponsePromptVariables_AdditionalProperties as the provided InputImageContent

func (*ResponsePromptVariables_AdditionalProperties) FromInputTextContent

FromInputTextContent overwrites any union data inside the ResponsePromptVariables_AdditionalProperties as the provided InputTextContent

func (*ResponsePromptVariables_AdditionalProperties) FromResponsePromptVariables0

FromResponsePromptVariables0 overwrites any union data inside the ResponsePromptVariables_AdditionalProperties as the provided ResponsePromptVariables0

func (ResponsePromptVariables_AdditionalProperties) MarshalJSON

func (*ResponsePromptVariables_AdditionalProperties) MergeInputFileContent

MergeInputFileContent performs a merge with any union data inside the ResponsePromptVariables_AdditionalProperties, using the provided InputFileContent

func (*ResponsePromptVariables_AdditionalProperties) MergeInputImageContent

MergeInputImageContent performs a merge with any union data inside the ResponsePromptVariables_AdditionalProperties, using the provided InputImageContent

func (*ResponsePromptVariables_AdditionalProperties) MergeInputTextContent

MergeInputTextContent performs a merge with any union data inside the ResponsePromptVariables_AdditionalProperties, using the provided InputTextContent

func (*ResponsePromptVariables_AdditionalProperties) MergeResponsePromptVariables0

MergeResponsePromptVariables0 performs a merge with any union data inside the ResponsePromptVariables_AdditionalProperties, using the provided ResponsePromptVariables0

func (*ResponsePromptVariables_AdditionalProperties) UnmarshalJSON

type ResponseProperties

type ResponseProperties struct {
	Background   *bool `json:"background,omitempty"`
	MaxToolCalls *int  `json:"max_tool_calls,omitempty"`

	// Model Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
	// offers a wide range of models with different capabilities, performance
	// characteristics, and price points. Refer to the [model guide](/docs/models)
	// to browse and compare available models.
	Model              *ModelIdsResponses `json:"model,omitempty"`
	PreviousResponseId *string            `json:"previous_response_id,omitempty"`
	Prompt             *Prompt            `json:"prompt,omitempty"`

	// Text Configuration options for a text response from the model. Can be plain
	// text or structured JSON data. Learn more:
	// - [Text inputs and outputs](/docs/guides/text)
	// - [Structured Outputs](/docs/guides/structured-outputs)
	Text *ResponseTextParam `json:"text,omitempty"`

	// ToolChoice How the model should select which tool (or tools) to use when generating
	// a response. See the `tools` parameter to see how to specify which tools
	// the model can call.
	ToolChoice *ToolChoiceParam `json:"tool_choice,omitempty"`

	// Tools An array of tools the model may call while generating a response. You
	// can specify which tool to use by setting the `tool_choice` parameter.
	//
	// We support the following categories of tools:
	// - **Built-in tools**: Tools that are provided by OpenAI that extend the
	//   model's capabilities, like [web search](/docs/guides/tools-web-search)
	//   or [file search](/docs/guides/tools-file-search). Learn more about
	//   [built-in tools](/docs/guides/tools).
	// - **MCP Tools**: Integrations with third-party systems via custom MCP servers
	//   or predefined connectors such as Google Drive and SharePoint. Learn more about
	//   [MCP Tools](/docs/guides/tools-connectors-mcp).
	// - **Function calls (custom tools)**: Functions that are defined by you,
	//   enabling the model to call your own code with strongly typed arguments
	//   and outputs. Learn more about
	//   [function calling](/docs/guides/function-calling). You can also use
	//   custom tools to call your own code.
	Tools *ToolsArray `json:"tools,omitempty"`
}

ResponseProperties defines model for ResponseProperties.

type ResponseQueuedEvent

type ResponseQueuedEvent struct {
	// Response The full response object that is queued.
	Response Response `json:"response"`

	// SequenceNumber The sequence number for this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always 'response.queued'.
	Type ResponseQueuedEventType `json:"type"`
}

ResponseQueuedEvent Emitted when a response is queued and waiting to be processed.

type ResponseQueuedEventType

type ResponseQueuedEventType string

ResponseQueuedEventType The type of the event. Always 'response.queued'.

const (
	ResponseQueued ResponseQueuedEventType = "response.queued"
)

Defines values for ResponseQueuedEventType.

func (ResponseQueuedEventType) Valid

func (e ResponseQueuedEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseQueuedEventType enum.

type ResponseReasoningSummaryPartAddedEvent

type ResponseReasoningSummaryPartAddedEvent struct {
	// ItemId The ID of the item this summary part is associated with.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item this summary part is associated with.
	OutputIndex int `json:"output_index"`

	// Part The summary part that was added.
	Part struct {
		// Text The text of the summary part.
		Text string `json:"text"`

		// Type The type of the summary part. Always `summary_text`.
		Type ResponseReasoningSummaryPartAddedEventPartType `json:"type"`
	} `json:"part"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// SummaryIndex The index of the summary part within the reasoning summary.
	SummaryIndex int `json:"summary_index"`

	// Type The type of the event. Always `response.reasoning_summary_part.added`.
	Type ResponseReasoningSummaryPartAddedEventType `json:"type"`
}

ResponseReasoningSummaryPartAddedEvent Emitted when a new reasoning summary part is added.

type ResponseReasoningSummaryPartAddedEventPartType

type ResponseReasoningSummaryPartAddedEventPartType string

ResponseReasoningSummaryPartAddedEventPartType The type of the summary part. Always `summary_text`.

const (
	ResponseReasoningSummaryPartAddedEventPartTypeSummaryText ResponseReasoningSummaryPartAddedEventPartType = "summary_text"
)

Defines values for ResponseReasoningSummaryPartAddedEventPartType.

func (ResponseReasoningSummaryPartAddedEventPartType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningSummaryPartAddedEventPartType enum.

type ResponseReasoningSummaryPartAddedEventType

type ResponseReasoningSummaryPartAddedEventType string

ResponseReasoningSummaryPartAddedEventType The type of the event. Always `response.reasoning_summary_part.added`.

const (
	ResponseReasoningSummaryPartAdded ResponseReasoningSummaryPartAddedEventType = "response.reasoning_summary_part.added"
)

Defines values for ResponseReasoningSummaryPartAddedEventType.

func (ResponseReasoningSummaryPartAddedEventType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningSummaryPartAddedEventType enum.

type ResponseReasoningSummaryPartDoneEvent

type ResponseReasoningSummaryPartDoneEvent struct {
	// ItemId The ID of the item this summary part is associated with.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item this summary part is associated with.
	OutputIndex int `json:"output_index"`

	// Part The completed summary part.
	Part struct {
		// Text The text of the summary part.
		Text string `json:"text"`

		// Type The type of the summary part. Always `summary_text`.
		Type ResponseReasoningSummaryPartDoneEventPartType `json:"type"`
	} `json:"part"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Status The completion status of the summary part. Omitted when the part completed
	// normally and set to `incomplete` when generation was interrupted.
	Status *ResponseReasoningSummaryPartDoneEventStatus `json:"status,omitempty"`

	// SummaryIndex The index of the summary part within the reasoning summary.
	SummaryIndex int `json:"summary_index"`

	// Type The type of the event. Always `response.reasoning_summary_part.done`.
	Type ResponseReasoningSummaryPartDoneEventType `json:"type"`
}

ResponseReasoningSummaryPartDoneEvent Emitted when a reasoning summary part is completed.

type ResponseReasoningSummaryPartDoneEventPartType

type ResponseReasoningSummaryPartDoneEventPartType string

ResponseReasoningSummaryPartDoneEventPartType The type of the summary part. Always `summary_text`.

const (
	ResponseReasoningSummaryPartDoneEventPartTypeSummaryText ResponseReasoningSummaryPartDoneEventPartType = "summary_text"
)

Defines values for ResponseReasoningSummaryPartDoneEventPartType.

func (ResponseReasoningSummaryPartDoneEventPartType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningSummaryPartDoneEventPartType enum.

type ResponseReasoningSummaryPartDoneEventStatus

type ResponseReasoningSummaryPartDoneEventStatus string

ResponseReasoningSummaryPartDoneEventStatus The completion status of the summary part. Omitted when the part completed normally and set to `incomplete` when generation was interrupted.

const (
	ResponseReasoningSummaryPartDoneEventStatusIncomplete ResponseReasoningSummaryPartDoneEventStatus = "incomplete"
)

Defines values for ResponseReasoningSummaryPartDoneEventStatus.

func (ResponseReasoningSummaryPartDoneEventStatus) Valid

Valid indicates whether the value is a known member of the ResponseReasoningSummaryPartDoneEventStatus enum.

type ResponseReasoningSummaryPartDoneEventType

type ResponseReasoningSummaryPartDoneEventType string

ResponseReasoningSummaryPartDoneEventType The type of the event. Always `response.reasoning_summary_part.done`.

const (
	ResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDoneEventType = "response.reasoning_summary_part.done"
)

Defines values for ResponseReasoningSummaryPartDoneEventType.

func (ResponseReasoningSummaryPartDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningSummaryPartDoneEventType enum.

type ResponseReasoningSummaryTextDeltaEvent

type ResponseReasoningSummaryTextDeltaEvent struct {
	// Delta The text delta that was added to the summary.
	Delta string `json:"delta"`

	// ItemId The ID of the item this summary text delta is associated with.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item this summary text delta is associated with.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// SummaryIndex The index of the summary part within the reasoning summary.
	SummaryIndex int `json:"summary_index"`

	// Type The type of the event. Always `response.reasoning_summary_text.delta`.
	Type ResponseReasoningSummaryTextDeltaEventType `json:"type"`
}

ResponseReasoningSummaryTextDeltaEvent Emitted when a delta is added to a reasoning summary text.

type ResponseReasoningSummaryTextDeltaEventType

type ResponseReasoningSummaryTextDeltaEventType string

ResponseReasoningSummaryTextDeltaEventType The type of the event. Always `response.reasoning_summary_text.delta`.

const (
	ResponseReasoningSummaryTextDelta ResponseReasoningSummaryTextDeltaEventType = "response.reasoning_summary_text.delta"
)

Defines values for ResponseReasoningSummaryTextDeltaEventType.

func (ResponseReasoningSummaryTextDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningSummaryTextDeltaEventType enum.

type ResponseReasoningSummaryTextDoneEvent

type ResponseReasoningSummaryTextDoneEvent struct {
	// ItemId The ID of the item this summary text is associated with.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item this summary text is associated with.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// SummaryIndex The index of the summary part within the reasoning summary.
	SummaryIndex int `json:"summary_index"`

	// Text The full text of the completed reasoning summary.
	Text string `json:"text"`

	// Type The type of the event. Always `response.reasoning_summary_text.done`.
	Type ResponseReasoningSummaryTextDoneEventType `json:"type"`
}

ResponseReasoningSummaryTextDoneEvent Emitted when a reasoning summary text is completed.

type ResponseReasoningSummaryTextDoneEventType

type ResponseReasoningSummaryTextDoneEventType string

ResponseReasoningSummaryTextDoneEventType The type of the event. Always `response.reasoning_summary_text.done`.

const (
	ResponseReasoningSummaryTextDone ResponseReasoningSummaryTextDoneEventType = "response.reasoning_summary_text.done"
)

Defines values for ResponseReasoningSummaryTextDoneEventType.

func (ResponseReasoningSummaryTextDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningSummaryTextDoneEventType enum.

type ResponseReasoningTextDeltaEvent

type ResponseReasoningTextDeltaEvent struct {
	// ContentIndex The index of the reasoning content part this delta is associated with.
	ContentIndex int `json:"content_index"`

	// Delta The text delta that was added to the reasoning content.
	Delta string `json:"delta"`

	// ItemId The ID of the item this reasoning text delta is associated with.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item this reasoning text delta is associated with.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.reasoning_text.delta`.
	Type ResponseReasoningTextDeltaEventType `json:"type"`
}

ResponseReasoningTextDeltaEvent Emitted when a delta is added to a reasoning text.

type ResponseReasoningTextDeltaEventType

type ResponseReasoningTextDeltaEventType string

ResponseReasoningTextDeltaEventType The type of the event. Always `response.reasoning_text.delta`.

const (
	ResponseReasoningTextDelta ResponseReasoningTextDeltaEventType = "response.reasoning_text.delta"
)

Defines values for ResponseReasoningTextDeltaEventType.

func (ResponseReasoningTextDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningTextDeltaEventType enum.

type ResponseReasoningTextDoneEvent

type ResponseReasoningTextDoneEvent struct {
	// ContentIndex The index of the reasoning content part.
	ContentIndex int `json:"content_index"`

	// ItemId The ID of the item this reasoning text is associated with.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item this reasoning text is associated with.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Text The full text of the completed reasoning content.
	Text string `json:"text"`

	// Type The type of the event. Always `response.reasoning_text.done`.
	Type ResponseReasoningTextDoneEventType `json:"type"`
}

ResponseReasoningTextDoneEvent Emitted when a reasoning text is completed.

type ResponseReasoningTextDoneEventType

type ResponseReasoningTextDoneEventType string

ResponseReasoningTextDoneEventType The type of the event. Always `response.reasoning_text.done`.

const (
	ResponseReasoningTextDone ResponseReasoningTextDoneEventType = "response.reasoning_text.done"
)

Defines values for ResponseReasoningTextDoneEventType.

func (ResponseReasoningTextDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseReasoningTextDoneEventType enum.

type ResponseRefusalDeltaEvent

type ResponseRefusalDeltaEvent struct {
	// ContentIndex The index of the content part that the refusal text is added to.
	ContentIndex int `json:"content_index"`

	// Delta The refusal text that is added.
	Delta string `json:"delta"`

	// ItemId The ID of the output item that the refusal text is added to.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the refusal text is added to.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.refusal.delta`.
	Type ResponseRefusalDeltaEventType `json:"type"`
}

ResponseRefusalDeltaEvent Emitted when there is a partial refusal text.

type ResponseRefusalDeltaEventType

type ResponseRefusalDeltaEventType string

ResponseRefusalDeltaEventType The type of the event. Always `response.refusal.delta`.

const (
	ResponseRefusalDelta ResponseRefusalDeltaEventType = "response.refusal.delta"
)

Defines values for ResponseRefusalDeltaEventType.

func (ResponseRefusalDeltaEventType) Valid

Valid indicates whether the value is a known member of the ResponseRefusalDeltaEventType enum.

type ResponseRefusalDoneEvent

type ResponseRefusalDoneEvent struct {
	// ContentIndex The index of the content part that the refusal text is finalized.
	ContentIndex int `json:"content_index"`

	// ItemId The ID of the output item that the refusal text is finalized.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the refusal text is finalized.
	OutputIndex int `json:"output_index"`

	// Refusal The refusal text that is finalized.
	Refusal string `json:"refusal"`

	// SequenceNumber The sequence number of this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.refusal.done`.
	Type ResponseRefusalDoneEventType `json:"type"`
}

ResponseRefusalDoneEvent Emitted when refusal text is finalized.

type ResponseRefusalDoneEventType

type ResponseRefusalDoneEventType string

ResponseRefusalDoneEventType The type of the event. Always `response.refusal.done`.

const (
	ResponseRefusalDone ResponseRefusalDoneEventType = "response.refusal.done"
)

Defines values for ResponseRefusalDoneEventType.

func (ResponseRefusalDoneEventType) Valid

Valid indicates whether the value is a known member of the ResponseRefusalDoneEventType enum.

type ResponseStatus

type ResponseStatus string

ResponseStatus The status of the response generation. One of `completed`, `failed`, `in_progress`, `cancelled`, `queued`, or `incomplete`.

const (
	ResponseStatusCancelled  ResponseStatus = "cancelled"
	ResponseStatusCompleted  ResponseStatus = "completed"
	ResponseStatusFailed     ResponseStatus = "failed"
	ResponseStatusInProgress ResponseStatus = "in_progress"
	ResponseStatusIncomplete ResponseStatus = "incomplete"
	ResponseStatusQueued     ResponseStatus = "queued"
)

Defines values for ResponseStatus.

func (ResponseStatus) Valid

func (e ResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the ResponseStatus enum.

type ResponseStreamEvent

type ResponseStreamEvent struct {
	// contains filtered or unexported fields
}

ResponseStreamEvent defines model for ResponseStreamEvent.

func (ResponseStreamEvent) AsResponseAudioDeltaEvent

func (t ResponseStreamEvent) AsResponseAudioDeltaEvent() (ResponseAudioDeltaEvent, error)

AsResponseAudioDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseAudioDeltaEvent

func (ResponseStreamEvent) AsResponseAudioDoneEvent

func (t ResponseStreamEvent) AsResponseAudioDoneEvent() (ResponseAudioDoneEvent, error)

AsResponseAudioDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseAudioDoneEvent

func (ResponseStreamEvent) AsResponseAudioTranscriptDeltaEvent

func (t ResponseStreamEvent) AsResponseAudioTranscriptDeltaEvent() (ResponseAudioTranscriptDeltaEvent, error)

AsResponseAudioTranscriptDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseAudioTranscriptDeltaEvent

func (ResponseStreamEvent) AsResponseAudioTranscriptDoneEvent

func (t ResponseStreamEvent) AsResponseAudioTranscriptDoneEvent() (ResponseAudioTranscriptDoneEvent, error)

AsResponseAudioTranscriptDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseAudioTranscriptDoneEvent

func (ResponseStreamEvent) AsResponseCodeInterpreterCallCodeDeltaEvent

func (t ResponseStreamEvent) AsResponseCodeInterpreterCallCodeDeltaEvent() (ResponseCodeInterpreterCallCodeDeltaEvent, error)

AsResponseCodeInterpreterCallCodeDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseCodeInterpreterCallCodeDeltaEvent

func (ResponseStreamEvent) AsResponseCodeInterpreterCallCodeDoneEvent

func (t ResponseStreamEvent) AsResponseCodeInterpreterCallCodeDoneEvent() (ResponseCodeInterpreterCallCodeDoneEvent, error)

AsResponseCodeInterpreterCallCodeDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseCodeInterpreterCallCodeDoneEvent

func (ResponseStreamEvent) AsResponseCodeInterpreterCallCompletedEvent

func (t ResponseStreamEvent) AsResponseCodeInterpreterCallCompletedEvent() (ResponseCodeInterpreterCallCompletedEvent, error)

AsResponseCodeInterpreterCallCompletedEvent returns the union data inside the ResponseStreamEvent as a ResponseCodeInterpreterCallCompletedEvent

func (ResponseStreamEvent) AsResponseCodeInterpreterCallInProgressEvent

func (t ResponseStreamEvent) AsResponseCodeInterpreterCallInProgressEvent() (ResponseCodeInterpreterCallInProgressEvent, error)

AsResponseCodeInterpreterCallInProgressEvent returns the union data inside the ResponseStreamEvent as a ResponseCodeInterpreterCallInProgressEvent

func (ResponseStreamEvent) AsResponseCodeInterpreterCallInterpretingEvent

func (t ResponseStreamEvent) AsResponseCodeInterpreterCallInterpretingEvent() (ResponseCodeInterpreterCallInterpretingEvent, error)

AsResponseCodeInterpreterCallInterpretingEvent returns the union data inside the ResponseStreamEvent as a ResponseCodeInterpreterCallInterpretingEvent

func (ResponseStreamEvent) AsResponseCompletedEvent

func (t ResponseStreamEvent) AsResponseCompletedEvent() (ResponseCompletedEvent, error)

AsResponseCompletedEvent returns the union data inside the ResponseStreamEvent as a ResponseCompletedEvent

func (ResponseStreamEvent) AsResponseContentPartAddedEvent

func (t ResponseStreamEvent) AsResponseContentPartAddedEvent() (ResponseContentPartAddedEvent, error)

AsResponseContentPartAddedEvent returns the union data inside the ResponseStreamEvent as a ResponseContentPartAddedEvent

func (ResponseStreamEvent) AsResponseContentPartDoneEvent

func (t ResponseStreamEvent) AsResponseContentPartDoneEvent() (ResponseContentPartDoneEvent, error)

AsResponseContentPartDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseContentPartDoneEvent

func (ResponseStreamEvent) AsResponseCreatedEvent

func (t ResponseStreamEvent) AsResponseCreatedEvent() (ResponseCreatedEvent, error)

AsResponseCreatedEvent returns the union data inside the ResponseStreamEvent as a ResponseCreatedEvent

func (ResponseStreamEvent) AsResponseCustomToolCallInputDeltaEvent

func (t ResponseStreamEvent) AsResponseCustomToolCallInputDeltaEvent() (ResponseCustomToolCallInputDeltaEvent, error)

AsResponseCustomToolCallInputDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseCustomToolCallInputDeltaEvent

func (ResponseStreamEvent) AsResponseCustomToolCallInputDoneEvent

func (t ResponseStreamEvent) AsResponseCustomToolCallInputDoneEvent() (ResponseCustomToolCallInputDoneEvent, error)

AsResponseCustomToolCallInputDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseCustomToolCallInputDoneEvent

func (ResponseStreamEvent) AsResponseErrorEvent

func (t ResponseStreamEvent) AsResponseErrorEvent() (ResponseErrorEvent, error)

AsResponseErrorEvent returns the union data inside the ResponseStreamEvent as a ResponseErrorEvent

func (ResponseStreamEvent) AsResponseFailedEvent

func (t ResponseStreamEvent) AsResponseFailedEvent() (ResponseFailedEvent, error)

AsResponseFailedEvent returns the union data inside the ResponseStreamEvent as a ResponseFailedEvent

func (ResponseStreamEvent) AsResponseFileSearchCallCompletedEvent

func (t ResponseStreamEvent) AsResponseFileSearchCallCompletedEvent() (ResponseFileSearchCallCompletedEvent, error)

AsResponseFileSearchCallCompletedEvent returns the union data inside the ResponseStreamEvent as a ResponseFileSearchCallCompletedEvent

func (ResponseStreamEvent) AsResponseFileSearchCallInProgressEvent

func (t ResponseStreamEvent) AsResponseFileSearchCallInProgressEvent() (ResponseFileSearchCallInProgressEvent, error)

AsResponseFileSearchCallInProgressEvent returns the union data inside the ResponseStreamEvent as a ResponseFileSearchCallInProgressEvent

func (ResponseStreamEvent) AsResponseFileSearchCallSearchingEvent

func (t ResponseStreamEvent) AsResponseFileSearchCallSearchingEvent() (ResponseFileSearchCallSearchingEvent, error)

AsResponseFileSearchCallSearchingEvent returns the union data inside the ResponseStreamEvent as a ResponseFileSearchCallSearchingEvent

func (ResponseStreamEvent) AsResponseFunctionCallArgumentsDeltaEvent

func (t ResponseStreamEvent) AsResponseFunctionCallArgumentsDeltaEvent() (ResponseFunctionCallArgumentsDeltaEvent, error)

AsResponseFunctionCallArgumentsDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseFunctionCallArgumentsDeltaEvent

func (ResponseStreamEvent) AsResponseFunctionCallArgumentsDoneEvent

func (t ResponseStreamEvent) AsResponseFunctionCallArgumentsDoneEvent() (ResponseFunctionCallArgumentsDoneEvent, error)

AsResponseFunctionCallArgumentsDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseFunctionCallArgumentsDoneEvent

func (ResponseStreamEvent) AsResponseImageGenCallCompletedEvent

func (t ResponseStreamEvent) AsResponseImageGenCallCompletedEvent() (ResponseImageGenCallCompletedEvent, error)

AsResponseImageGenCallCompletedEvent returns the union data inside the ResponseStreamEvent as a ResponseImageGenCallCompletedEvent

func (ResponseStreamEvent) AsResponseImageGenCallGeneratingEvent

func (t ResponseStreamEvent) AsResponseImageGenCallGeneratingEvent() (ResponseImageGenCallGeneratingEvent, error)

AsResponseImageGenCallGeneratingEvent returns the union data inside the ResponseStreamEvent as a ResponseImageGenCallGeneratingEvent

func (ResponseStreamEvent) AsResponseImageGenCallInProgressEvent

func (t ResponseStreamEvent) AsResponseImageGenCallInProgressEvent() (ResponseImageGenCallInProgressEvent, error)

AsResponseImageGenCallInProgressEvent returns the union data inside the ResponseStreamEvent as a ResponseImageGenCallInProgressEvent

func (ResponseStreamEvent) AsResponseImageGenCallPartialImageEvent

func (t ResponseStreamEvent) AsResponseImageGenCallPartialImageEvent() (ResponseImageGenCallPartialImageEvent, error)

AsResponseImageGenCallPartialImageEvent returns the union data inside the ResponseStreamEvent as a ResponseImageGenCallPartialImageEvent

func (ResponseStreamEvent) AsResponseInProgressEvent

func (t ResponseStreamEvent) AsResponseInProgressEvent() (ResponseInProgressEvent, error)

AsResponseInProgressEvent returns the union data inside the ResponseStreamEvent as a ResponseInProgressEvent

func (ResponseStreamEvent) AsResponseIncompleteEvent

func (t ResponseStreamEvent) AsResponseIncompleteEvent() (ResponseIncompleteEvent, error)

AsResponseIncompleteEvent returns the union data inside the ResponseStreamEvent as a ResponseIncompleteEvent

func (ResponseStreamEvent) AsResponseMCPCallArgumentsDeltaEvent

func (t ResponseStreamEvent) AsResponseMCPCallArgumentsDeltaEvent() (ResponseMCPCallArgumentsDeltaEvent, error)

AsResponseMCPCallArgumentsDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPCallArgumentsDeltaEvent

func (ResponseStreamEvent) AsResponseMCPCallArgumentsDoneEvent

func (t ResponseStreamEvent) AsResponseMCPCallArgumentsDoneEvent() (ResponseMCPCallArgumentsDoneEvent, error)

AsResponseMCPCallArgumentsDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPCallArgumentsDoneEvent

func (ResponseStreamEvent) AsResponseMCPCallCompletedEvent

func (t ResponseStreamEvent) AsResponseMCPCallCompletedEvent() (ResponseMCPCallCompletedEvent, error)

AsResponseMCPCallCompletedEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPCallCompletedEvent

func (ResponseStreamEvent) AsResponseMCPCallFailedEvent

func (t ResponseStreamEvent) AsResponseMCPCallFailedEvent() (ResponseMCPCallFailedEvent, error)

AsResponseMCPCallFailedEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPCallFailedEvent

func (ResponseStreamEvent) AsResponseMCPCallInProgressEvent

func (t ResponseStreamEvent) AsResponseMCPCallInProgressEvent() (ResponseMCPCallInProgressEvent, error)

AsResponseMCPCallInProgressEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPCallInProgressEvent

func (ResponseStreamEvent) AsResponseMCPListToolsCompletedEvent

func (t ResponseStreamEvent) AsResponseMCPListToolsCompletedEvent() (ResponseMCPListToolsCompletedEvent, error)

AsResponseMCPListToolsCompletedEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPListToolsCompletedEvent

func (ResponseStreamEvent) AsResponseMCPListToolsFailedEvent

func (t ResponseStreamEvent) AsResponseMCPListToolsFailedEvent() (ResponseMCPListToolsFailedEvent, error)

AsResponseMCPListToolsFailedEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPListToolsFailedEvent

func (ResponseStreamEvent) AsResponseMCPListToolsInProgressEvent

func (t ResponseStreamEvent) AsResponseMCPListToolsInProgressEvent() (ResponseMCPListToolsInProgressEvent, error)

AsResponseMCPListToolsInProgressEvent returns the union data inside the ResponseStreamEvent as a ResponseMCPListToolsInProgressEvent

func (ResponseStreamEvent) AsResponseOutputItemAddedEvent

func (t ResponseStreamEvent) AsResponseOutputItemAddedEvent() (ResponseOutputItemAddedEvent, error)

AsResponseOutputItemAddedEvent returns the union data inside the ResponseStreamEvent as a ResponseOutputItemAddedEvent

func (ResponseStreamEvent) AsResponseOutputItemDoneEvent

func (t ResponseStreamEvent) AsResponseOutputItemDoneEvent() (ResponseOutputItemDoneEvent, error)

AsResponseOutputItemDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseOutputItemDoneEvent

func (ResponseStreamEvent) AsResponseOutputTextAnnotationAddedEvent

func (t ResponseStreamEvent) AsResponseOutputTextAnnotationAddedEvent() (ResponseOutputTextAnnotationAddedEvent, error)

AsResponseOutputTextAnnotationAddedEvent returns the union data inside the ResponseStreamEvent as a ResponseOutputTextAnnotationAddedEvent

func (ResponseStreamEvent) AsResponseQueuedEvent

func (t ResponseStreamEvent) AsResponseQueuedEvent() (ResponseQueuedEvent, error)

AsResponseQueuedEvent returns the union data inside the ResponseStreamEvent as a ResponseQueuedEvent

func (ResponseStreamEvent) AsResponseReasoningSummaryPartAddedEvent

func (t ResponseStreamEvent) AsResponseReasoningSummaryPartAddedEvent() (ResponseReasoningSummaryPartAddedEvent, error)

AsResponseReasoningSummaryPartAddedEvent returns the union data inside the ResponseStreamEvent as a ResponseReasoningSummaryPartAddedEvent

func (ResponseStreamEvent) AsResponseReasoningSummaryPartDoneEvent

func (t ResponseStreamEvent) AsResponseReasoningSummaryPartDoneEvent() (ResponseReasoningSummaryPartDoneEvent, error)

AsResponseReasoningSummaryPartDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseReasoningSummaryPartDoneEvent

func (ResponseStreamEvent) AsResponseReasoningSummaryTextDeltaEvent

func (t ResponseStreamEvent) AsResponseReasoningSummaryTextDeltaEvent() (ResponseReasoningSummaryTextDeltaEvent, error)

AsResponseReasoningSummaryTextDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseReasoningSummaryTextDeltaEvent

func (ResponseStreamEvent) AsResponseReasoningSummaryTextDoneEvent

func (t ResponseStreamEvent) AsResponseReasoningSummaryTextDoneEvent() (ResponseReasoningSummaryTextDoneEvent, error)

AsResponseReasoningSummaryTextDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseReasoningSummaryTextDoneEvent

func (ResponseStreamEvent) AsResponseReasoningTextDeltaEvent

func (t ResponseStreamEvent) AsResponseReasoningTextDeltaEvent() (ResponseReasoningTextDeltaEvent, error)

AsResponseReasoningTextDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseReasoningTextDeltaEvent

func (ResponseStreamEvent) AsResponseReasoningTextDoneEvent

func (t ResponseStreamEvent) AsResponseReasoningTextDoneEvent() (ResponseReasoningTextDoneEvent, error)

AsResponseReasoningTextDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseReasoningTextDoneEvent

func (ResponseStreamEvent) AsResponseRefusalDeltaEvent

func (t ResponseStreamEvent) AsResponseRefusalDeltaEvent() (ResponseRefusalDeltaEvent, error)

AsResponseRefusalDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseRefusalDeltaEvent

func (ResponseStreamEvent) AsResponseRefusalDoneEvent

func (t ResponseStreamEvent) AsResponseRefusalDoneEvent() (ResponseRefusalDoneEvent, error)

AsResponseRefusalDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseRefusalDoneEvent

func (ResponseStreamEvent) AsResponseTextDeltaEvent

func (t ResponseStreamEvent) AsResponseTextDeltaEvent() (ResponseTextDeltaEvent, error)

AsResponseTextDeltaEvent returns the union data inside the ResponseStreamEvent as a ResponseTextDeltaEvent

func (ResponseStreamEvent) AsResponseTextDoneEvent

func (t ResponseStreamEvent) AsResponseTextDoneEvent() (ResponseTextDoneEvent, error)

AsResponseTextDoneEvent returns the union data inside the ResponseStreamEvent as a ResponseTextDoneEvent

func (ResponseStreamEvent) AsResponseWebSearchCallCompletedEvent

func (t ResponseStreamEvent) AsResponseWebSearchCallCompletedEvent() (ResponseWebSearchCallCompletedEvent, error)

AsResponseWebSearchCallCompletedEvent returns the union data inside the ResponseStreamEvent as a ResponseWebSearchCallCompletedEvent

func (ResponseStreamEvent) AsResponseWebSearchCallInProgressEvent

func (t ResponseStreamEvent) AsResponseWebSearchCallInProgressEvent() (ResponseWebSearchCallInProgressEvent, error)

AsResponseWebSearchCallInProgressEvent returns the union data inside the ResponseStreamEvent as a ResponseWebSearchCallInProgressEvent

func (ResponseStreamEvent) AsResponseWebSearchCallSearchingEvent

func (t ResponseStreamEvent) AsResponseWebSearchCallSearchingEvent() (ResponseWebSearchCallSearchingEvent, error)

AsResponseWebSearchCallSearchingEvent returns the union data inside the ResponseStreamEvent as a ResponseWebSearchCallSearchingEvent

func (ResponseStreamEvent) Discriminator

func (t ResponseStreamEvent) Discriminator() (string, error)

func (*ResponseStreamEvent) FromResponseAudioDeltaEvent

func (t *ResponseStreamEvent) FromResponseAudioDeltaEvent(v ResponseAudioDeltaEvent) error

FromResponseAudioDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseAudioDeltaEvent

func (*ResponseStreamEvent) FromResponseAudioDoneEvent

func (t *ResponseStreamEvent) FromResponseAudioDoneEvent(v ResponseAudioDoneEvent) error

FromResponseAudioDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseAudioDoneEvent

func (*ResponseStreamEvent) FromResponseAudioTranscriptDeltaEvent

func (t *ResponseStreamEvent) FromResponseAudioTranscriptDeltaEvent(v ResponseAudioTranscriptDeltaEvent) error

FromResponseAudioTranscriptDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseAudioTranscriptDeltaEvent

func (*ResponseStreamEvent) FromResponseAudioTranscriptDoneEvent

func (t *ResponseStreamEvent) FromResponseAudioTranscriptDoneEvent(v ResponseAudioTranscriptDoneEvent) error

FromResponseAudioTranscriptDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseAudioTranscriptDoneEvent

func (*ResponseStreamEvent) FromResponseCodeInterpreterCallCodeDeltaEvent

func (t *ResponseStreamEvent) FromResponseCodeInterpreterCallCodeDeltaEvent(v ResponseCodeInterpreterCallCodeDeltaEvent) error

FromResponseCodeInterpreterCallCodeDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCodeInterpreterCallCodeDeltaEvent

func (*ResponseStreamEvent) FromResponseCodeInterpreterCallCodeDoneEvent

func (t *ResponseStreamEvent) FromResponseCodeInterpreterCallCodeDoneEvent(v ResponseCodeInterpreterCallCodeDoneEvent) error

FromResponseCodeInterpreterCallCodeDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCodeInterpreterCallCodeDoneEvent

func (*ResponseStreamEvent) FromResponseCodeInterpreterCallCompletedEvent

func (t *ResponseStreamEvent) FromResponseCodeInterpreterCallCompletedEvent(v ResponseCodeInterpreterCallCompletedEvent) error

FromResponseCodeInterpreterCallCompletedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCodeInterpreterCallCompletedEvent

func (*ResponseStreamEvent) FromResponseCodeInterpreterCallInProgressEvent

func (t *ResponseStreamEvent) FromResponseCodeInterpreterCallInProgressEvent(v ResponseCodeInterpreterCallInProgressEvent) error

FromResponseCodeInterpreterCallInProgressEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCodeInterpreterCallInProgressEvent

func (*ResponseStreamEvent) FromResponseCodeInterpreterCallInterpretingEvent

func (t *ResponseStreamEvent) FromResponseCodeInterpreterCallInterpretingEvent(v ResponseCodeInterpreterCallInterpretingEvent) error

FromResponseCodeInterpreterCallInterpretingEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCodeInterpreterCallInterpretingEvent

func (*ResponseStreamEvent) FromResponseCompletedEvent

func (t *ResponseStreamEvent) FromResponseCompletedEvent(v ResponseCompletedEvent) error

FromResponseCompletedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCompletedEvent

func (*ResponseStreamEvent) FromResponseContentPartAddedEvent

func (t *ResponseStreamEvent) FromResponseContentPartAddedEvent(v ResponseContentPartAddedEvent) error

FromResponseContentPartAddedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseContentPartAddedEvent

func (*ResponseStreamEvent) FromResponseContentPartDoneEvent

func (t *ResponseStreamEvent) FromResponseContentPartDoneEvent(v ResponseContentPartDoneEvent) error

FromResponseContentPartDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseContentPartDoneEvent

func (*ResponseStreamEvent) FromResponseCreatedEvent

func (t *ResponseStreamEvent) FromResponseCreatedEvent(v ResponseCreatedEvent) error

FromResponseCreatedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCreatedEvent

func (*ResponseStreamEvent) FromResponseCustomToolCallInputDeltaEvent

func (t *ResponseStreamEvent) FromResponseCustomToolCallInputDeltaEvent(v ResponseCustomToolCallInputDeltaEvent) error

FromResponseCustomToolCallInputDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCustomToolCallInputDeltaEvent

func (*ResponseStreamEvent) FromResponseCustomToolCallInputDoneEvent

func (t *ResponseStreamEvent) FromResponseCustomToolCallInputDoneEvent(v ResponseCustomToolCallInputDoneEvent) error

FromResponseCustomToolCallInputDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseCustomToolCallInputDoneEvent

func (*ResponseStreamEvent) FromResponseErrorEvent

func (t *ResponseStreamEvent) FromResponseErrorEvent(v ResponseErrorEvent) error

FromResponseErrorEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseErrorEvent

func (*ResponseStreamEvent) FromResponseFailedEvent

func (t *ResponseStreamEvent) FromResponseFailedEvent(v ResponseFailedEvent) error

FromResponseFailedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseFailedEvent

func (*ResponseStreamEvent) FromResponseFileSearchCallCompletedEvent

func (t *ResponseStreamEvent) FromResponseFileSearchCallCompletedEvent(v ResponseFileSearchCallCompletedEvent) error

FromResponseFileSearchCallCompletedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseFileSearchCallCompletedEvent

func (*ResponseStreamEvent) FromResponseFileSearchCallInProgressEvent

func (t *ResponseStreamEvent) FromResponseFileSearchCallInProgressEvent(v ResponseFileSearchCallInProgressEvent) error

FromResponseFileSearchCallInProgressEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseFileSearchCallInProgressEvent

func (*ResponseStreamEvent) FromResponseFileSearchCallSearchingEvent

func (t *ResponseStreamEvent) FromResponseFileSearchCallSearchingEvent(v ResponseFileSearchCallSearchingEvent) error

FromResponseFileSearchCallSearchingEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseFileSearchCallSearchingEvent

func (*ResponseStreamEvent) FromResponseFunctionCallArgumentsDeltaEvent

func (t *ResponseStreamEvent) FromResponseFunctionCallArgumentsDeltaEvent(v ResponseFunctionCallArgumentsDeltaEvent) error

FromResponseFunctionCallArgumentsDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseFunctionCallArgumentsDeltaEvent

func (*ResponseStreamEvent) FromResponseFunctionCallArgumentsDoneEvent

func (t *ResponseStreamEvent) FromResponseFunctionCallArgumentsDoneEvent(v ResponseFunctionCallArgumentsDoneEvent) error

FromResponseFunctionCallArgumentsDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseFunctionCallArgumentsDoneEvent

func (*ResponseStreamEvent) FromResponseImageGenCallCompletedEvent

func (t *ResponseStreamEvent) FromResponseImageGenCallCompletedEvent(v ResponseImageGenCallCompletedEvent) error

FromResponseImageGenCallCompletedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseImageGenCallCompletedEvent

func (*ResponseStreamEvent) FromResponseImageGenCallGeneratingEvent

func (t *ResponseStreamEvent) FromResponseImageGenCallGeneratingEvent(v ResponseImageGenCallGeneratingEvent) error

FromResponseImageGenCallGeneratingEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseImageGenCallGeneratingEvent

func (*ResponseStreamEvent) FromResponseImageGenCallInProgressEvent

func (t *ResponseStreamEvent) FromResponseImageGenCallInProgressEvent(v ResponseImageGenCallInProgressEvent) error

FromResponseImageGenCallInProgressEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseImageGenCallInProgressEvent

func (*ResponseStreamEvent) FromResponseImageGenCallPartialImageEvent

func (t *ResponseStreamEvent) FromResponseImageGenCallPartialImageEvent(v ResponseImageGenCallPartialImageEvent) error

FromResponseImageGenCallPartialImageEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseImageGenCallPartialImageEvent

func (*ResponseStreamEvent) FromResponseInProgressEvent

func (t *ResponseStreamEvent) FromResponseInProgressEvent(v ResponseInProgressEvent) error

FromResponseInProgressEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseInProgressEvent

func (*ResponseStreamEvent) FromResponseIncompleteEvent

func (t *ResponseStreamEvent) FromResponseIncompleteEvent(v ResponseIncompleteEvent) error

FromResponseIncompleteEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseIncompleteEvent

func (*ResponseStreamEvent) FromResponseMCPCallArgumentsDeltaEvent

func (t *ResponseStreamEvent) FromResponseMCPCallArgumentsDeltaEvent(v ResponseMCPCallArgumentsDeltaEvent) error

FromResponseMCPCallArgumentsDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPCallArgumentsDeltaEvent

func (*ResponseStreamEvent) FromResponseMCPCallArgumentsDoneEvent

func (t *ResponseStreamEvent) FromResponseMCPCallArgumentsDoneEvent(v ResponseMCPCallArgumentsDoneEvent) error

FromResponseMCPCallArgumentsDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPCallArgumentsDoneEvent

func (*ResponseStreamEvent) FromResponseMCPCallCompletedEvent

func (t *ResponseStreamEvent) FromResponseMCPCallCompletedEvent(v ResponseMCPCallCompletedEvent) error

FromResponseMCPCallCompletedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPCallCompletedEvent

func (*ResponseStreamEvent) FromResponseMCPCallFailedEvent

func (t *ResponseStreamEvent) FromResponseMCPCallFailedEvent(v ResponseMCPCallFailedEvent) error

FromResponseMCPCallFailedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPCallFailedEvent

func (*ResponseStreamEvent) FromResponseMCPCallInProgressEvent

func (t *ResponseStreamEvent) FromResponseMCPCallInProgressEvent(v ResponseMCPCallInProgressEvent) error

FromResponseMCPCallInProgressEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPCallInProgressEvent

func (*ResponseStreamEvent) FromResponseMCPListToolsCompletedEvent

func (t *ResponseStreamEvent) FromResponseMCPListToolsCompletedEvent(v ResponseMCPListToolsCompletedEvent) error

FromResponseMCPListToolsCompletedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPListToolsCompletedEvent

func (*ResponseStreamEvent) FromResponseMCPListToolsFailedEvent

func (t *ResponseStreamEvent) FromResponseMCPListToolsFailedEvent(v ResponseMCPListToolsFailedEvent) error

FromResponseMCPListToolsFailedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPListToolsFailedEvent

func (*ResponseStreamEvent) FromResponseMCPListToolsInProgressEvent

func (t *ResponseStreamEvent) FromResponseMCPListToolsInProgressEvent(v ResponseMCPListToolsInProgressEvent) error

FromResponseMCPListToolsInProgressEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseMCPListToolsInProgressEvent

func (*ResponseStreamEvent) FromResponseOutputItemAddedEvent

func (t *ResponseStreamEvent) FromResponseOutputItemAddedEvent(v ResponseOutputItemAddedEvent) error

FromResponseOutputItemAddedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseOutputItemAddedEvent

func (*ResponseStreamEvent) FromResponseOutputItemDoneEvent

func (t *ResponseStreamEvent) FromResponseOutputItemDoneEvent(v ResponseOutputItemDoneEvent) error

FromResponseOutputItemDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseOutputItemDoneEvent

func (*ResponseStreamEvent) FromResponseOutputTextAnnotationAddedEvent

func (t *ResponseStreamEvent) FromResponseOutputTextAnnotationAddedEvent(v ResponseOutputTextAnnotationAddedEvent) error

FromResponseOutputTextAnnotationAddedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseOutputTextAnnotationAddedEvent

func (*ResponseStreamEvent) FromResponseQueuedEvent

func (t *ResponseStreamEvent) FromResponseQueuedEvent(v ResponseQueuedEvent) error

FromResponseQueuedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseQueuedEvent

func (*ResponseStreamEvent) FromResponseReasoningSummaryPartAddedEvent

func (t *ResponseStreamEvent) FromResponseReasoningSummaryPartAddedEvent(v ResponseReasoningSummaryPartAddedEvent) error

FromResponseReasoningSummaryPartAddedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseReasoningSummaryPartAddedEvent

func (*ResponseStreamEvent) FromResponseReasoningSummaryPartDoneEvent

func (t *ResponseStreamEvent) FromResponseReasoningSummaryPartDoneEvent(v ResponseReasoningSummaryPartDoneEvent) error

FromResponseReasoningSummaryPartDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseReasoningSummaryPartDoneEvent

func (*ResponseStreamEvent) FromResponseReasoningSummaryTextDeltaEvent

func (t *ResponseStreamEvent) FromResponseReasoningSummaryTextDeltaEvent(v ResponseReasoningSummaryTextDeltaEvent) error

FromResponseReasoningSummaryTextDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseReasoningSummaryTextDeltaEvent

func (*ResponseStreamEvent) FromResponseReasoningSummaryTextDoneEvent

func (t *ResponseStreamEvent) FromResponseReasoningSummaryTextDoneEvent(v ResponseReasoningSummaryTextDoneEvent) error

FromResponseReasoningSummaryTextDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseReasoningSummaryTextDoneEvent

func (*ResponseStreamEvent) FromResponseReasoningTextDeltaEvent

func (t *ResponseStreamEvent) FromResponseReasoningTextDeltaEvent(v ResponseReasoningTextDeltaEvent) error

FromResponseReasoningTextDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseReasoningTextDeltaEvent

func (*ResponseStreamEvent) FromResponseReasoningTextDoneEvent

func (t *ResponseStreamEvent) FromResponseReasoningTextDoneEvent(v ResponseReasoningTextDoneEvent) error

FromResponseReasoningTextDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseReasoningTextDoneEvent

func (*ResponseStreamEvent) FromResponseRefusalDeltaEvent

func (t *ResponseStreamEvent) FromResponseRefusalDeltaEvent(v ResponseRefusalDeltaEvent) error

FromResponseRefusalDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseRefusalDeltaEvent

func (*ResponseStreamEvent) FromResponseRefusalDoneEvent

func (t *ResponseStreamEvent) FromResponseRefusalDoneEvent(v ResponseRefusalDoneEvent) error

FromResponseRefusalDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseRefusalDoneEvent

func (*ResponseStreamEvent) FromResponseTextDeltaEvent

func (t *ResponseStreamEvent) FromResponseTextDeltaEvent(v ResponseTextDeltaEvent) error

FromResponseTextDeltaEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseTextDeltaEvent

func (*ResponseStreamEvent) FromResponseTextDoneEvent

func (t *ResponseStreamEvent) FromResponseTextDoneEvent(v ResponseTextDoneEvent) error

FromResponseTextDoneEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseTextDoneEvent

func (*ResponseStreamEvent) FromResponseWebSearchCallCompletedEvent

func (t *ResponseStreamEvent) FromResponseWebSearchCallCompletedEvent(v ResponseWebSearchCallCompletedEvent) error

FromResponseWebSearchCallCompletedEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseWebSearchCallCompletedEvent

func (*ResponseStreamEvent) FromResponseWebSearchCallInProgressEvent

func (t *ResponseStreamEvent) FromResponseWebSearchCallInProgressEvent(v ResponseWebSearchCallInProgressEvent) error

FromResponseWebSearchCallInProgressEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseWebSearchCallInProgressEvent

func (*ResponseStreamEvent) FromResponseWebSearchCallSearchingEvent

func (t *ResponseStreamEvent) FromResponseWebSearchCallSearchingEvent(v ResponseWebSearchCallSearchingEvent) error

FromResponseWebSearchCallSearchingEvent overwrites any union data inside the ResponseStreamEvent as the provided ResponseWebSearchCallSearchingEvent

func (ResponseStreamEvent) MarshalJSON

func (t ResponseStreamEvent) MarshalJSON() ([]byte, error)

func (*ResponseStreamEvent) MergeResponseAudioDeltaEvent

func (t *ResponseStreamEvent) MergeResponseAudioDeltaEvent(v ResponseAudioDeltaEvent) error

MergeResponseAudioDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseAudioDeltaEvent

func (*ResponseStreamEvent) MergeResponseAudioDoneEvent

func (t *ResponseStreamEvent) MergeResponseAudioDoneEvent(v ResponseAudioDoneEvent) error

MergeResponseAudioDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseAudioDoneEvent

func (*ResponseStreamEvent) MergeResponseAudioTranscriptDeltaEvent

func (t *ResponseStreamEvent) MergeResponseAudioTranscriptDeltaEvent(v ResponseAudioTranscriptDeltaEvent) error

MergeResponseAudioTranscriptDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseAudioTranscriptDeltaEvent

func (*ResponseStreamEvent) MergeResponseAudioTranscriptDoneEvent

func (t *ResponseStreamEvent) MergeResponseAudioTranscriptDoneEvent(v ResponseAudioTranscriptDoneEvent) error

MergeResponseAudioTranscriptDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseAudioTranscriptDoneEvent

func (*ResponseStreamEvent) MergeResponseCodeInterpreterCallCodeDeltaEvent

func (t *ResponseStreamEvent) MergeResponseCodeInterpreterCallCodeDeltaEvent(v ResponseCodeInterpreterCallCodeDeltaEvent) error

MergeResponseCodeInterpreterCallCodeDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCodeInterpreterCallCodeDeltaEvent

func (*ResponseStreamEvent) MergeResponseCodeInterpreterCallCodeDoneEvent

func (t *ResponseStreamEvent) MergeResponseCodeInterpreterCallCodeDoneEvent(v ResponseCodeInterpreterCallCodeDoneEvent) error

MergeResponseCodeInterpreterCallCodeDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCodeInterpreterCallCodeDoneEvent

func (*ResponseStreamEvent) MergeResponseCodeInterpreterCallCompletedEvent

func (t *ResponseStreamEvent) MergeResponseCodeInterpreterCallCompletedEvent(v ResponseCodeInterpreterCallCompletedEvent) error

MergeResponseCodeInterpreterCallCompletedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCodeInterpreterCallCompletedEvent

func (*ResponseStreamEvent) MergeResponseCodeInterpreterCallInProgressEvent

func (t *ResponseStreamEvent) MergeResponseCodeInterpreterCallInProgressEvent(v ResponseCodeInterpreterCallInProgressEvent) error

MergeResponseCodeInterpreterCallInProgressEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCodeInterpreterCallInProgressEvent

func (*ResponseStreamEvent) MergeResponseCodeInterpreterCallInterpretingEvent

func (t *ResponseStreamEvent) MergeResponseCodeInterpreterCallInterpretingEvent(v ResponseCodeInterpreterCallInterpretingEvent) error

MergeResponseCodeInterpreterCallInterpretingEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCodeInterpreterCallInterpretingEvent

func (*ResponseStreamEvent) MergeResponseCompletedEvent

func (t *ResponseStreamEvent) MergeResponseCompletedEvent(v ResponseCompletedEvent) error

MergeResponseCompletedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCompletedEvent

func (*ResponseStreamEvent) MergeResponseContentPartAddedEvent

func (t *ResponseStreamEvent) MergeResponseContentPartAddedEvent(v ResponseContentPartAddedEvent) error

MergeResponseContentPartAddedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseContentPartAddedEvent

func (*ResponseStreamEvent) MergeResponseContentPartDoneEvent

func (t *ResponseStreamEvent) MergeResponseContentPartDoneEvent(v ResponseContentPartDoneEvent) error

MergeResponseContentPartDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseContentPartDoneEvent

func (*ResponseStreamEvent) MergeResponseCreatedEvent

func (t *ResponseStreamEvent) MergeResponseCreatedEvent(v ResponseCreatedEvent) error

MergeResponseCreatedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCreatedEvent

func (*ResponseStreamEvent) MergeResponseCustomToolCallInputDeltaEvent

func (t *ResponseStreamEvent) MergeResponseCustomToolCallInputDeltaEvent(v ResponseCustomToolCallInputDeltaEvent) error

MergeResponseCustomToolCallInputDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCustomToolCallInputDeltaEvent

func (*ResponseStreamEvent) MergeResponseCustomToolCallInputDoneEvent

func (t *ResponseStreamEvent) MergeResponseCustomToolCallInputDoneEvent(v ResponseCustomToolCallInputDoneEvent) error

MergeResponseCustomToolCallInputDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseCustomToolCallInputDoneEvent

func (*ResponseStreamEvent) MergeResponseErrorEvent

func (t *ResponseStreamEvent) MergeResponseErrorEvent(v ResponseErrorEvent) error

MergeResponseErrorEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseErrorEvent

func (*ResponseStreamEvent) MergeResponseFailedEvent

func (t *ResponseStreamEvent) MergeResponseFailedEvent(v ResponseFailedEvent) error

MergeResponseFailedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseFailedEvent

func (*ResponseStreamEvent) MergeResponseFileSearchCallCompletedEvent

func (t *ResponseStreamEvent) MergeResponseFileSearchCallCompletedEvent(v ResponseFileSearchCallCompletedEvent) error

MergeResponseFileSearchCallCompletedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseFileSearchCallCompletedEvent

func (*ResponseStreamEvent) MergeResponseFileSearchCallInProgressEvent

func (t *ResponseStreamEvent) MergeResponseFileSearchCallInProgressEvent(v ResponseFileSearchCallInProgressEvent) error

MergeResponseFileSearchCallInProgressEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseFileSearchCallInProgressEvent

func (*ResponseStreamEvent) MergeResponseFileSearchCallSearchingEvent

func (t *ResponseStreamEvent) MergeResponseFileSearchCallSearchingEvent(v ResponseFileSearchCallSearchingEvent) error

MergeResponseFileSearchCallSearchingEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseFileSearchCallSearchingEvent

func (*ResponseStreamEvent) MergeResponseFunctionCallArgumentsDeltaEvent

func (t *ResponseStreamEvent) MergeResponseFunctionCallArgumentsDeltaEvent(v ResponseFunctionCallArgumentsDeltaEvent) error

MergeResponseFunctionCallArgumentsDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseFunctionCallArgumentsDeltaEvent

func (*ResponseStreamEvent) MergeResponseFunctionCallArgumentsDoneEvent

func (t *ResponseStreamEvent) MergeResponseFunctionCallArgumentsDoneEvent(v ResponseFunctionCallArgumentsDoneEvent) error

MergeResponseFunctionCallArgumentsDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseFunctionCallArgumentsDoneEvent

func (*ResponseStreamEvent) MergeResponseImageGenCallCompletedEvent

func (t *ResponseStreamEvent) MergeResponseImageGenCallCompletedEvent(v ResponseImageGenCallCompletedEvent) error

MergeResponseImageGenCallCompletedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseImageGenCallCompletedEvent

func (*ResponseStreamEvent) MergeResponseImageGenCallGeneratingEvent

func (t *ResponseStreamEvent) MergeResponseImageGenCallGeneratingEvent(v ResponseImageGenCallGeneratingEvent) error

MergeResponseImageGenCallGeneratingEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseImageGenCallGeneratingEvent

func (*ResponseStreamEvent) MergeResponseImageGenCallInProgressEvent

func (t *ResponseStreamEvent) MergeResponseImageGenCallInProgressEvent(v ResponseImageGenCallInProgressEvent) error

MergeResponseImageGenCallInProgressEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseImageGenCallInProgressEvent

func (*ResponseStreamEvent) MergeResponseImageGenCallPartialImageEvent

func (t *ResponseStreamEvent) MergeResponseImageGenCallPartialImageEvent(v ResponseImageGenCallPartialImageEvent) error

MergeResponseImageGenCallPartialImageEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseImageGenCallPartialImageEvent

func (*ResponseStreamEvent) MergeResponseInProgressEvent

func (t *ResponseStreamEvent) MergeResponseInProgressEvent(v ResponseInProgressEvent) error

MergeResponseInProgressEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseInProgressEvent

func (*ResponseStreamEvent) MergeResponseIncompleteEvent

func (t *ResponseStreamEvent) MergeResponseIncompleteEvent(v ResponseIncompleteEvent) error

MergeResponseIncompleteEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseIncompleteEvent

func (*ResponseStreamEvent) MergeResponseMCPCallArgumentsDeltaEvent

func (t *ResponseStreamEvent) MergeResponseMCPCallArgumentsDeltaEvent(v ResponseMCPCallArgumentsDeltaEvent) error

MergeResponseMCPCallArgumentsDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPCallArgumentsDeltaEvent

func (*ResponseStreamEvent) MergeResponseMCPCallArgumentsDoneEvent

func (t *ResponseStreamEvent) MergeResponseMCPCallArgumentsDoneEvent(v ResponseMCPCallArgumentsDoneEvent) error

MergeResponseMCPCallArgumentsDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPCallArgumentsDoneEvent

func (*ResponseStreamEvent) MergeResponseMCPCallCompletedEvent

func (t *ResponseStreamEvent) MergeResponseMCPCallCompletedEvent(v ResponseMCPCallCompletedEvent) error

MergeResponseMCPCallCompletedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPCallCompletedEvent

func (*ResponseStreamEvent) MergeResponseMCPCallFailedEvent

func (t *ResponseStreamEvent) MergeResponseMCPCallFailedEvent(v ResponseMCPCallFailedEvent) error

MergeResponseMCPCallFailedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPCallFailedEvent

func (*ResponseStreamEvent) MergeResponseMCPCallInProgressEvent

func (t *ResponseStreamEvent) MergeResponseMCPCallInProgressEvent(v ResponseMCPCallInProgressEvent) error

MergeResponseMCPCallInProgressEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPCallInProgressEvent

func (*ResponseStreamEvent) MergeResponseMCPListToolsCompletedEvent

func (t *ResponseStreamEvent) MergeResponseMCPListToolsCompletedEvent(v ResponseMCPListToolsCompletedEvent) error

MergeResponseMCPListToolsCompletedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPListToolsCompletedEvent

func (*ResponseStreamEvent) MergeResponseMCPListToolsFailedEvent

func (t *ResponseStreamEvent) MergeResponseMCPListToolsFailedEvent(v ResponseMCPListToolsFailedEvent) error

MergeResponseMCPListToolsFailedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPListToolsFailedEvent

func (*ResponseStreamEvent) MergeResponseMCPListToolsInProgressEvent

func (t *ResponseStreamEvent) MergeResponseMCPListToolsInProgressEvent(v ResponseMCPListToolsInProgressEvent) error

MergeResponseMCPListToolsInProgressEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseMCPListToolsInProgressEvent

func (*ResponseStreamEvent) MergeResponseOutputItemAddedEvent

func (t *ResponseStreamEvent) MergeResponseOutputItemAddedEvent(v ResponseOutputItemAddedEvent) error

MergeResponseOutputItemAddedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseOutputItemAddedEvent

func (*ResponseStreamEvent) MergeResponseOutputItemDoneEvent

func (t *ResponseStreamEvent) MergeResponseOutputItemDoneEvent(v ResponseOutputItemDoneEvent) error

MergeResponseOutputItemDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseOutputItemDoneEvent

func (*ResponseStreamEvent) MergeResponseOutputTextAnnotationAddedEvent

func (t *ResponseStreamEvent) MergeResponseOutputTextAnnotationAddedEvent(v ResponseOutputTextAnnotationAddedEvent) error

MergeResponseOutputTextAnnotationAddedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseOutputTextAnnotationAddedEvent

func (*ResponseStreamEvent) MergeResponseQueuedEvent

func (t *ResponseStreamEvent) MergeResponseQueuedEvent(v ResponseQueuedEvent) error

MergeResponseQueuedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseQueuedEvent

func (*ResponseStreamEvent) MergeResponseReasoningSummaryPartAddedEvent

func (t *ResponseStreamEvent) MergeResponseReasoningSummaryPartAddedEvent(v ResponseReasoningSummaryPartAddedEvent) error

MergeResponseReasoningSummaryPartAddedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseReasoningSummaryPartAddedEvent

func (*ResponseStreamEvent) MergeResponseReasoningSummaryPartDoneEvent

func (t *ResponseStreamEvent) MergeResponseReasoningSummaryPartDoneEvent(v ResponseReasoningSummaryPartDoneEvent) error

MergeResponseReasoningSummaryPartDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseReasoningSummaryPartDoneEvent

func (*ResponseStreamEvent) MergeResponseReasoningSummaryTextDeltaEvent

func (t *ResponseStreamEvent) MergeResponseReasoningSummaryTextDeltaEvent(v ResponseReasoningSummaryTextDeltaEvent) error

MergeResponseReasoningSummaryTextDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseReasoningSummaryTextDeltaEvent

func (*ResponseStreamEvent) MergeResponseReasoningSummaryTextDoneEvent

func (t *ResponseStreamEvent) MergeResponseReasoningSummaryTextDoneEvent(v ResponseReasoningSummaryTextDoneEvent) error

MergeResponseReasoningSummaryTextDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseReasoningSummaryTextDoneEvent

func (*ResponseStreamEvent) MergeResponseReasoningTextDeltaEvent

func (t *ResponseStreamEvent) MergeResponseReasoningTextDeltaEvent(v ResponseReasoningTextDeltaEvent) error

MergeResponseReasoningTextDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseReasoningTextDeltaEvent

func (*ResponseStreamEvent) MergeResponseReasoningTextDoneEvent

func (t *ResponseStreamEvent) MergeResponseReasoningTextDoneEvent(v ResponseReasoningTextDoneEvent) error

MergeResponseReasoningTextDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseReasoningTextDoneEvent

func (*ResponseStreamEvent) MergeResponseRefusalDeltaEvent

func (t *ResponseStreamEvent) MergeResponseRefusalDeltaEvent(v ResponseRefusalDeltaEvent) error

MergeResponseRefusalDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseRefusalDeltaEvent

func (*ResponseStreamEvent) MergeResponseRefusalDoneEvent

func (t *ResponseStreamEvent) MergeResponseRefusalDoneEvent(v ResponseRefusalDoneEvent) error

MergeResponseRefusalDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseRefusalDoneEvent

func (*ResponseStreamEvent) MergeResponseTextDeltaEvent

func (t *ResponseStreamEvent) MergeResponseTextDeltaEvent(v ResponseTextDeltaEvent) error

MergeResponseTextDeltaEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseTextDeltaEvent

func (*ResponseStreamEvent) MergeResponseTextDoneEvent

func (t *ResponseStreamEvent) MergeResponseTextDoneEvent(v ResponseTextDoneEvent) error

MergeResponseTextDoneEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseTextDoneEvent

func (*ResponseStreamEvent) MergeResponseWebSearchCallCompletedEvent

func (t *ResponseStreamEvent) MergeResponseWebSearchCallCompletedEvent(v ResponseWebSearchCallCompletedEvent) error

MergeResponseWebSearchCallCompletedEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseWebSearchCallCompletedEvent

func (*ResponseStreamEvent) MergeResponseWebSearchCallInProgressEvent

func (t *ResponseStreamEvent) MergeResponseWebSearchCallInProgressEvent(v ResponseWebSearchCallInProgressEvent) error

MergeResponseWebSearchCallInProgressEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseWebSearchCallInProgressEvent

func (*ResponseStreamEvent) MergeResponseWebSearchCallSearchingEvent

func (t *ResponseStreamEvent) MergeResponseWebSearchCallSearchingEvent(v ResponseWebSearchCallSearchingEvent) error

MergeResponseWebSearchCallSearchingEvent performs a merge with any union data inside the ResponseStreamEvent, using the provided ResponseWebSearchCallSearchingEvent

func (*ResponseStreamEvent) UnmarshalJSON

func (t *ResponseStreamEvent) UnmarshalJSON(b []byte) error

func (ResponseStreamEvent) ValueByDiscriminator

func (t ResponseStreamEvent) ValueByDiscriminator() (interface{}, error)

type ResponseStreamOptions

type ResponseStreamOptions struct {
	// IncludeObfuscation When true, stream obfuscation will be enabled. Stream obfuscation adds
	// random characters to an `obfuscation` field on streaming delta events to
	// normalize payload sizes as a mitigation to certain side-channel attacks.
	// These obfuscation fields are included by default, but add a small amount
	// of overhead to the data stream. You can set `include_obfuscation` to
	// false to optimize for bandwidth if you trust the network links between
	// your application and the OpenAI API.
	IncludeObfuscation *bool `json:"include_obfuscation,omitempty"`
}

ResponseStreamOptions defines model for ResponseStreamOptions.

type ResponseTextDeltaEvent

type ResponseTextDeltaEvent struct {
	// ContentIndex The index of the content part that the text delta was added to.
	ContentIndex int `json:"content_index"`

	// Delta The text delta that was added.
	Delta string `json:"delta"`

	// ItemId The ID of the output item that the text delta was added to.
	ItemId string `json:"item_id"`

	// Logprobs The log probabilities of the tokens in the delta.
	Logprobs []ResponseLogProb `json:"logprobs"`

	// OutputIndex The index of the output item that the text delta was added to.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number for this event.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.output_text.delta`.
	Type ResponseTextDeltaEventType `json:"type"`
}

ResponseTextDeltaEvent Emitted when there is an additional text delta.

type ResponseTextDeltaEventType

type ResponseTextDeltaEventType string

ResponseTextDeltaEventType The type of the event. Always `response.output_text.delta`.

const (
	ResponseOutputTextDelta ResponseTextDeltaEventType = "response.output_text.delta"
)

Defines values for ResponseTextDeltaEventType.

func (ResponseTextDeltaEventType) Valid

func (e ResponseTextDeltaEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseTextDeltaEventType enum.

type ResponseTextDoneEvent

type ResponseTextDoneEvent struct {
	// ContentIndex The index of the content part that the text content is finalized.
	ContentIndex int `json:"content_index"`

	// ItemId The ID of the output item that the text content is finalized.
	ItemId string `json:"item_id"`

	// Logprobs The log probabilities of the tokens in the delta.
	Logprobs []ResponseLogProb `json:"logprobs"`

	// OutputIndex The index of the output item that the text content is finalized.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number for this event.
	SequenceNumber int `json:"sequence_number"`

	// Text The text content that is finalized.
	Text string `json:"text"`

	// Type The type of the event. Always `response.output_text.done`.
	Type ResponseTextDoneEventType `json:"type"`
}

ResponseTextDoneEvent Emitted when text content is finalized.

type ResponseTextDoneEventType

type ResponseTextDoneEventType string

ResponseTextDoneEventType The type of the event. Always `response.output_text.done`.

const (
	ResponseOutputTextDone ResponseTextDoneEventType = "response.output_text.done"
)

Defines values for ResponseTextDoneEventType.

func (ResponseTextDoneEventType) Valid

func (e ResponseTextDoneEventType) Valid() bool

Valid indicates whether the value is a known member of the ResponseTextDoneEventType enum.

type ResponseTextParam

type ResponseTextParam struct {
	// Format An object specifying the format that the model must output.
	//
	// Configuring `{ "type": "json_schema" }` enables Structured Outputs,
	// which ensures the model will match your supplied JSON schema. Learn more in the
	// [Structured Outputs guide](/docs/guides/structured-outputs).
	//
	// The default format is `{ "type": "text" }` with no additional options.
	//
	// **Not recommended for gpt-4o and newer models:**
	//
	// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
	// ensures the message the model generates is valid JSON. Using `json_schema`
	// is preferred for models that support it.
	Format    *TextResponseFormatConfiguration `json:"format,omitempty"`
	Verbosity *Verbosity                       `json:"verbosity,omitempty"`
}

ResponseTextParam Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - [Text inputs and outputs](/docs/guides/text) - [Structured Outputs](/docs/guides/structured-outputs)

type ResponseTruncation

type ResponseTruncation string

ResponseTruncation The truncation strategy to use for the model response.

  • `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.
  • `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
const (
	ResponseTruncationAuto     ResponseTruncation = "auto"
	ResponseTruncationDisabled ResponseTruncation = "disabled"
)

Defines values for ResponseTruncation.

func (ResponseTruncation) Valid

func (e ResponseTruncation) Valid() bool

Valid indicates whether the value is a known member of the ResponseTruncation enum.

type ResponseUsage

type ResponseUsage struct {
	// InputTokens The number of input tokens.
	InputTokens int `json:"input_tokens"`

	// InputTokensDetails A detailed breakdown of the input tokens.
	InputTokensDetails struct {
		// CacheWriteTokens The number of input tokens that were written to the cache.
		CacheWriteTokens int `json:"cache_write_tokens"`

		// CachedTokens The number of tokens that were retrieved from the cache.
		// [More on prompt caching](/docs/guides/prompt-caching).
		CachedTokens int `json:"cached_tokens"`
	} `json:"input_tokens_details"`

	// OutputTokens The number of output tokens.
	OutputTokens int `json:"output_tokens"`

	// OutputTokensDetails A detailed breakdown of the output tokens.
	OutputTokensDetails struct {
		// ReasoningTokens The number of reasoning tokens.
		ReasoningTokens int `json:"reasoning_tokens"`
	} `json:"output_tokens_details"`

	// TotalTokens The total number of tokens used.
	TotalTokens int `json:"total_tokens"`
}

ResponseUsage Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

type ResponseWebSearchCallCompletedEvent

type ResponseWebSearchCallCompletedEvent struct {
	// ItemId Unique ID for the output item associated with the web search call.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the web search call is associated with.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of the web search call being processed.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.web_search_call.completed`.
	Type ResponseWebSearchCallCompletedEventType `json:"type"`
}

ResponseWebSearchCallCompletedEvent Emitted when a web search call is completed.

type ResponseWebSearchCallCompletedEventType

type ResponseWebSearchCallCompletedEventType string

ResponseWebSearchCallCompletedEventType The type of the event. Always `response.web_search_call.completed`.

const (
	ResponseWebSearchCallCompleted ResponseWebSearchCallCompletedEventType = "response.web_search_call.completed"
)

Defines values for ResponseWebSearchCallCompletedEventType.

func (ResponseWebSearchCallCompletedEventType) Valid

Valid indicates whether the value is a known member of the ResponseWebSearchCallCompletedEventType enum.

type ResponseWebSearchCallInProgressEvent

type ResponseWebSearchCallInProgressEvent struct {
	// ItemId Unique ID for the output item associated with the web search call.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the web search call is associated with.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of the web search call being processed.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.web_search_call.in_progress`.
	Type ResponseWebSearchCallInProgressEventType `json:"type"`
}

ResponseWebSearchCallInProgressEvent Emitted when a web search call is initiated.

type ResponseWebSearchCallInProgressEventType

type ResponseWebSearchCallInProgressEventType string

ResponseWebSearchCallInProgressEventType The type of the event. Always `response.web_search_call.in_progress`.

const (
	ResponseWebSearchCallInProgress ResponseWebSearchCallInProgressEventType = "response.web_search_call.in_progress"
)

Defines values for ResponseWebSearchCallInProgressEventType.

func (ResponseWebSearchCallInProgressEventType) Valid

Valid indicates whether the value is a known member of the ResponseWebSearchCallInProgressEventType enum.

type ResponseWebSearchCallSearchingEvent

type ResponseWebSearchCallSearchingEvent struct {
	// ItemId Unique ID for the output item associated with the web search call.
	ItemId string `json:"item_id"`

	// OutputIndex The index of the output item that the web search call is associated with.
	OutputIndex int `json:"output_index"`

	// SequenceNumber The sequence number of the web search call being processed.
	SequenceNumber int `json:"sequence_number"`

	// Type The type of the event. Always `response.web_search_call.searching`.
	Type ResponseWebSearchCallSearchingEventType `json:"type"`
}

ResponseWebSearchCallSearchingEvent Emitted when a web search call is executing.

type ResponseWebSearchCallSearchingEventType

type ResponseWebSearchCallSearchingEventType string

ResponseWebSearchCallSearchingEventType The type of the event. Always `response.web_search_call.searching`.

const (
	ResponseWebSearchCallSearching ResponseWebSearchCallSearchingEventType = "response.web_search_call.searching"
)

Defines values for ResponseWebSearchCallSearchingEventType.

func (ResponseWebSearchCallSearchingEventType) Valid

Valid indicates whether the value is a known member of the ResponseWebSearchCallSearchingEventType enum.

type ScreenshotParam

type ScreenshotParam struct {
	// Type Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
	Type ScreenshotParamType `json:"type"`
}

ScreenshotParam A screenshot action.

type ScreenshotParamType

type ScreenshotParamType string

ScreenshotParamType Specifies the event type. For a screenshot action, this property is always set to `screenshot`.

const (
	Screenshot ScreenshotParamType = "screenshot"
)

Defines values for ScreenshotParamType.

func (ScreenshotParamType) Valid

func (e ScreenshotParamType) Valid() bool

Valid indicates whether the value is a known member of the ScreenshotParamType enum.

type ScrollParam

type ScrollParam struct {
	Keys *[]string `json:"keys,omitempty"`

	// ScrollX The horizontal scroll distance.
	ScrollX int `json:"scroll_x"`

	// ScrollY The vertical scroll distance.
	ScrollY int `json:"scroll_y"`

	// Type Specifies the event type. For a scroll action, this property is always set to `scroll`.
	Type ScrollParamType `json:"type"`

	// X The x-coordinate where the scroll occurred.
	X int `json:"x"`

	// Y The y-coordinate where the scroll occurred.
	Y int `json:"y"`
}

ScrollParam A scroll action.

type ScrollParamType

type ScrollParamType string

ScrollParamType Specifies the event type. For a scroll action, this property is always set to `scroll`.

const (
	Scroll ScrollParamType = "scroll"
)

Defines values for ScrollParamType.

func (ScrollParamType) Valid

func (e ScrollParamType) Valid() bool

Valid indicates whether the value is a known member of the ScrollParamType enum.

type SearchContentType

type SearchContentType string

SearchContentType defines model for SearchContentType.

const (
	SearchContentTypeImage SearchContentType = "image"
	SearchContentTypeText  SearchContentType = "text"
)

Defines values for SearchContentType.

func (SearchContentType) Valid

func (e SearchContentType) Valid() bool

Valid indicates whether the value is a known member of the SearchContentType enum.

type SearchContextSize

type SearchContextSize string

SearchContextSize defines model for SearchContextSize.

const (
	SearchContextSizeHigh   SearchContextSize = "high"
	SearchContextSizeLow    SearchContextSize = "low"
	SearchContextSizeMedium SearchContextSize = "medium"
)

Defines values for SearchContextSize.

func (SearchContextSize) Valid

func (e SearchContextSize) Valid() bool

Valid indicates whether the value is a known member of the SearchContextSize enum.

type ServiceTier

type ServiceTier string

ServiceTier defines model for ServiceTier.

type SkillReferenceParam

type SkillReferenceParam struct {
	// SkillId The ID of the referenced skill.
	SkillId string `json:"skill_id"`

	// Type References a skill created with the /v1/skills endpoint.
	Type SkillReferenceParamType `json:"type"`

	// Version Optional skill version. Use a positive integer or 'latest'. Omit for default.
	Version *string `json:"version,omitempty"`
}

SkillReferenceParam defines model for SkillReferenceParam.

type SkillReferenceParamType

type SkillReferenceParamType string

SkillReferenceParamType References a skill created with the /v1/skills endpoint.

const (
	SkillReference SkillReferenceParamType = "skill_reference"
)

Defines values for SkillReferenceParamType.

func (SkillReferenceParamType) Valid

func (e SkillReferenceParamType) Valid() bool

Valid indicates whether the value is a known member of the SkillReferenceParamType enum.

type SpecificApplyPatchParam

type SpecificApplyPatchParam struct {
	// Type The tool to call. Always `apply_patch`.
	Type SpecificApplyPatchParamType `json:"type"`
}

SpecificApplyPatchParam Forces the model to call the apply_patch tool when executing a tool call.

type SpecificApplyPatchParamType

type SpecificApplyPatchParamType string

SpecificApplyPatchParamType The tool to call. Always `apply_patch`.

const (
	SpecificApplyPatchParamTypeApplyPatch SpecificApplyPatchParamType = "apply_patch"
)

Defines values for SpecificApplyPatchParamType.

func (SpecificApplyPatchParamType) Valid

Valid indicates whether the value is a known member of the SpecificApplyPatchParamType enum.

type SpecificFunctionShellParam

type SpecificFunctionShellParam struct {
	// Type The tool to call. Always `shell`.
	Type SpecificFunctionShellParamType `json:"type"`
}

SpecificFunctionShellParam Forces the model to call the shell tool when a tool call is required.

type SpecificFunctionShellParamType

type SpecificFunctionShellParamType string

SpecificFunctionShellParamType The tool to call. Always `shell`.

const (
	SpecificFunctionShellParamTypeShell SpecificFunctionShellParamType = "shell"
)

Defines values for SpecificFunctionShellParamType.

func (SpecificFunctionShellParamType) Valid

Valid indicates whether the value is a known member of the SpecificFunctionShellParamType enum.

type SpecificProgrammaticToolCallingParam

type SpecificProgrammaticToolCallingParam struct {
	// Type The tool to call. Always `programmatic_tool_calling`.
	Type SpecificProgrammaticToolCallingParamType `json:"type"`
}

SpecificProgrammaticToolCallingParam defines model for SpecificProgrammaticToolCallingParam.

type SpecificProgrammaticToolCallingParamType

type SpecificProgrammaticToolCallingParamType string

SpecificProgrammaticToolCallingParamType The tool to call. Always `programmatic_tool_calling`.

const (
	SpecificProgrammaticToolCallingParamTypeProgrammaticToolCalling SpecificProgrammaticToolCallingParamType = "programmatic_tool_calling"
)

Defines values for SpecificProgrammaticToolCallingParamType.

func (SpecificProgrammaticToolCallingParamType) Valid

Valid indicates whether the value is a known member of the SpecificProgrammaticToolCallingParamType enum.

type SummaryTextContent

type SummaryTextContent struct {
	// Text A summary of the reasoning output from the model so far.
	Text string `json:"text"`

	// Type The type of the object. Always `summary_text`.
	Type SummaryTextContentType `json:"type"`
}

SummaryTextContent A summary text from the model.

type SummaryTextContentType

type SummaryTextContentType string

SummaryTextContentType The type of the object. Always `summary_text`.

const (
	SummaryTextContentTypeSummaryText SummaryTextContentType = "summary_text"
)

Defines values for SummaryTextContentType.

func (SummaryTextContentType) Valid

func (e SummaryTextContentType) Valid() bool

Valid indicates whether the value is a known member of the SummaryTextContentType enum.

type TextResponseFormatConfiguration

type TextResponseFormatConfiguration struct {
	// contains filtered or unexported fields
}

TextResponseFormatConfiguration An object specifying the format that the model must output.

Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).

The default format is `{ "type": "text" }` with no additional options.

**Not recommended for gpt-4o and newer models:**

Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it.

func (TextResponseFormatConfiguration) AsResponseFormatJsonObject

func (t TextResponseFormatConfiguration) AsResponseFormatJsonObject() (ResponseFormatJsonObject, error)

AsResponseFormatJsonObject returns the union data inside the TextResponseFormatConfiguration as a ResponseFormatJsonObject

func (TextResponseFormatConfiguration) AsResponseFormatText

func (t TextResponseFormatConfiguration) AsResponseFormatText() (ResponseFormatText, error)

AsResponseFormatText returns the union data inside the TextResponseFormatConfiguration as a ResponseFormatText

func (TextResponseFormatConfiguration) AsTextResponseFormatJsonSchema

func (t TextResponseFormatConfiguration) AsTextResponseFormatJsonSchema() (TextResponseFormatJsonSchema, error)

AsTextResponseFormatJsonSchema returns the union data inside the TextResponseFormatConfiguration as a TextResponseFormatJsonSchema

func (*TextResponseFormatConfiguration) FromResponseFormatJsonObject

func (t *TextResponseFormatConfiguration) FromResponseFormatJsonObject(v ResponseFormatJsonObject) error

FromResponseFormatJsonObject overwrites any union data inside the TextResponseFormatConfiguration as the provided ResponseFormatJsonObject

func (*TextResponseFormatConfiguration) FromResponseFormatText

func (t *TextResponseFormatConfiguration) FromResponseFormatText(v ResponseFormatText) error

FromResponseFormatText overwrites any union data inside the TextResponseFormatConfiguration as the provided ResponseFormatText

func (*TextResponseFormatConfiguration) FromTextResponseFormatJsonSchema

func (t *TextResponseFormatConfiguration) FromTextResponseFormatJsonSchema(v TextResponseFormatJsonSchema) error

FromTextResponseFormatJsonSchema overwrites any union data inside the TextResponseFormatConfiguration as the provided TextResponseFormatJsonSchema

func (TextResponseFormatConfiguration) MarshalJSON

func (t TextResponseFormatConfiguration) MarshalJSON() ([]byte, error)

func (*TextResponseFormatConfiguration) MergeResponseFormatJsonObject

func (t *TextResponseFormatConfiguration) MergeResponseFormatJsonObject(v ResponseFormatJsonObject) error

MergeResponseFormatJsonObject performs a merge with any union data inside the TextResponseFormatConfiguration, using the provided ResponseFormatJsonObject

func (*TextResponseFormatConfiguration) MergeResponseFormatText

func (t *TextResponseFormatConfiguration) MergeResponseFormatText(v ResponseFormatText) error

MergeResponseFormatText performs a merge with any union data inside the TextResponseFormatConfiguration, using the provided ResponseFormatText

func (*TextResponseFormatConfiguration) MergeTextResponseFormatJsonSchema

func (t *TextResponseFormatConfiguration) MergeTextResponseFormatJsonSchema(v TextResponseFormatJsonSchema) error

MergeTextResponseFormatJsonSchema performs a merge with any union data inside the TextResponseFormatConfiguration, using the provided TextResponseFormatJsonSchema

func (*TextResponseFormatConfiguration) UnmarshalJSON

func (t *TextResponseFormatConfiguration) UnmarshalJSON(b []byte) error

type TextResponseFormatJsonSchema

type TextResponseFormatJsonSchema struct {
	// Description A description of what the response format is for, used by the model to
	// determine how to respond in the format.
	Description *string `json:"description,omitempty"`

	// Name The name of the response format. Must be a-z, A-Z, 0-9, or contain
	// underscores and dashes, with a maximum length of 64.
	Name string `json:"name"`

	// Schema The schema for the response format, described as a JSON Schema object.
	// Learn how to build JSON schemas [here](https://json-schema.org/).
	Schema ResponseFormatJsonSchemaSchema `json:"schema"`
	Strict *bool                          `json:"strict,omitempty"`

	// Type The type of response format being defined. Always `json_schema`.
	Type TextResponseFormatJsonSchemaType `json:"type"`
}

TextResponseFormatJsonSchema JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs).

type TextResponseFormatJsonSchemaType

type TextResponseFormatJsonSchemaType string

TextResponseFormatJsonSchemaType The type of response format being defined. Always `json_schema`.

const (
	JsonSchema TextResponseFormatJsonSchemaType = "json_schema"
)

Defines values for TextResponseFormatJsonSchemaType.

func (TextResponseFormatJsonSchemaType) Valid

Valid indicates whether the value is a known member of the TextResponseFormatJsonSchemaType enum.

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

Tool A tool that can be used to generate a response.

func (Tool) AsApplyPatchToolParam

func (t Tool) AsApplyPatchToolParam() (ApplyPatchToolParam, error)

AsApplyPatchToolParam returns the union data inside the Tool as a ApplyPatchToolParam

func (Tool) AsCodeInterpreterTool

func (t Tool) AsCodeInterpreterTool() (CodeInterpreterTool, error)

AsCodeInterpreterTool returns the union data inside the Tool as a CodeInterpreterTool

func (Tool) AsComputerTool

func (t Tool) AsComputerTool() (ComputerTool, error)

AsComputerTool returns the union data inside the Tool as a ComputerTool

func (Tool) AsComputerUsePreviewTool

func (t Tool) AsComputerUsePreviewTool() (ComputerUsePreviewTool, error)

AsComputerUsePreviewTool returns the union data inside the Tool as a ComputerUsePreviewTool

func (Tool) AsCustomToolParam

func (t Tool) AsCustomToolParam() (CustomToolParam, error)

AsCustomToolParam returns the union data inside the Tool as a CustomToolParam

func (Tool) AsFileSearchTool

func (t Tool) AsFileSearchTool() (FileSearchTool, error)

AsFileSearchTool returns the union data inside the Tool as a FileSearchTool

func (Tool) AsFunctionShellToolParam

func (t Tool) AsFunctionShellToolParam() (FunctionShellToolParam, error)

AsFunctionShellToolParam returns the union data inside the Tool as a FunctionShellToolParam

func (Tool) AsFunctionTool

func (t Tool) AsFunctionTool() (FunctionTool, error)

AsFunctionTool returns the union data inside the Tool as a FunctionTool

func (Tool) AsImageGenTool

func (t Tool) AsImageGenTool() (ImageGenTool, error)

AsImageGenTool returns the union data inside the Tool as a ImageGenTool

func (Tool) AsLocalShellToolParam

func (t Tool) AsLocalShellToolParam() (LocalShellToolParam, error)

AsLocalShellToolParam returns the union data inside the Tool as a LocalShellToolParam

func (Tool) AsMCPTool

func (t Tool) AsMCPTool() (MCPTool, error)

AsMCPTool returns the union data inside the Tool as a MCPTool

func (Tool) AsNamespaceToolParam

func (t Tool) AsNamespaceToolParam() (NamespaceToolParam, error)

AsNamespaceToolParam returns the union data inside the Tool as a NamespaceToolParam

func (Tool) AsProgrammaticToolCallingParam

func (t Tool) AsProgrammaticToolCallingParam() (ProgrammaticToolCallingParam, error)

AsProgrammaticToolCallingParam returns the union data inside the Tool as a ProgrammaticToolCallingParam

func (Tool) AsToolSearchToolParam

func (t Tool) AsToolSearchToolParam() (ToolSearchToolParam, error)

AsToolSearchToolParam returns the union data inside the Tool as a ToolSearchToolParam

func (Tool) AsWebSearchPreviewTool

func (t Tool) AsWebSearchPreviewTool() (WebSearchPreviewTool, error)

AsWebSearchPreviewTool returns the union data inside the Tool as a WebSearchPreviewTool

func (Tool) AsWebSearchTool

func (t Tool) AsWebSearchTool() (WebSearchTool, error)

AsWebSearchTool returns the union data inside the Tool as a WebSearchTool

func (Tool) Discriminator

func (t Tool) Discriminator() (string, error)

func (*Tool) FromApplyPatchToolParam

func (t *Tool) FromApplyPatchToolParam(v ApplyPatchToolParam) error

FromApplyPatchToolParam overwrites any union data inside the Tool as the provided ApplyPatchToolParam

func (*Tool) FromCodeInterpreterTool

func (t *Tool) FromCodeInterpreterTool(v CodeInterpreterTool) error

FromCodeInterpreterTool overwrites any union data inside the Tool as the provided CodeInterpreterTool

func (*Tool) FromComputerTool

func (t *Tool) FromComputerTool(v ComputerTool) error

FromComputerTool overwrites any union data inside the Tool as the provided ComputerTool

func (*Tool) FromComputerUsePreviewTool

func (t *Tool) FromComputerUsePreviewTool(v ComputerUsePreviewTool) error

FromComputerUsePreviewTool overwrites any union data inside the Tool as the provided ComputerUsePreviewTool

func (*Tool) FromCustomToolParam

func (t *Tool) FromCustomToolParam(v CustomToolParam) error

FromCustomToolParam overwrites any union data inside the Tool as the provided CustomToolParam

func (*Tool) FromFileSearchTool

func (t *Tool) FromFileSearchTool(v FileSearchTool) error

FromFileSearchTool overwrites any union data inside the Tool as the provided FileSearchTool

func (*Tool) FromFunctionShellToolParam

func (t *Tool) FromFunctionShellToolParam(v FunctionShellToolParam) error

FromFunctionShellToolParam overwrites any union data inside the Tool as the provided FunctionShellToolParam

func (*Tool) FromFunctionTool

func (t *Tool) FromFunctionTool(v FunctionTool) error

FromFunctionTool overwrites any union data inside the Tool as the provided FunctionTool

func (*Tool) FromImageGenTool

func (t *Tool) FromImageGenTool(v ImageGenTool) error

FromImageGenTool overwrites any union data inside the Tool as the provided ImageGenTool

func (*Tool) FromLocalShellToolParam

func (t *Tool) FromLocalShellToolParam(v LocalShellToolParam) error

FromLocalShellToolParam overwrites any union data inside the Tool as the provided LocalShellToolParam

func (*Tool) FromMCPTool

func (t *Tool) FromMCPTool(v MCPTool) error

FromMCPTool overwrites any union data inside the Tool as the provided MCPTool

func (*Tool) FromNamespaceToolParam

func (t *Tool) FromNamespaceToolParam(v NamespaceToolParam) error

FromNamespaceToolParam overwrites any union data inside the Tool as the provided NamespaceToolParam

func (*Tool) FromProgrammaticToolCallingParam

func (t *Tool) FromProgrammaticToolCallingParam(v ProgrammaticToolCallingParam) error

FromProgrammaticToolCallingParam overwrites any union data inside the Tool as the provided ProgrammaticToolCallingParam

func (*Tool) FromToolSearchToolParam

func (t *Tool) FromToolSearchToolParam(v ToolSearchToolParam) error

FromToolSearchToolParam overwrites any union data inside the Tool as the provided ToolSearchToolParam

func (*Tool) FromWebSearchPreviewTool

func (t *Tool) FromWebSearchPreviewTool(v WebSearchPreviewTool) error

FromWebSearchPreviewTool overwrites any union data inside the Tool as the provided WebSearchPreviewTool

func (*Tool) FromWebSearchTool

func (t *Tool) FromWebSearchTool(v WebSearchTool) error

FromWebSearchTool overwrites any union data inside the Tool as the provided WebSearchTool

func (Tool) MarshalJSON

func (t Tool) MarshalJSON() ([]byte, error)

func (*Tool) MergeApplyPatchToolParam

func (t *Tool) MergeApplyPatchToolParam(v ApplyPatchToolParam) error

MergeApplyPatchToolParam performs a merge with any union data inside the Tool, using the provided ApplyPatchToolParam

func (*Tool) MergeCodeInterpreterTool

func (t *Tool) MergeCodeInterpreterTool(v CodeInterpreterTool) error

MergeCodeInterpreterTool performs a merge with any union data inside the Tool, using the provided CodeInterpreterTool

func (*Tool) MergeComputerTool

func (t *Tool) MergeComputerTool(v ComputerTool) error

MergeComputerTool performs a merge with any union data inside the Tool, using the provided ComputerTool

func (*Tool) MergeComputerUsePreviewTool

func (t *Tool) MergeComputerUsePreviewTool(v ComputerUsePreviewTool) error

MergeComputerUsePreviewTool performs a merge with any union data inside the Tool, using the provided ComputerUsePreviewTool

func (*Tool) MergeCustomToolParam

func (t *Tool) MergeCustomToolParam(v CustomToolParam) error

MergeCustomToolParam performs a merge with any union data inside the Tool, using the provided CustomToolParam

func (*Tool) MergeFileSearchTool

func (t *Tool) MergeFileSearchTool(v FileSearchTool) error

MergeFileSearchTool performs a merge with any union data inside the Tool, using the provided FileSearchTool

func (*Tool) MergeFunctionShellToolParam

func (t *Tool) MergeFunctionShellToolParam(v FunctionShellToolParam) error

MergeFunctionShellToolParam performs a merge with any union data inside the Tool, using the provided FunctionShellToolParam

func (*Tool) MergeFunctionTool

func (t *Tool) MergeFunctionTool(v FunctionTool) error

MergeFunctionTool performs a merge with any union data inside the Tool, using the provided FunctionTool

func (*Tool) MergeImageGenTool

func (t *Tool) MergeImageGenTool(v ImageGenTool) error

MergeImageGenTool performs a merge with any union data inside the Tool, using the provided ImageGenTool

func (*Tool) MergeLocalShellToolParam

func (t *Tool) MergeLocalShellToolParam(v LocalShellToolParam) error

MergeLocalShellToolParam performs a merge with any union data inside the Tool, using the provided LocalShellToolParam

func (*Tool) MergeMCPTool

func (t *Tool) MergeMCPTool(v MCPTool) error

MergeMCPTool performs a merge with any union data inside the Tool, using the provided MCPTool

func (*Tool) MergeNamespaceToolParam

func (t *Tool) MergeNamespaceToolParam(v NamespaceToolParam) error

MergeNamespaceToolParam performs a merge with any union data inside the Tool, using the provided NamespaceToolParam

func (*Tool) MergeProgrammaticToolCallingParam

func (t *Tool) MergeProgrammaticToolCallingParam(v ProgrammaticToolCallingParam) error

MergeProgrammaticToolCallingParam performs a merge with any union data inside the Tool, using the provided ProgrammaticToolCallingParam

func (*Tool) MergeToolSearchToolParam

func (t *Tool) MergeToolSearchToolParam(v ToolSearchToolParam) error

MergeToolSearchToolParam performs a merge with any union data inside the Tool, using the provided ToolSearchToolParam

func (*Tool) MergeWebSearchPreviewTool

func (t *Tool) MergeWebSearchPreviewTool(v WebSearchPreviewTool) error

MergeWebSearchPreviewTool performs a merge with any union data inside the Tool, using the provided WebSearchPreviewTool

func (*Tool) MergeWebSearchTool

func (t *Tool) MergeWebSearchTool(v WebSearchTool) error

MergeWebSearchTool performs a merge with any union data inside the Tool, using the provided WebSearchTool

func (*Tool) UnmarshalJSON

func (t *Tool) UnmarshalJSON(b []byte) error

func (Tool) ValueByDiscriminator

func (t Tool) ValueByDiscriminator() (interface{}, error)

type ToolCallCaller

type ToolCallCaller struct {
	// contains filtered or unexported fields
}

ToolCallCaller The execution context that produced this tool call.

func (ToolCallCaller) AsDirectToolCallCaller

func (t ToolCallCaller) AsDirectToolCallCaller() (DirectToolCallCaller, error)

AsDirectToolCallCaller returns the union data inside the ToolCallCaller as a DirectToolCallCaller

func (ToolCallCaller) AsProgramToolCallCaller

func (t ToolCallCaller) AsProgramToolCallCaller() (ProgramToolCallCaller, error)

AsProgramToolCallCaller returns the union data inside the ToolCallCaller as a ProgramToolCallCaller

func (ToolCallCaller) Discriminator

func (t ToolCallCaller) Discriminator() (string, error)

func (*ToolCallCaller) FromDirectToolCallCaller

func (t *ToolCallCaller) FromDirectToolCallCaller(v DirectToolCallCaller) error

FromDirectToolCallCaller overwrites any union data inside the ToolCallCaller as the provided DirectToolCallCaller

func (*ToolCallCaller) FromProgramToolCallCaller

func (t *ToolCallCaller) FromProgramToolCallCaller(v ProgramToolCallCaller) error

FromProgramToolCallCaller overwrites any union data inside the ToolCallCaller as the provided ProgramToolCallCaller

func (ToolCallCaller) MarshalJSON

func (t ToolCallCaller) MarshalJSON() ([]byte, error)

func (*ToolCallCaller) MergeDirectToolCallCaller

func (t *ToolCallCaller) MergeDirectToolCallCaller(v DirectToolCallCaller) error

MergeDirectToolCallCaller performs a merge with any union data inside the ToolCallCaller, using the provided DirectToolCallCaller

func (*ToolCallCaller) MergeProgramToolCallCaller

func (t *ToolCallCaller) MergeProgramToolCallCaller(v ProgramToolCallCaller) error

MergeProgramToolCallCaller performs a merge with any union data inside the ToolCallCaller, using the provided ProgramToolCallCaller

func (*ToolCallCaller) UnmarshalJSON

func (t *ToolCallCaller) UnmarshalJSON(b []byte) error

func (ToolCallCaller) ValueByDiscriminator

func (t ToolCallCaller) ValueByDiscriminator() (interface{}, error)

type ToolCallCallerParam

type ToolCallCallerParam struct {
	// contains filtered or unexported fields
}

ToolCallCallerParam The execution context that produced this tool call.

func (ToolCallCallerParam) AsDirectToolCallCallerParam

func (t ToolCallCallerParam) AsDirectToolCallCallerParam() (DirectToolCallCallerParam, error)

AsDirectToolCallCallerParam returns the union data inside the ToolCallCallerParam as a DirectToolCallCallerParam

func (ToolCallCallerParam) AsProgramToolCallCallerParam

func (t ToolCallCallerParam) AsProgramToolCallCallerParam() (ProgramToolCallCallerParam, error)

AsProgramToolCallCallerParam returns the union data inside the ToolCallCallerParam as a ProgramToolCallCallerParam

func (ToolCallCallerParam) Discriminator

func (t ToolCallCallerParam) Discriminator() (string, error)

func (*ToolCallCallerParam) FromDirectToolCallCallerParam

func (t *ToolCallCallerParam) FromDirectToolCallCallerParam(v DirectToolCallCallerParam) error

FromDirectToolCallCallerParam overwrites any union data inside the ToolCallCallerParam as the provided DirectToolCallCallerParam

func (*ToolCallCallerParam) FromProgramToolCallCallerParam

func (t *ToolCallCallerParam) FromProgramToolCallCallerParam(v ProgramToolCallCallerParam) error

FromProgramToolCallCallerParam overwrites any union data inside the ToolCallCallerParam as the provided ProgramToolCallCallerParam

func (ToolCallCallerParam) MarshalJSON

func (t ToolCallCallerParam) MarshalJSON() ([]byte, error)

func (*ToolCallCallerParam) MergeDirectToolCallCallerParam

func (t *ToolCallCallerParam) MergeDirectToolCallCallerParam(v DirectToolCallCallerParam) error

MergeDirectToolCallCallerParam performs a merge with any union data inside the ToolCallCallerParam, using the provided DirectToolCallCallerParam

func (*ToolCallCallerParam) MergeProgramToolCallCallerParam

func (t *ToolCallCallerParam) MergeProgramToolCallCallerParam(v ProgramToolCallCallerParam) error

MergeProgramToolCallCallerParam performs a merge with any union data inside the ToolCallCallerParam, using the provided ProgramToolCallCallerParam

func (*ToolCallCallerParam) UnmarshalJSON

func (t *ToolCallCallerParam) UnmarshalJSON(b []byte) error

func (ToolCallCallerParam) ValueByDiscriminator

func (t ToolCallCallerParam) ValueByDiscriminator() (interface{}, error)

type ToolChoiceAllowed

type ToolChoiceAllowed struct {
	// Mode Constrains the tools available to the model to a pre-defined set.
	//
	// `auto` allows the model to pick from among the allowed tools and generate a
	// message.
	//
	// `required` requires the model to call one or more of the allowed tools.
	Mode ToolChoiceAllowedMode `json:"mode"`

	// Tools A list of tool definitions that the model should be allowed to call.
	//
	// For the Responses API, the list of tool definitions might look like:
	// “`json
	// [
	//   { "type": "function", "name": "get_weather" },
	//   { "type": "mcp", "server_label": "deepwiki" },
	//   { "type": "image_generation" }
	// ]
	// “`
	Tools []map[string]interface{} `json:"tools"`

	// Type Allowed tool configuration type. Always `allowed_tools`.
	Type ToolChoiceAllowedType `json:"type"`
}

ToolChoiceAllowed Constrains the tools available to the model to a pre-defined set.

type ToolChoiceAllowedMode

type ToolChoiceAllowedMode string

ToolChoiceAllowedMode Constrains the tools available to the model to a pre-defined set.

`auto` allows the model to pick from among the allowed tools and generate a message.

`required` requires the model to call one or more of the allowed tools.

const (
	ToolChoiceAllowedModeAuto     ToolChoiceAllowedMode = "auto"
	ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
)

Defines values for ToolChoiceAllowedMode.

func (ToolChoiceAllowedMode) Valid

func (e ToolChoiceAllowedMode) Valid() bool

Valid indicates whether the value is a known member of the ToolChoiceAllowedMode enum.

type ToolChoiceAllowedType

type ToolChoiceAllowedType string

ToolChoiceAllowedType Allowed tool configuration type. Always `allowed_tools`.

const (
	AllowedTools ToolChoiceAllowedType = "allowed_tools"
)

Defines values for ToolChoiceAllowedType.

func (ToolChoiceAllowedType) Valid

func (e ToolChoiceAllowedType) Valid() bool

Valid indicates whether the value is a known member of the ToolChoiceAllowedType enum.

type ToolChoiceCustom

type ToolChoiceCustom struct {
	// Name The name of the custom tool to call.
	Name string `json:"name"`

	// Type For custom tool calling, the type is always `custom`.
	Type ToolChoiceCustomType `json:"type"`
}

ToolChoiceCustom Use this option to force the model to call a specific custom tool.

type ToolChoiceCustomType

type ToolChoiceCustomType string

ToolChoiceCustomType For custom tool calling, the type is always `custom`.

const (
	ToolChoiceCustomTypeCustom ToolChoiceCustomType = "custom"
)

Defines values for ToolChoiceCustomType.

func (ToolChoiceCustomType) Valid

func (e ToolChoiceCustomType) Valid() bool

Valid indicates whether the value is a known member of the ToolChoiceCustomType enum.

type ToolChoiceFunction

type ToolChoiceFunction struct {
	// Name The name of the function to call.
	Name string `json:"name"`

	// Type For function calling, the type is always `function`.
	Type ToolChoiceFunctionType `json:"type"`
}

ToolChoiceFunction Use this option to force the model to call a specific function.

type ToolChoiceFunctionType

type ToolChoiceFunctionType string

ToolChoiceFunctionType For function calling, the type is always `function`.

const (
	ToolChoiceFunctionTypeFunction ToolChoiceFunctionType = "function"
)

Defines values for ToolChoiceFunctionType.

func (ToolChoiceFunctionType) Valid

func (e ToolChoiceFunctionType) Valid() bool

Valid indicates whether the value is a known member of the ToolChoiceFunctionType enum.

type ToolChoiceMCP

type ToolChoiceMCP struct {
	Name *string `json:"name,omitempty"`

	// ServerLabel The label of the MCP server to use.
	ServerLabel string `json:"server_label"`

	// Type For MCP tools, the type is always `mcp`.
	Type ToolChoiceMCPType `json:"type"`
}

ToolChoiceMCP Use this option to force the model to call a specific tool on a remote MCP server.

type ToolChoiceMCPType

type ToolChoiceMCPType string

ToolChoiceMCPType For MCP tools, the type is always `mcp`.

const (
	ToolChoiceMCPTypeMcp ToolChoiceMCPType = "mcp"
)

Defines values for ToolChoiceMCPType.

func (ToolChoiceMCPType) Valid

func (e ToolChoiceMCPType) Valid() bool

Valid indicates whether the value is a known member of the ToolChoiceMCPType enum.

type ToolChoiceOptions

type ToolChoiceOptions string

ToolChoiceOptions Controls which (if any) tool is called by the model.

`none` means the model will not call any tool and instead generates a message.

`auto` means the model can pick between generating a message or calling one or more tools.

`required` means the model must call one or more tools.

const (
	ToolChoiceOptionsAuto     ToolChoiceOptions = "auto"
	ToolChoiceOptionsNone     ToolChoiceOptions = "none"
	ToolChoiceOptionsRequired ToolChoiceOptions = "required"
)

Defines values for ToolChoiceOptions.

func (ToolChoiceOptions) Valid

func (e ToolChoiceOptions) Valid() bool

Valid indicates whether the value is a known member of the ToolChoiceOptions enum.

type ToolChoiceParam

type ToolChoiceParam struct {
	// contains filtered or unexported fields
}

ToolChoiceParam How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model can call.

func (ToolChoiceParam) AsSpecificApplyPatchParam

func (t ToolChoiceParam) AsSpecificApplyPatchParam() (SpecificApplyPatchParam, error)

AsSpecificApplyPatchParam returns the union data inside the ToolChoiceParam as a SpecificApplyPatchParam

func (ToolChoiceParam) AsSpecificFunctionShellParam

func (t ToolChoiceParam) AsSpecificFunctionShellParam() (SpecificFunctionShellParam, error)

AsSpecificFunctionShellParam returns the union data inside the ToolChoiceParam as a SpecificFunctionShellParam

func (ToolChoiceParam) AsSpecificProgrammaticToolCallingParam

func (t ToolChoiceParam) AsSpecificProgrammaticToolCallingParam() (SpecificProgrammaticToolCallingParam, error)

AsSpecificProgrammaticToolCallingParam returns the union data inside the ToolChoiceParam as a SpecificProgrammaticToolCallingParam

func (ToolChoiceParam) AsToolChoiceAllowed

func (t ToolChoiceParam) AsToolChoiceAllowed() (ToolChoiceAllowed, error)

AsToolChoiceAllowed returns the union data inside the ToolChoiceParam as a ToolChoiceAllowed

func (ToolChoiceParam) AsToolChoiceCustom

func (t ToolChoiceParam) AsToolChoiceCustom() (ToolChoiceCustom, error)

AsToolChoiceCustom returns the union data inside the ToolChoiceParam as a ToolChoiceCustom

func (ToolChoiceParam) AsToolChoiceFunction

func (t ToolChoiceParam) AsToolChoiceFunction() (ToolChoiceFunction, error)

AsToolChoiceFunction returns the union data inside the ToolChoiceParam as a ToolChoiceFunction

func (ToolChoiceParam) AsToolChoiceMCP

func (t ToolChoiceParam) AsToolChoiceMCP() (ToolChoiceMCP, error)

AsToolChoiceMCP returns the union data inside the ToolChoiceParam as a ToolChoiceMCP

func (ToolChoiceParam) AsToolChoiceOptions

func (t ToolChoiceParam) AsToolChoiceOptions() (ToolChoiceOptions, error)

AsToolChoiceOptions returns the union data inside the ToolChoiceParam as a ToolChoiceOptions

func (ToolChoiceParam) AsToolChoiceTypes

func (t ToolChoiceParam) AsToolChoiceTypes() (ToolChoiceTypes, error)

AsToolChoiceTypes returns the union data inside the ToolChoiceParam as a ToolChoiceTypes

func (*ToolChoiceParam) FromSpecificApplyPatchParam

func (t *ToolChoiceParam) FromSpecificApplyPatchParam(v SpecificApplyPatchParam) error

FromSpecificApplyPatchParam overwrites any union data inside the ToolChoiceParam as the provided SpecificApplyPatchParam

func (*ToolChoiceParam) FromSpecificFunctionShellParam

func (t *ToolChoiceParam) FromSpecificFunctionShellParam(v SpecificFunctionShellParam) error

FromSpecificFunctionShellParam overwrites any union data inside the ToolChoiceParam as the provided SpecificFunctionShellParam

func (*ToolChoiceParam) FromSpecificProgrammaticToolCallingParam

func (t *ToolChoiceParam) FromSpecificProgrammaticToolCallingParam(v SpecificProgrammaticToolCallingParam) error

FromSpecificProgrammaticToolCallingParam overwrites any union data inside the ToolChoiceParam as the provided SpecificProgrammaticToolCallingParam

func (*ToolChoiceParam) FromToolChoiceAllowed

func (t *ToolChoiceParam) FromToolChoiceAllowed(v ToolChoiceAllowed) error

FromToolChoiceAllowed overwrites any union data inside the ToolChoiceParam as the provided ToolChoiceAllowed

func (*ToolChoiceParam) FromToolChoiceCustom

func (t *ToolChoiceParam) FromToolChoiceCustom(v ToolChoiceCustom) error

FromToolChoiceCustom overwrites any union data inside the ToolChoiceParam as the provided ToolChoiceCustom

func (*ToolChoiceParam) FromToolChoiceFunction

func (t *ToolChoiceParam) FromToolChoiceFunction(v ToolChoiceFunction) error

FromToolChoiceFunction overwrites any union data inside the ToolChoiceParam as the provided ToolChoiceFunction

func (*ToolChoiceParam) FromToolChoiceMCP

func (t *ToolChoiceParam) FromToolChoiceMCP(v ToolChoiceMCP) error

FromToolChoiceMCP overwrites any union data inside the ToolChoiceParam as the provided ToolChoiceMCP

func (*ToolChoiceParam) FromToolChoiceOptions

func (t *ToolChoiceParam) FromToolChoiceOptions(v ToolChoiceOptions) error

FromToolChoiceOptions overwrites any union data inside the ToolChoiceParam as the provided ToolChoiceOptions

func (*ToolChoiceParam) FromToolChoiceTypes

func (t *ToolChoiceParam) FromToolChoiceTypes(v ToolChoiceTypes) error

FromToolChoiceTypes overwrites any union data inside the ToolChoiceParam as the provided ToolChoiceTypes

func (ToolChoiceParam) MarshalJSON

func (t ToolChoiceParam) MarshalJSON() ([]byte, error)

func (*ToolChoiceParam) MergeSpecificApplyPatchParam

func (t *ToolChoiceParam) MergeSpecificApplyPatchParam(v SpecificApplyPatchParam) error

MergeSpecificApplyPatchParam performs a merge with any union data inside the ToolChoiceParam, using the provided SpecificApplyPatchParam

func (*ToolChoiceParam) MergeSpecificFunctionShellParam

func (t *ToolChoiceParam) MergeSpecificFunctionShellParam(v SpecificFunctionShellParam) error

MergeSpecificFunctionShellParam performs a merge with any union data inside the ToolChoiceParam, using the provided SpecificFunctionShellParam

func (*ToolChoiceParam) MergeSpecificProgrammaticToolCallingParam

func (t *ToolChoiceParam) MergeSpecificProgrammaticToolCallingParam(v SpecificProgrammaticToolCallingParam) error

MergeSpecificProgrammaticToolCallingParam performs a merge with any union data inside the ToolChoiceParam, using the provided SpecificProgrammaticToolCallingParam

func (*ToolChoiceParam) MergeToolChoiceAllowed

func (t *ToolChoiceParam) MergeToolChoiceAllowed(v ToolChoiceAllowed) error

MergeToolChoiceAllowed performs a merge with any union data inside the ToolChoiceParam, using the provided ToolChoiceAllowed

func (*ToolChoiceParam) MergeToolChoiceCustom

func (t *ToolChoiceParam) MergeToolChoiceCustom(v ToolChoiceCustom) error

MergeToolChoiceCustom performs a merge with any union data inside the ToolChoiceParam, using the provided ToolChoiceCustom

func (*ToolChoiceParam) MergeToolChoiceFunction

func (t *ToolChoiceParam) MergeToolChoiceFunction(v ToolChoiceFunction) error

MergeToolChoiceFunction performs a merge with any union data inside the ToolChoiceParam, using the provided ToolChoiceFunction

func (*ToolChoiceParam) MergeToolChoiceMCP

func (t *ToolChoiceParam) MergeToolChoiceMCP(v ToolChoiceMCP) error

MergeToolChoiceMCP performs a merge with any union data inside the ToolChoiceParam, using the provided ToolChoiceMCP

func (*ToolChoiceParam) MergeToolChoiceOptions

func (t *ToolChoiceParam) MergeToolChoiceOptions(v ToolChoiceOptions) error

MergeToolChoiceOptions performs a merge with any union data inside the ToolChoiceParam, using the provided ToolChoiceOptions

func (*ToolChoiceParam) MergeToolChoiceTypes

func (t *ToolChoiceParam) MergeToolChoiceTypes(v ToolChoiceTypes) error

MergeToolChoiceTypes performs a merge with any union data inside the ToolChoiceParam, using the provided ToolChoiceTypes

func (*ToolChoiceParam) UnmarshalJSON

func (t *ToolChoiceParam) UnmarshalJSON(b []byte) error

type ToolChoiceTypes

type ToolChoiceTypes struct {
	// Type The type of hosted tool the model should to use. Learn more about
	// [built-in tools](/docs/guides/tools).
	//
	// Allowed values are:
	// - `file_search`
	// - `web_search_preview`
	// - `computer`
	// - `computer_use_preview`
	// - `computer_use`
	// - `code_interpreter`
	// - `image_generation`
	Type ToolChoiceTypesType `json:"type"`
}

ToolChoiceTypes Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools).

type ToolChoiceTypesType

type ToolChoiceTypesType string

ToolChoiceTypesType The type of hosted tool the model should to use. Learn more about [built-in tools](/docs/guides/tools).

Allowed values are: - `file_search` - `web_search_preview` - `computer` - `computer_use_preview` - `computer_use` - `code_interpreter` - `image_generation`

const (
	ToolChoiceTypesTypeCodeInterpreter          ToolChoiceTypesType = "code_interpreter"
	ToolChoiceTypesTypeComputer                 ToolChoiceTypesType = "computer"
	ToolChoiceTypesTypeComputerUse              ToolChoiceTypesType = "computer_use"
	ToolChoiceTypesTypeComputerUsePreview       ToolChoiceTypesType = "computer_use_preview"
	ToolChoiceTypesTypeFileSearch               ToolChoiceTypesType = "file_search"
	ToolChoiceTypesTypeImageGeneration          ToolChoiceTypesType = "image_generation"
	ToolChoiceTypesTypeWebSearchPreview         ToolChoiceTypesType = "web_search_preview"
	ToolChoiceTypesTypeWebSearchPreview20250311 ToolChoiceTypesType = "web_search_preview_2025_03_11"
)

Defines values for ToolChoiceTypesType.

func (ToolChoiceTypesType) Valid

func (e ToolChoiceTypesType) Valid() bool

Valid indicates whether the value is a known member of the ToolChoiceTypesType enum.

type ToolSearchCall

type ToolSearchCall struct {
	// Arguments Arguments used for the tool search call.
	Arguments interface{} `json:"arguments"`
	CallId    *string     `json:"call_id"`

	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// Execution Whether tool search was executed by the server or by the client.
	Execution ToolSearchExecutionType `json:"execution"`

	// Id The unique ID of the tool search call item.
	Id string `json:"id"`

	// Status The status of the tool search call item that was recorded.
	Status FunctionCallStatus `json:"status"`

	// Type The type of the item. Always `tool_search_call`.
	Type ToolSearchCallType `json:"type"`
}

ToolSearchCall defines model for ToolSearchCall.

type ToolSearchCallItemParam

type ToolSearchCallItemParam struct {
	// Arguments The arguments supplied to the tool search call.
	Arguments EmptyModelParam `json:"arguments"`
	CallId    *string         `json:"call_id,omitempty"`

	// Execution Whether tool search was executed by the server or by the client.
	Execution *ToolSearchExecutionType `json:"execution,omitempty"`
	Id        *string                  `json:"id,omitempty"`
	Status    *FunctionCallItemStatus  `json:"status,omitempty"`

	// Type The item type. Always `tool_search_call`.
	Type ToolSearchCallItemParamType `json:"type"`
}

ToolSearchCallItemParam defines model for ToolSearchCallItemParam.

type ToolSearchCallItemParamType

type ToolSearchCallItemParamType string

ToolSearchCallItemParamType The item type. Always `tool_search_call`.

const (
	ToolSearchCallItemParamTypeToolSearchCall ToolSearchCallItemParamType = "tool_search_call"
)

Defines values for ToolSearchCallItemParamType.

func (ToolSearchCallItemParamType) Valid

Valid indicates whether the value is a known member of the ToolSearchCallItemParamType enum.

type ToolSearchCallType

type ToolSearchCallType string

ToolSearchCallType The type of the item. Always `tool_search_call`.

const (
	ToolSearchCallTypeToolSearchCall ToolSearchCallType = "tool_search_call"
)

Defines values for ToolSearchCallType.

func (ToolSearchCallType) Valid

func (e ToolSearchCallType) Valid() bool

Valid indicates whether the value is a known member of the ToolSearchCallType enum.

type ToolSearchExecutionType

type ToolSearchExecutionType string

ToolSearchExecutionType defines model for ToolSearchExecutionType.

const (
	Client ToolSearchExecutionType = "client"
	Server ToolSearchExecutionType = "server"
)

Defines values for ToolSearchExecutionType.

func (ToolSearchExecutionType) Valid

func (e ToolSearchExecutionType) Valid() bool

Valid indicates whether the value is a known member of the ToolSearchExecutionType enum.

type ToolSearchOutput

type ToolSearchOutput struct {
	CallId *string `json:"call_id"`

	// CreatedBy The identifier of the actor that created the item.
	CreatedBy *string `json:"created_by,omitempty"`

	// Execution Whether tool search was executed by the server or by the client.
	Execution ToolSearchExecutionType `json:"execution"`

	// Id The unique ID of the tool search output item.
	Id string `json:"id"`

	// Status The status of the tool search output item that was recorded.
	Status FunctionCallOutputStatusEnum `json:"status"`

	// Tools The loaded tool definitions returned by tool search.
	Tools []Tool `json:"tools"`

	// Type The type of the item. Always `tool_search_output`.
	Type ToolSearchOutputType `json:"type"`
}

ToolSearchOutput defines model for ToolSearchOutput.

type ToolSearchOutputItemParam

type ToolSearchOutputItemParam struct {
	CallId *string `json:"call_id,omitempty"`

	// Execution Whether tool search was executed by the server or by the client.
	Execution *ToolSearchExecutionType `json:"execution,omitempty"`
	Id        *string                  `json:"id,omitempty"`
	Status    *FunctionCallItemStatus  `json:"status,omitempty"`

	// Tools The loaded tool definitions returned by the tool search output.
	Tools []Tool `json:"tools"`

	// Type The item type. Always `tool_search_output`.
	Type ToolSearchOutputItemParamType `json:"type"`
}

ToolSearchOutputItemParam defines model for ToolSearchOutputItemParam.

type ToolSearchOutputItemParamType

type ToolSearchOutputItemParamType string

ToolSearchOutputItemParamType The item type. Always `tool_search_output`.

const (
	ToolSearchOutputItemParamTypeToolSearchOutput ToolSearchOutputItemParamType = "tool_search_output"
)

Defines values for ToolSearchOutputItemParamType.

func (ToolSearchOutputItemParamType) Valid

Valid indicates whether the value is a known member of the ToolSearchOutputItemParamType enum.

type ToolSearchOutputType

type ToolSearchOutputType string

ToolSearchOutputType The type of the item. Always `tool_search_output`.

const (
	ToolSearchOutputTypeToolSearchOutput ToolSearchOutputType = "tool_search_output"
)

Defines values for ToolSearchOutputType.

func (ToolSearchOutputType) Valid

func (e ToolSearchOutputType) Valid() bool

Valid indicates whether the value is a known member of the ToolSearchOutputType enum.

type ToolSearchToolParam

type ToolSearchToolParam struct {
	Description *string `json:"description,omitempty"`

	// Execution Whether tool search is executed by the server or by the client.
	Execution  *ToolSearchExecutionType `json:"execution,omitempty"`
	Parameters *EmptyModelParam         `json:"parameters,omitempty"`

	// Type The type of the tool. Always `tool_search`.
	Type ToolSearchToolParamType `json:"type"`
}

ToolSearchToolParam Hosted or BYOT tool search configuration for deferred tools.

type ToolSearchToolParamType

type ToolSearchToolParamType string

ToolSearchToolParamType The type of the tool. Always `tool_search`.

const (
	ToolSearch ToolSearchToolParamType = "tool_search"
)

Defines values for ToolSearchToolParamType.

func (ToolSearchToolParamType) Valid

func (e ToolSearchToolParamType) Valid() bool

Valid indicates whether the value is a known member of the ToolSearchToolParamType enum.

type ToolsArray

type ToolsArray = []Tool

ToolsArray An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter.

We support the following categories of tools:

  • **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like [web search](/docs/guides/tools-web-search) or [file search](/docs/guides/tools-file-search). Learn more about [built-in tools](/docs/guides/tools).
  • **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about [MCP Tools](/docs/guides/tools-connectors-mcp).
  • **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code.

type TopLogProb

type TopLogProb struct {
	Bytes   []int   `json:"bytes"`
	Logprob float32 `json:"logprob"`
	Token   string  `json:"token"`
}

TopLogProb The top log probability of a token.

type TypeParam

type TypeParam struct {
	// Text The text to type.
	Text string `json:"text"`

	// Type Specifies the event type. For a type action, this property is always set to `type`.
	Type TypeParamType `json:"type"`
}

TypeParam An action to type in text.

type TypeParamType

type TypeParamType string

TypeParamType Specifies the event type. For a type action, this property is always set to `type`.

const (
	Type TypeParamType = "type"
)

Defines values for TypeParamType.

func (TypeParamType) Valid

func (e TypeParamType) Valid() bool

Valid indicates whether the value is a known member of the TypeParamType enum.

type UrlCitationBody

type UrlCitationBody struct {
	// EndIndex The index of the last character of the URL citation in the message.
	EndIndex int `json:"end_index"`

	// StartIndex The index of the first character of the URL citation in the message.
	StartIndex int `json:"start_index"`

	// Title The title of the web resource.
	Title string `json:"title"`

	// Type The type of the URL citation. Always `url_citation`.
	Type UrlCitationBodyType `json:"type"`

	// Url The URL of the web resource.
	Url string `json:"url"`
}

UrlCitationBody A citation for a web resource used to generate a model response.

type UrlCitationBodyType

type UrlCitationBodyType string

UrlCitationBodyType The type of the URL citation. Always `url_citation`.

const (
	UrlCitation UrlCitationBodyType = "url_citation"
)

Defines values for UrlCitationBodyType.

func (UrlCitationBodyType) Valid

func (e UrlCitationBodyType) Valid() bool

Valid indicates whether the value is a known member of the UrlCitationBodyType enum.

type VectorStoreFileAttributes

type VectorStoreFileAttributes map[string]VectorStoreFileAttributes_AdditionalProperties

VectorStoreFileAttributes defines model for VectorStoreFileAttributes.

type VectorStoreFileAttributes0

type VectorStoreFileAttributes0 = string

VectorStoreFileAttributes0 defines model for VectorStoreFileAttributes.0.

type VectorStoreFileAttributes1

type VectorStoreFileAttributes1 = float32

VectorStoreFileAttributes1 defines model for VectorStoreFileAttributes.1.

type VectorStoreFileAttributes2

type VectorStoreFileAttributes2 = bool

VectorStoreFileAttributes2 defines model for VectorStoreFileAttributes.2.

type VectorStoreFileAttributes_AdditionalProperties

type VectorStoreFileAttributes_AdditionalProperties struct {
	// contains filtered or unexported fields
}

VectorStoreFileAttributes_AdditionalProperties defines model for VectorStoreFileAttributes.AdditionalProperties.

func (VectorStoreFileAttributes_AdditionalProperties) AsVectorStoreFileAttributes0

AsVectorStoreFileAttributes0 returns the union data inside the VectorStoreFileAttributes_AdditionalProperties as a VectorStoreFileAttributes0

func (VectorStoreFileAttributes_AdditionalProperties) AsVectorStoreFileAttributes1

AsVectorStoreFileAttributes1 returns the union data inside the VectorStoreFileAttributes_AdditionalProperties as a VectorStoreFileAttributes1

func (VectorStoreFileAttributes_AdditionalProperties) AsVectorStoreFileAttributes2

AsVectorStoreFileAttributes2 returns the union data inside the VectorStoreFileAttributes_AdditionalProperties as a VectorStoreFileAttributes2

func (*VectorStoreFileAttributes_AdditionalProperties) FromVectorStoreFileAttributes0

FromVectorStoreFileAttributes0 overwrites any union data inside the VectorStoreFileAttributes_AdditionalProperties as the provided VectorStoreFileAttributes0

func (*VectorStoreFileAttributes_AdditionalProperties) FromVectorStoreFileAttributes1

FromVectorStoreFileAttributes1 overwrites any union data inside the VectorStoreFileAttributes_AdditionalProperties as the provided VectorStoreFileAttributes1

func (*VectorStoreFileAttributes_AdditionalProperties) FromVectorStoreFileAttributes2

FromVectorStoreFileAttributes2 overwrites any union data inside the VectorStoreFileAttributes_AdditionalProperties as the provided VectorStoreFileAttributes2

func (VectorStoreFileAttributes_AdditionalProperties) MarshalJSON

func (*VectorStoreFileAttributes_AdditionalProperties) MergeVectorStoreFileAttributes0

MergeVectorStoreFileAttributes0 performs a merge with any union data inside the VectorStoreFileAttributes_AdditionalProperties, using the provided VectorStoreFileAttributes0

func (*VectorStoreFileAttributes_AdditionalProperties) MergeVectorStoreFileAttributes1

MergeVectorStoreFileAttributes1 performs a merge with any union data inside the VectorStoreFileAttributes_AdditionalProperties, using the provided VectorStoreFileAttributes1

func (*VectorStoreFileAttributes_AdditionalProperties) MergeVectorStoreFileAttributes2

MergeVectorStoreFileAttributes2 performs a merge with any union data inside the VectorStoreFileAttributes_AdditionalProperties, using the provided VectorStoreFileAttributes2

func (*VectorStoreFileAttributes_AdditionalProperties) UnmarshalJSON

type Verbosity

type Verbosity string

Verbosity defines model for Verbosity.

type WaitParam

type WaitParam struct {
	// Type Specifies the event type. For a wait action, this property is always set to `wait`.
	Type WaitParamType `json:"type"`
}

WaitParam A wait action.

type WaitParamType

type WaitParamType string

WaitParamType Specifies the event type. For a wait action, this property is always set to `wait`.

const (
	Wait WaitParamType = "wait"
)

Defines values for WaitParamType.

func (WaitParamType) Valid

func (e WaitParamType) Valid() bool

Valid indicates whether the value is a known member of the WaitParamType enum.

type WebSearchActionFind

type WebSearchActionFind struct {
	// Pattern The pattern or text to search for within the page.
	Pattern string `json:"pattern"`

	// Type The action type.
	Type WebSearchActionFindType `json:"type"`

	// Url The URL of the page searched for the pattern.
	Url string `json:"url"`
}

WebSearchActionFind Action type "find_in_page": Searches for a pattern within a loaded page.

type WebSearchActionFindType

type WebSearchActionFindType string

WebSearchActionFindType The action type.

const (
	FindInPage WebSearchActionFindType = "find_in_page"
)

Defines values for WebSearchActionFindType.

func (WebSearchActionFindType) Valid

func (e WebSearchActionFindType) Valid() bool

Valid indicates whether the value is a known member of the WebSearchActionFindType enum.

type WebSearchActionOpenPage

type WebSearchActionOpenPage struct {
	// Type The action type.
	Type WebSearchActionOpenPageType `json:"type"`

	// Url The URL opened by the model.
	Url *string `json:"url,omitempty"`
}

WebSearchActionOpenPage Action type "open_page" - Opens a specific URL from search results.

type WebSearchActionOpenPageType

type WebSearchActionOpenPageType string

WebSearchActionOpenPageType The action type.

const (
	OpenPage WebSearchActionOpenPageType = "open_page"
)

Defines values for WebSearchActionOpenPageType.

func (WebSearchActionOpenPageType) Valid

Valid indicates whether the value is a known member of the WebSearchActionOpenPageType enum.

type WebSearchActionSearch

type WebSearchActionSearch struct {
	// Queries The search queries.
	Queries *[]string `json:"queries,omitempty"`

	// Query The search query.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Query *string `json:"query,omitempty"`

	// Sources The sources used in the search.
	Sources *[]struct {
		// Type The type of source. Always `url`.
		Type WebSearchActionSearchSourcesType `json:"type"`

		// Url The URL of the source.
		Url string `json:"url"`
	} `json:"sources,omitempty"`

	// Type The action type.
	Type WebSearchActionSearchType `json:"type"`
}

WebSearchActionSearch Action type "search" - Performs a web search query.

type WebSearchActionSearchSourcesType

type WebSearchActionSearchSourcesType string

WebSearchActionSearchSourcesType The type of source. Always `url`.

const (
	Url WebSearchActionSearchSourcesType = "url"
)

Defines values for WebSearchActionSearchSourcesType.

func (WebSearchActionSearchSourcesType) Valid

Valid indicates whether the value is a known member of the WebSearchActionSearchSourcesType enum.

type WebSearchActionSearchType

type WebSearchActionSearchType string

WebSearchActionSearchType The action type.

const (
	Search WebSearchActionSearchType = "search"
)

Defines values for WebSearchActionSearchType.

func (WebSearchActionSearchType) Valid

func (e WebSearchActionSearchType) Valid() bool

Valid indicates whether the value is a known member of the WebSearchActionSearchType enum.

type WebSearchApproximateLocation

type WebSearchApproximateLocation struct {
	City     *string `json:"city,omitempty"`
	Country  *string `json:"country,omitempty"`
	Region   *string `json:"region,omitempty"`
	Timezone *string `json:"timezone,omitempty"`

	// Type The type of location approximation. Always `approximate`.
	Type *WebSearchApproximateLocationType `json:"type,omitempty"`
}

WebSearchApproximateLocation defines model for WebSearchApproximateLocation.

type WebSearchApproximateLocationType

type WebSearchApproximateLocationType string

WebSearchApproximateLocationType The type of location approximation. Always `approximate`.

const (
	WebSearchApproximateLocationTypeApproximate WebSearchApproximateLocationType = "approximate"
)

Defines values for WebSearchApproximateLocationType.

func (WebSearchApproximateLocationType) Valid

Valid indicates whether the value is a known member of the WebSearchApproximateLocationType enum.

type WebSearchPreviewTool

type WebSearchPreviewTool struct {
	SearchContentTypes *[]SearchContentType `json:"search_content_types,omitempty"`

	// SearchContextSize High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
	SearchContextSize *SearchContextSize `json:"search_context_size,omitempty"`

	// Type The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
	Type         WebSearchPreviewToolType `json:"type"`
	UserLocation *ApproximateLocation     `json:"user_location,omitempty"`
}

WebSearchPreviewTool This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

type WebSearchPreviewToolType

type WebSearchPreviewToolType string

WebSearchPreviewToolType The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

const (
	WebSearchPreviewToolTypeWebSearchPreview         WebSearchPreviewToolType = "web_search_preview"
	WebSearchPreviewToolTypeWebSearchPreview20250311 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
)

Defines values for WebSearchPreviewToolType.

func (WebSearchPreviewToolType) Valid

func (e WebSearchPreviewToolType) Valid() bool

Valid indicates whether the value is a known member of the WebSearchPreviewToolType enum.

type WebSearchTool

type WebSearchTool struct {
	Filters *struct {
		AllowedDomains *[]string `json:"allowed_domains,omitempty"`
	} `json:"filters,omitempty"`

	// SearchContextSize High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
	SearchContextSize *WebSearchToolSearchContextSize `json:"search_context_size,omitempty"`

	// Type The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
	Type         WebSearchToolType             `json:"type"`
	UserLocation *WebSearchApproximateLocation `json:"user_location,omitempty"`
}

WebSearchTool Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search).

type WebSearchToolCall

type WebSearchToolCall struct {
	// Action An object describing the specific action taken in this web search call.
	// Includes details on how the model used the web (search, open_page, find_in_page).
	Action WebSearchToolCall_Action `json:"action"`

	// Id The unique ID of the web search tool call.
	Id string `json:"id"`

	// Status The status of the web search tool call.
	Status WebSearchToolCallStatus `json:"status"`

	// Type The type of the web search tool call. Always `web_search_call`.
	Type WebSearchToolCallType `json:"type"`
}

WebSearchToolCall The results of a web search tool call. See the [web search guide](/docs/guides/tools-web-search) for more information.

type WebSearchToolCallStatus

type WebSearchToolCallStatus string

WebSearchToolCallStatus The status of the web search tool call.

const (
	WebSearchToolCallStatusCompleted  WebSearchToolCallStatus = "completed"
	WebSearchToolCallStatusFailed     WebSearchToolCallStatus = "failed"
	WebSearchToolCallStatusInProgress WebSearchToolCallStatus = "in_progress"
	WebSearchToolCallStatusSearching  WebSearchToolCallStatus = "searching"
)

Defines values for WebSearchToolCallStatus.

func (WebSearchToolCallStatus) Valid

func (e WebSearchToolCallStatus) Valid() bool

Valid indicates whether the value is a known member of the WebSearchToolCallStatus enum.

type WebSearchToolCallType

type WebSearchToolCallType string

WebSearchToolCallType The type of the web search tool call. Always `web_search_call`.

const (
	WebSearchCall WebSearchToolCallType = "web_search_call"
)

Defines values for WebSearchToolCallType.

func (WebSearchToolCallType) Valid

func (e WebSearchToolCallType) Valid() bool

Valid indicates whether the value is a known member of the WebSearchToolCallType enum.

type WebSearchToolCall_Action

type WebSearchToolCall_Action struct {
	// contains filtered or unexported fields
}

WebSearchToolCall_Action An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page).

func (WebSearchToolCall_Action) AsWebSearchActionFind

func (t WebSearchToolCall_Action) AsWebSearchActionFind() (WebSearchActionFind, error)

AsWebSearchActionFind returns the union data inside the WebSearchToolCall_Action as a WebSearchActionFind

func (WebSearchToolCall_Action) AsWebSearchActionOpenPage

func (t WebSearchToolCall_Action) AsWebSearchActionOpenPage() (WebSearchActionOpenPage, error)

AsWebSearchActionOpenPage returns the union data inside the WebSearchToolCall_Action as a WebSearchActionOpenPage

func (WebSearchToolCall_Action) AsWebSearchActionSearch

func (t WebSearchToolCall_Action) AsWebSearchActionSearch() (WebSearchActionSearch, error)

AsWebSearchActionSearch returns the union data inside the WebSearchToolCall_Action as a WebSearchActionSearch

func (WebSearchToolCall_Action) Discriminator

func (t WebSearchToolCall_Action) Discriminator() (string, error)

func (*WebSearchToolCall_Action) FromWebSearchActionFind

func (t *WebSearchToolCall_Action) FromWebSearchActionFind(v WebSearchActionFind) error

FromWebSearchActionFind overwrites any union data inside the WebSearchToolCall_Action as the provided WebSearchActionFind

func (*WebSearchToolCall_Action) FromWebSearchActionOpenPage

func (t *WebSearchToolCall_Action) FromWebSearchActionOpenPage(v WebSearchActionOpenPage) error

FromWebSearchActionOpenPage overwrites any union data inside the WebSearchToolCall_Action as the provided WebSearchActionOpenPage

func (*WebSearchToolCall_Action) FromWebSearchActionSearch

func (t *WebSearchToolCall_Action) FromWebSearchActionSearch(v WebSearchActionSearch) error

FromWebSearchActionSearch overwrites any union data inside the WebSearchToolCall_Action as the provided WebSearchActionSearch

func (WebSearchToolCall_Action) MarshalJSON

func (t WebSearchToolCall_Action) MarshalJSON() ([]byte, error)

func (*WebSearchToolCall_Action) MergeWebSearchActionFind

func (t *WebSearchToolCall_Action) MergeWebSearchActionFind(v WebSearchActionFind) error

MergeWebSearchActionFind performs a merge with any union data inside the WebSearchToolCall_Action, using the provided WebSearchActionFind

func (*WebSearchToolCall_Action) MergeWebSearchActionOpenPage

func (t *WebSearchToolCall_Action) MergeWebSearchActionOpenPage(v WebSearchActionOpenPage) error

MergeWebSearchActionOpenPage performs a merge with any union data inside the WebSearchToolCall_Action, using the provided WebSearchActionOpenPage

func (*WebSearchToolCall_Action) MergeWebSearchActionSearch

func (t *WebSearchToolCall_Action) MergeWebSearchActionSearch(v WebSearchActionSearch) error

MergeWebSearchActionSearch performs a merge with any union data inside the WebSearchToolCall_Action, using the provided WebSearchActionSearch

func (*WebSearchToolCall_Action) UnmarshalJSON

func (t *WebSearchToolCall_Action) UnmarshalJSON(b []byte) error

func (WebSearchToolCall_Action) ValueByDiscriminator

func (t WebSearchToolCall_Action) ValueByDiscriminator() (interface{}, error)

type WebSearchToolSearchContextSize

type WebSearchToolSearchContextSize string

WebSearchToolSearchContextSize High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

const (
	WebSearchToolSearchContextSizeHigh   WebSearchToolSearchContextSize = "high"
	WebSearchToolSearchContextSizeLow    WebSearchToolSearchContextSize = "low"
	WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
)

Defines values for WebSearchToolSearchContextSize.

func (WebSearchToolSearchContextSize) Valid

Valid indicates whether the value is a known member of the WebSearchToolSearchContextSize enum.

type WebSearchToolType

type WebSearchToolType string

WebSearchToolType The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

const (
	WebSearch         WebSearchToolType = "web_search"
	WebSearch20250826 WebSearchToolType = "web_search_2025_08_26"
)

Defines values for WebSearchToolType.

func (WebSearchToolType) Valid

func (e WebSearchToolType) Valid() bool

Valid indicates whether the value is a known member of the WebSearchToolType enum.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL