conversations

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ChatModelChatgpt4oLatest = shared.ChatModelChatgpt4oLatest

Equals "chatgpt-4o-latest"

View Source
const ChatModelCodexMiniLatest = shared.ChatModelCodexMiniLatest

Equals "codex-mini-latest"

View Source
const ChatModelGPT3_5Turbo = shared.ChatModelGPT3_5Turbo

Equals "gpt-3.5-turbo"

View Source
const ChatModelGPT3_5Turbo0125 = shared.ChatModelGPT3_5Turbo0125

Equals "gpt-3.5-turbo-0125"

View Source
const ChatModelGPT3_5Turbo0301 = shared.ChatModelGPT3_5Turbo0301

Equals "gpt-3.5-turbo-0301"

View Source
const ChatModelGPT3_5Turbo0613 = shared.ChatModelGPT3_5Turbo0613

Equals "gpt-3.5-turbo-0613"

View Source
const ChatModelGPT3_5Turbo1106 = shared.ChatModelGPT3_5Turbo1106

Equals "gpt-3.5-turbo-1106"

View Source
const ChatModelGPT3_5Turbo16k = shared.ChatModelGPT3_5Turbo16k

Equals "gpt-3.5-turbo-16k"

View Source
const ChatModelGPT3_5Turbo16k0613 = shared.ChatModelGPT3_5Turbo16k0613

Equals "gpt-3.5-turbo-16k-0613"

View Source
const ChatModelGPT4 = shared.ChatModelGPT4

Equals "gpt-4"

View Source
const ChatModelGPT4Turbo = shared.ChatModelGPT4Turbo

Equals "gpt-4-turbo"

View Source
const ChatModelGPT4Turbo2024_04_09 = shared.ChatModelGPT4Turbo2024_04_09

Equals "gpt-4-turbo-2024-04-09"

View Source
const ChatModelGPT4TurboPreview = shared.ChatModelGPT4TurboPreview

Equals "gpt-4-turbo-preview"

View Source
const ChatModelGPT4VisionPreview = shared.ChatModelGPT4VisionPreview

Equals "gpt-4-vision-preview"

View Source
const ChatModelGPT4_0125Preview = shared.ChatModelGPT4_0125Preview

Equals "gpt-4-0125-preview"

View Source
const ChatModelGPT4_0314 = shared.ChatModelGPT4_0314

Equals "gpt-4-0314"

View Source
const ChatModelGPT4_0613 = shared.ChatModelGPT4_0613

Equals "gpt-4-0613"

View Source
const ChatModelGPT4_1 = shared.ChatModelGPT4_1

Equals "gpt-4.1"

View Source
const ChatModelGPT4_1106Preview = shared.ChatModelGPT4_1106Preview

Equals "gpt-4-1106-preview"

View Source
const ChatModelGPT4_1Mini = shared.ChatModelGPT4_1Mini

Equals "gpt-4.1-mini"

View Source
const ChatModelGPT4_1Mini2025_04_14 = shared.ChatModelGPT4_1Mini2025_04_14

Equals "gpt-4.1-mini-2025-04-14"

View Source
const ChatModelGPT4_1Nano = shared.ChatModelGPT4_1Nano

Equals "gpt-4.1-nano"

View Source
const ChatModelGPT4_1Nano2025_04_14 = shared.ChatModelGPT4_1Nano2025_04_14

Equals "gpt-4.1-nano-2025-04-14"

View Source
const ChatModelGPT4_1_2025_04_14 = shared.ChatModelGPT4_1_2025_04_14

Equals "gpt-4.1-2025-04-14"

View Source
const ChatModelGPT4_32k = shared.ChatModelGPT4_32k

Equals "gpt-4-32k"

View Source
const ChatModelGPT4_32k0314 = shared.ChatModelGPT4_32k0314

Equals "gpt-4-32k-0314"

View Source
const ChatModelGPT4_32k0613 = shared.ChatModelGPT4_32k0613

Equals "gpt-4-32k-0613"

View Source
const ChatModelGPT4o = shared.ChatModelGPT4o

Equals "gpt-4o"

View Source
const ChatModelGPT4o2024_05_13 = shared.ChatModelGPT4o2024_05_13

Equals "gpt-4o-2024-05-13"

View Source
const ChatModelGPT4o2024_08_06 = shared.ChatModelGPT4o2024_08_06

Equals "gpt-4o-2024-08-06"

View Source
const ChatModelGPT4o2024_11_20 = shared.ChatModelGPT4o2024_11_20

Equals "gpt-4o-2024-11-20"

View Source
const ChatModelGPT4oAudioPreview = shared.ChatModelGPT4oAudioPreview

Equals "gpt-4o-audio-preview"

View Source
const ChatModelGPT4oAudioPreview2024_10_01 = shared.ChatModelGPT4oAudioPreview2024_10_01

Equals "gpt-4o-audio-preview-2024-10-01"

View Source
const ChatModelGPT4oAudioPreview2024_12_17 = shared.ChatModelGPT4oAudioPreview2024_12_17

Equals "gpt-4o-audio-preview-2024-12-17"

View Source
const ChatModelGPT4oAudioPreview2025_06_03 = shared.ChatModelGPT4oAudioPreview2025_06_03

Equals "gpt-4o-audio-preview-2025-06-03"

View Source
const ChatModelGPT4oMini = shared.ChatModelGPT4oMini

Equals "gpt-4o-mini"

View Source
const ChatModelGPT4oMini2024_07_18 = shared.ChatModelGPT4oMini2024_07_18

Equals "gpt-4o-mini-2024-07-18"

View Source
const ChatModelGPT4oMiniAudioPreview = shared.ChatModelGPT4oMiniAudioPreview

Equals "gpt-4o-mini-audio-preview"

View Source
const ChatModelGPT4oMiniAudioPreview2024_12_17 = shared.ChatModelGPT4oMiniAudioPreview2024_12_17

Equals "gpt-4o-mini-audio-preview-2024-12-17"

View Source
const ChatModelGPT4oMiniSearchPreview = shared.ChatModelGPT4oMiniSearchPreview

Equals "gpt-4o-mini-search-preview"

View Source
const ChatModelGPT4oMiniSearchPreview2025_03_11 = shared.ChatModelGPT4oMiniSearchPreview2025_03_11

Equals "gpt-4o-mini-search-preview-2025-03-11"

View Source
const ChatModelGPT4oSearchPreview = shared.ChatModelGPT4oSearchPreview

Equals "gpt-4o-search-preview"

View Source
const ChatModelGPT4oSearchPreview2025_03_11 = shared.ChatModelGPT4oSearchPreview2025_03_11

Equals "gpt-4o-search-preview-2025-03-11"

View Source
const ChatModelGPT5 = shared.ChatModelGPT5

Equals "gpt-5"

View Source
const ChatModelGPT5ChatLatest = shared.ChatModelGPT5ChatLatest

Equals "gpt-5-chat-latest"

View Source
const ChatModelGPT5Mini = shared.ChatModelGPT5Mini

Equals "gpt-5-mini"

View Source
const ChatModelGPT5Mini2025_08_07 = shared.ChatModelGPT5Mini2025_08_07

Equals "gpt-5-mini-2025-08-07"

View Source
const ChatModelGPT5Nano = shared.ChatModelGPT5Nano

Equals "gpt-5-nano"

View Source
const ChatModelGPT5Nano2025_08_07 = shared.ChatModelGPT5Nano2025_08_07

Equals "gpt-5-nano-2025-08-07"

View Source
const ChatModelGPT5_2025_08_07 = shared.ChatModelGPT5_2025_08_07

Equals "gpt-5-2025-08-07"

View Source
const ChatModelO1 = shared.ChatModelO1

Equals "o1"

View Source
const ChatModelO1Mini = shared.ChatModelO1Mini

Equals "o1-mini"

View Source
const ChatModelO1Mini2024_09_12 = shared.ChatModelO1Mini2024_09_12

Equals "o1-mini-2024-09-12"

View Source
const ChatModelO1Preview = shared.ChatModelO1Preview

Equals "o1-preview"

View Source
const ChatModelO1Preview2024_09_12 = shared.ChatModelO1Preview2024_09_12

Equals "o1-preview-2024-09-12"

View Source
const ChatModelO1_2024_12_17 = shared.ChatModelO1_2024_12_17

Equals "o1-2024-12-17"

View Source
const ChatModelO3 = shared.ChatModelO3

Equals "o3"

View Source
const ChatModelO3Mini = shared.ChatModelO3Mini

Equals "o3-mini"

View Source
const ChatModelO3Mini2025_01_31 = shared.ChatModelO3Mini2025_01_31

Equals "o3-mini-2025-01-31"

View Source
const ChatModelO3_2025_04_16 = shared.ChatModelO3_2025_04_16

Equals "o3-2025-04-16"

View Source
const ChatModelO4Mini = shared.ChatModelO4Mini

Equals "o4-mini"

View Source
const ChatModelO4Mini2025_04_16 = shared.ChatModelO4Mini2025_04_16

Equals "o4-mini-2025-04-16"

View Source
const ComparisonFilterTypeEq = shared.ComparisonFilterTypeEq

Equals "eq"

View Source
const ComparisonFilterTypeGt = shared.ComparisonFilterTypeGt

Equals "gt"

View Source
const ComparisonFilterTypeGte = shared.ComparisonFilterTypeGte

Equals "gte"

View Source
const ComparisonFilterTypeLt = shared.ComparisonFilterTypeLt

Equals "lt"

View Source
const ComparisonFilterTypeLte = shared.ComparisonFilterTypeLte

Equals "lte"

View Source
const ComparisonFilterTypeNe = shared.ComparisonFilterTypeNe

Equals "ne"

View Source
const CompoundFilterTypeAnd = shared.CompoundFilterTypeAnd

Equals "and"

View Source
const CompoundFilterTypeOr = shared.CompoundFilterTypeOr

Equals "or"

View Source
const ReasoningEffortHigh = shared.ReasoningEffortHigh

Equals "high"

View Source
const ReasoningEffortLow = shared.ReasoningEffortLow

Equals "low"

View Source
const ReasoningEffortMedium = shared.ReasoningEffortMedium

Equals "medium"

View Source
const ReasoningEffortMinimal = shared.ReasoningEffortMinimal

Equals "minimal"

View Source
const ReasoningGenerateSummaryAuto = shared.ReasoningGenerateSummaryAuto

Equals "auto"

View Source
const ReasoningGenerateSummaryConcise = shared.ReasoningGenerateSummaryConcise

Equals "concise"

View Source
const ReasoningGenerateSummaryDetailed = shared.ReasoningGenerateSummaryDetailed

Equals "detailed"

View Source
const ReasoningSummaryAuto = shared.ReasoningSummaryAuto

Equals "auto"

View Source
const ReasoningSummaryConcise = shared.ReasoningSummaryConcise

Equals "concise"

View Source
const ReasoningSummaryDetailed = shared.ReasoningSummaryDetailed

Equals "detailed"

View Source
const ResponsesModelComputerUsePreview = shared.ResponsesModelComputerUsePreview

Equals "computer-use-preview"

View Source
const ResponsesModelComputerUsePreview2025_03_11 = shared.ResponsesModelComputerUsePreview2025_03_11

Equals "computer-use-preview-2025-03-11"

View Source
const ResponsesModelO1Pro = shared.ResponsesModelO1Pro

Equals "o1-pro"

View Source
const ResponsesModelO1Pro2025_03_19 = shared.ResponsesModelO1Pro2025_03_19

Equals "o1-pro-2025-03-19"

View Source
const ResponsesModelO3DeepResearch = shared.ResponsesModelO3DeepResearch

Equals "o3-deep-research"

View Source
const ResponsesModelO3DeepResearch2025_06_26 = shared.ResponsesModelO3DeepResearch2025_06_26

Equals "o3-deep-research-2025-06-26"

View Source
const ResponsesModelO3Pro = shared.ResponsesModelO3Pro

Equals "o3-pro"

View Source
const ResponsesModelO3Pro2025_06_10 = shared.ResponsesModelO3Pro2025_06_10

Equals "o3-pro-2025-06-10"

View Source
const ResponsesModelO4MiniDeepResearch = shared.ResponsesModelO4MiniDeepResearch

Equals "o4-mini-deep-research"

View Source
const ResponsesModelO4MiniDeepResearch2025_06_26 = shared.ResponsesModelO4MiniDeepResearch2025_06_26

Equals "o4-mini-deep-research-2025-06-26"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatModel

type ChatModel = shared.ChatModel

This is an alias to an internal type.

type ComparisonFilter

type ComparisonFilter = shared.ComparisonFilter

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

This is an alias to an internal type.

type ComparisonFilterParam

type ComparisonFilterParam = shared.ComparisonFilterParam

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

This is an alias to an internal type.

type ComparisonFilterType

type ComparisonFilterType = shared.ComparisonFilterType

Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`.

- `eq`: equals - `ne`: not equal - `gt`: greater than - `gte`: greater than or equal - `lt`: less than - `lte`: less than or equal

This is an alias to an internal type.

type ComparisonFilterValueUnion

type ComparisonFilterValueUnion = shared.ComparisonFilterValueUnion

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

This is an alias to an internal type.

type ComparisonFilterValueUnionParam

type ComparisonFilterValueUnionParam = shared.ComparisonFilterValueUnionParam

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

This is an alias to an internal type.

type CompoundFilter

type CompoundFilter = shared.CompoundFilter

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

This is an alias to an internal type.

type CompoundFilterParam

type CompoundFilterParam = shared.CompoundFilterParam

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

This is an alias to an internal type.

type CompoundFilterType

type CompoundFilterType = shared.CompoundFilterType

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

This is an alias to an internal type.

type ComputerScreenshotContent

type ComputerScreenshotContent struct {
	// The identifier of an uploaded file that contains the screenshot.
	FileID string `json:"file_id,required"`
	// The URL of the screenshot image.
	ImageURL string `json:"image_url,required"`
	// Specifies the event type. For a computer screenshot, this property is always set
	// to `computer_screenshot`.
	Type constant.ComputerScreenshot `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileID      respjson.Field
		ImageURL    respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ComputerScreenshotContent) RawJSON

func (r ComputerScreenshotContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ComputerScreenshotContent) UnmarshalJSON

func (r *ComputerScreenshotContent) UnmarshalJSON(data []byte) error

type ContainerFileCitationBody

type ContainerFileCitationBody struct {
	// The ID of the container file.
	ContainerID string `json:"container_id,required"`
	// The index of the last character of the container file citation in the message.
	EndIndex int64 `json:"end_index,required"`
	// The ID of the file.
	FileID string `json:"file_id,required"`
	// The filename of the container file cited.
	Filename string `json:"filename,required"`
	// The index of the first character of the container file citation in the message.
	StartIndex int64 `json:"start_index,required"`
	// The type of the container file citation. Always `container_file_citation`.
	Type constant.ContainerFileCitation `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ContainerID respjson.Field
		EndIndex    respjson.Field
		FileID      respjson.Field
		Filename    respjson.Field
		StartIndex  respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerFileCitationBody) RawJSON

func (r ContainerFileCitationBody) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerFileCitationBody) UnmarshalJSON

func (r *ContainerFileCitationBody) UnmarshalJSON(data []byte) error

type Conversation

type Conversation struct {
	// The unique ID of the conversation.
	ID string `json:"id,required"`
	// The time at which the conversation was created, measured in seconds since the
	// Unix epoch.
	CreatedAt int64 `json:"created_at,required"`
	// Set of 16 key-value pairs that can be attached to an object. This can be useful
	// for storing additional information about the object in a structured format, and
	// querying for objects via API or the dashboard. Keys are strings with a maximum
	// length of 64 characters. Values are strings with a maximum length of 512
	// characters.
	Metadata any `json:"metadata,required"`
	// The object type, which is always `conversation`.
	Object constant.Conversation `json:"object,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Metadata    respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Conversation) RawJSON

func (r Conversation) RawJSON() string

Returns the unmodified JSON received from the API

func (*Conversation) UnmarshalJSON

func (r *Conversation) UnmarshalJSON(data []byte) error

type ConversationDeletedResource

type ConversationDeletedResource struct {
	ID      string                       `json:"id,required"`
	Deleted bool                         `json:"deleted,required"`
	Object  constant.ConversationDeleted `json:"object,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Deleted     respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ConversationDeletedResource) RawJSON

func (r ConversationDeletedResource) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConversationDeletedResource) UnmarshalJSON

func (r *ConversationDeletedResource) UnmarshalJSON(data []byte) error

type ConversationItemImageGenerationCall

type ConversationItemImageGenerationCall struct {
	// The unique ID of the image generation call.
	ID string `json:"id,required"`
	// The generated image encoded in base64.
	Result string `json:"result,required"`
	// The status of the image generation call.
	//
	// Any of "in_progress", "completed", "generating", "failed".
	Status string `json:"status,required"`
	// The type of the image generation call. Always `image_generation_call`.
	Type constant.ImageGenerationCall `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Result      respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An image generation request made by the model.

func (ConversationItemImageGenerationCall) ImplConversationItemUnion

func (ConversationItemImageGenerationCall) ImplConversationItemUnion()

func (ConversationItemImageGenerationCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemImageGenerationCall) UnmarshalJSON

func (r *ConversationItemImageGenerationCall) UnmarshalJSON(data []byte) error

type ConversationItemList

type ConversationItemList struct {
	// A list of conversation items.
	Data []ConversationItemUnion `json:"data,required"`
	// The ID of the first item in the list.
	FirstID string `json:"first_id,required"`
	// Whether there are more items available.
	HasMore bool `json:"has_more,required"`
	// The ID of the last item in the list.
	LastID string `json:"last_id,required"`
	// The type of object returned, must be `list`.
	Object constant.List `json:"object,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		FirstID     respjson.Field
		HasMore     respjson.Field
		LastID      respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A list of Conversation items.

func (ConversationItemList) RawJSON

func (r ConversationItemList) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConversationItemList) UnmarshalJSON

func (r *ConversationItemList) UnmarshalJSON(data []byte) error

type ConversationItemLocalShellCall

type ConversationItemLocalShellCall struct {
	// The unique ID of the local shell call.
	ID string `json:"id,required"`
	// Execute a shell command on the server.
	Action ConversationItemLocalShellCallAction `json:"action,required"`
	// The unique ID of the local shell tool call generated by the model.
	CallID string `json:"call_id,required"`
	// The status of the local shell call.
	//
	// Any of "in_progress", "completed", "incomplete".
	Status string `json:"status,required"`
	// The type of the local shell call. Always `local_shell_call`.
	Type constant.LocalShellCall `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Action      respjson.Field
		CallID      respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A tool call to run a command on the local shell.

func (ConversationItemLocalShellCall) ImplConversationItemUnion

func (ConversationItemLocalShellCall) ImplConversationItemUnion()

func (ConversationItemLocalShellCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemLocalShellCall) UnmarshalJSON

func (r *ConversationItemLocalShellCall) UnmarshalJSON(data []byte) error

type ConversationItemLocalShellCallAction

type ConversationItemLocalShellCallAction struct {
	// The command to run.
	Command []string `json:"command,required"`
	// Environment variables to set for the command.
	Env map[string]string `json:"env,required"`
	// The type of the local shell action. Always `exec`.
	Type constant.Exec `json:"type,required"`
	// Optional timeout in milliseconds for the command.
	TimeoutMs int64 `json:"timeout_ms,nullable"`
	// Optional user to run the command as.
	User string `json:"user,nullable"`
	// Optional working directory to run the command in.
	WorkingDirectory string `json:"working_directory,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Command          respjson.Field
		Env              respjson.Field
		Type             respjson.Field
		TimeoutMs        respjson.Field
		User             respjson.Field
		WorkingDirectory respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Execute a shell command on the server.

func (ConversationItemLocalShellCallAction) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemLocalShellCallAction) UnmarshalJSON

func (r *ConversationItemLocalShellCallAction) UnmarshalJSON(data []byte) error

type ConversationItemLocalShellCallOutput

type ConversationItemLocalShellCallOutput struct {
	// The unique ID of the local shell tool call generated by the model.
	ID string `json:"id,required"`
	// A JSON string of the output of the local shell tool call.
	Output string `json:"output,required"`
	// The type of the local shell tool call output. Always `local_shell_call_output`.
	Type constant.LocalShellCallOutput `json:"type,required"`
	// The status of the item. One of `in_progress`, `completed`, or `incomplete`.
	//
	// Any of "in_progress", "completed", "incomplete".
	Status string `json:"status,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Output      respjson.Field
		Type        respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The output of a local shell tool call.

func (ConversationItemLocalShellCallOutput) ImplConversationItemUnion

func (ConversationItemLocalShellCallOutput) ImplConversationItemUnion()

func (ConversationItemLocalShellCallOutput) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemLocalShellCallOutput) UnmarshalJSON

func (r *ConversationItemLocalShellCallOutput) UnmarshalJSON(data []byte) error

type ConversationItemMcpApprovalRequest

type ConversationItemMcpApprovalRequest struct {
	// The unique ID of the approval request.
	ID string `json:"id,required"`
	// A JSON string of arguments for the tool.
	Arguments string `json:"arguments,required"`
	// The name of the tool to run.
	Name string `json:"name,required"`
	// The label of the MCP server making the request.
	ServerLabel string `json:"server_label,required"`
	// The type of the item. Always `mcp_approval_request`.
	Type constant.McpApprovalRequest `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Arguments   respjson.Field
		Name        respjson.Field
		ServerLabel respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ConversationItemMcpApprovalRequest) ImplConversationItemUnion

func (ConversationItemMcpApprovalRequest) ImplConversationItemUnion()

func (ConversationItemMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemMcpApprovalRequest) UnmarshalJSON

func (r *ConversationItemMcpApprovalRequest) UnmarshalJSON(data []byte) error

type ConversationItemMcpApprovalResponse

type ConversationItemMcpApprovalResponse struct {
	// The unique ID of the approval response
	ID string `json:"id,required"`
	// The ID of the approval request being answered.
	ApprovalRequestID string `json:"approval_request_id,required"`
	// Whether the request was approved.
	Approve bool `json:"approve,required"`
	// The type of the item. Always `mcp_approval_response`.
	Type constant.McpApprovalResponse `json:"type,required"`
	// Optional reason for the decision.
	Reason string `json:"reason,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Type              respjson.Field
		Reason            respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A response to an MCP approval request.

func (ConversationItemMcpApprovalResponse) ImplConversationItemUnion

func (ConversationItemMcpApprovalResponse) ImplConversationItemUnion()

func (ConversationItemMcpApprovalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemMcpApprovalResponse) UnmarshalJSON

func (r *ConversationItemMcpApprovalResponse) UnmarshalJSON(data []byte) error

type ConversationItemMcpCall

type ConversationItemMcpCall struct {
	// The unique ID of the tool call.
	ID string `json:"id,required"`
	// A JSON string of the arguments passed to the tool.
	Arguments string `json:"arguments,required"`
	// The name of the tool that was run.
	Name string `json:"name,required"`
	// The label of the MCP server running the tool.
	ServerLabel string `json:"server_label,required"`
	// The type of the item. Always `mcp_call`.
	Type constant.McpCall `json:"type,required"`
	// The error from the tool call, if any.
	Error string `json:"error,nullable"`
	// The output from the tool call.
	Output string `json:"output,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Arguments   respjson.Field
		Name        respjson.Field
		ServerLabel respjson.Field
		Type        respjson.Field
		Error       respjson.Field
		Output      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An invocation of a tool on an MCP server.

func (ConversationItemMcpCall) ImplConversationItemUnion

func (ConversationItemMcpCall) ImplConversationItemUnion()

func (ConversationItemMcpCall) RawJSON

func (r ConversationItemMcpCall) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConversationItemMcpCall) UnmarshalJSON

func (r *ConversationItemMcpCall) UnmarshalJSON(data []byte) error

type ConversationItemMcpListTools

type ConversationItemMcpListTools struct {
	// The unique ID of the list.
	ID string `json:"id,required"`
	// The label of the MCP server.
	ServerLabel string `json:"server_label,required"`
	// The tools available on the server.
	Tools []ConversationItemMcpListToolsTool `json:"tools,required"`
	// The type of the item. Always `mcp_list_tools`.
	Type constant.McpListTools `json:"type,required"`
	// Error message if the server could not list tools.
	Error string `json:"error,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ServerLabel respjson.Field
		Tools       respjson.Field
		Type        respjson.Field
		Error       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A list of tools available on an MCP server.

func (ConversationItemMcpListTools) ImplConversationItemUnion

func (ConversationItemMcpListTools) ImplConversationItemUnion()

func (ConversationItemMcpListTools) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemMcpListTools) UnmarshalJSON

func (r *ConversationItemMcpListTools) UnmarshalJSON(data []byte) error

type ConversationItemMcpListToolsTool

type ConversationItemMcpListToolsTool struct {
	// The JSON schema describing the tool's input.
	InputSchema any `json:"input_schema,required"`
	// The name of the tool.
	Name string `json:"name,required"`
	// Additional annotations about the tool.
	Annotations any `json:"annotations,nullable"`
	// The description of the tool.
	Description string `json:"description,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InputSchema respjson.Field
		Name        respjson.Field
		Annotations respjson.Field
		Description respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A tool available on an MCP server.

func (ConversationItemMcpListToolsTool) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemMcpListToolsTool) UnmarshalJSON

func (r *ConversationItemMcpListToolsTool) UnmarshalJSON(data []byte) error

type ConversationItemUnion

type ConversationItemUnion struct {
	ID string `json:"id"`
	// This field is a union of [[]MessageContentUnion],
	// [[]responses.ResponseReasoningItemContent]
	Content ConversationItemUnionContent `json:"content"`
	// This field is from variant [Message].
	Role   MessageRole `json:"role"`
	Status string      `json:"status"`
	// Any of "message", "function_call", "function_call_output", "file_search_call",
	// "web_search_call", "image_generation_call", "computer_call",
	// "computer_call_output", "reasoning", "code_interpreter_call",
	// "local_shell_call", "local_shell_call_output", "mcp_list_tools",
	// "mcp_approval_request", "mcp_approval_response", "mcp_call", "custom_tool_call",
	// "custom_tool_call_output".
	Type      string `json:"type"`
	Arguments string `json:"arguments"`
	CallID    string `json:"call_id"`
	Name      string `json:"name"`
	// This field is a union of [string],
	// [responses.ResponseComputerToolCallOutputScreenshot], [string], [string],
	// [string]
	Output ConversationItemUnionOutput `json:"output"`
	// This field is from variant [responses.ResponseFileSearchToolCall].
	Queries []string `json:"queries"`
	// This field is from variant [responses.ResponseFileSearchToolCall].
	Results []responses.ResponseFileSearchToolCallResult `json:"results"`
	// This field is a union of [responses.ResponseFunctionWebSearchActionUnion],
	// [responses.ResponseComputerToolCallActionUnion],
	// [ConversationItemLocalShellCallAction]
	Action ConversationItemUnionAction `json:"action"`
	// This field is from variant [ConversationItemImageGenerationCall].
	Result string `json:"result"`
	// This field is from variant [responses.ResponseComputerToolCall].
	PendingSafetyChecks []responses.ResponseComputerToolCallPendingSafetyCheck `json:"pending_safety_checks"`
	// This field is from variant [responses.ResponseComputerToolCallOutputItem].
	AcknowledgedSafetyChecks []responses.ResponseComputerToolCallOutputItemAcknowledgedSafetyCheck `json:"acknowledged_safety_checks"`
	// This field is from variant [responses.ResponseReasoningItem].
	Summary []responses.ResponseReasoningItemSummary `json:"summary"`
	// This field is from variant [responses.ResponseReasoningItem].
	EncryptedContent string `json:"encrypted_content"`
	// This field is from variant [responses.ResponseCodeInterpreterToolCall].
	Code string `json:"code"`
	// This field is from variant [responses.ResponseCodeInterpreterToolCall].
	ContainerID string `json:"container_id"`
	// This field is from variant [responses.ResponseCodeInterpreterToolCall].
	Outputs     []responses.ResponseCodeInterpreterToolCallOutputUnion `json:"outputs"`
	ServerLabel string                                                 `json:"server_label"`
	// This field is from variant [ConversationItemMcpListTools].
	Tools []ConversationItemMcpListToolsTool `json:"tools"`
	Error string                             `json:"error"`
	// This field is from variant [ConversationItemMcpApprovalResponse].
	ApprovalRequestID string `json:"approval_request_id"`
	// This field is from variant [ConversationItemMcpApprovalResponse].
	Approve bool `json:"approve"`
	// This field is from variant [ConversationItemMcpApprovalResponse].
	Reason string `json:"reason"`
	// This field is from variant [responses.ResponseCustomToolCall].
	Input string `json:"input"`
	JSON  struct {
		ID                       respjson.Field
		Content                  respjson.Field
		Role                     respjson.Field
		Status                   respjson.Field
		Type                     respjson.Field
		Arguments                respjson.Field
		CallID                   respjson.Field
		Name                     respjson.Field
		Output                   respjson.Field
		Queries                  respjson.Field
		Results                  respjson.Field
		Action                   respjson.Field
		Result                   respjson.Field
		PendingSafetyChecks      respjson.Field
		AcknowledgedSafetyChecks respjson.Field
		Summary                  respjson.Field
		EncryptedContent         respjson.Field
		Code                     respjson.Field
		ContainerID              respjson.Field
		Outputs                  respjson.Field
		ServerLabel              respjson.Field
		Tools                    respjson.Field
		Error                    respjson.Field
		ApprovalRequestID        respjson.Field
		Approve                  respjson.Field
		Reason                   respjson.Field
		Input                    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemUnion contains all possible properties and values from Message, responses.ResponseFunctionToolCallItem, responses.ResponseFunctionToolCallOutputItem, responses.ResponseFileSearchToolCall, responses.ResponseFunctionWebSearch, ConversationItemImageGenerationCall, responses.ResponseComputerToolCall, responses.ResponseComputerToolCallOutputItem, responses.ResponseReasoningItem, responses.ResponseCodeInterpreterToolCall, ConversationItemLocalShellCall, ConversationItemLocalShellCallOutput, ConversationItemMcpListTools, ConversationItemMcpApprovalRequest, ConversationItemMcpApprovalResponse, ConversationItemMcpCall, responses.ResponseCustomToolCall, responses.ResponseCustomToolCallOutput.

Use the ConversationItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ConversationItemUnion) AsAny

func (u ConversationItemUnion) AsAny() anyConversationItem

Use the following switch statement to find the correct variant

switch variant := ConversationItemUnion.AsAny().(type) {
case conversations.Message:
case responses.ResponseFunctionToolCallItem:
case responses.ResponseFunctionToolCallOutputItem:
case responses.ResponseFileSearchToolCall:
case responses.ResponseFunctionWebSearch:
case conversations.ConversationItemImageGenerationCall:
case responses.ResponseComputerToolCall:
case responses.ResponseComputerToolCallOutputItem:
case responses.ResponseReasoningItem:
case responses.ResponseCodeInterpreterToolCall:
case conversations.ConversationItemLocalShellCall:
case conversations.ConversationItemLocalShellCallOutput:
case conversations.ConversationItemMcpListTools:
case conversations.ConversationItemMcpApprovalRequest:
case conversations.ConversationItemMcpApprovalResponse:
case conversations.ConversationItemMcpCall:
case responses.ResponseCustomToolCall:
case responses.ResponseCustomToolCallOutput:
default:
  fmt.Errorf("no variant present")
}

func (ConversationItemUnion) AsCodeInterpreterCall

func (u ConversationItemUnion) AsCodeInterpreterCall() (v responses.ResponseCodeInterpreterToolCall)

func (ConversationItemUnion) AsComputerCall

func (ConversationItemUnion) AsComputerCallOutput

func (ConversationItemUnion) AsCustomToolCall

func (u ConversationItemUnion) AsCustomToolCall() (v responses.ResponseCustomToolCall)

func (ConversationItemUnion) AsCustomToolCallOutput

func (u ConversationItemUnion) AsCustomToolCallOutput() (v responses.ResponseCustomToolCallOutput)

func (ConversationItemUnion) AsFileSearchCall

func (ConversationItemUnion) AsFunctionCall

func (ConversationItemUnion) AsFunctionCallOutput

func (ConversationItemUnion) AsImageGenerationCall

func (u ConversationItemUnion) AsImageGenerationCall() (v ConversationItemImageGenerationCall)

func (ConversationItemUnion) AsLocalShellCall

func (u ConversationItemUnion) AsLocalShellCall() (v ConversationItemLocalShellCall)

func (ConversationItemUnion) AsLocalShellCallOutput

func (u ConversationItemUnion) AsLocalShellCallOutput() (v ConversationItemLocalShellCallOutput)

func (ConversationItemUnion) AsMcpApprovalRequest

func (u ConversationItemUnion) AsMcpApprovalRequest() (v ConversationItemMcpApprovalRequest)

func (ConversationItemUnion) AsMcpApprovalResponse

func (u ConversationItemUnion) AsMcpApprovalResponse() (v ConversationItemMcpApprovalResponse)

func (ConversationItemUnion) AsMcpCall

func (ConversationItemUnion) AsMcpListTools

func (u ConversationItemUnion) AsMcpListTools() (v ConversationItemMcpListTools)

func (ConversationItemUnion) AsMessage

func (u ConversationItemUnion) AsMessage() (v Message)

func (ConversationItemUnion) AsReasoning

func (ConversationItemUnion) AsWebSearchCall

func (ConversationItemUnion) RawJSON

func (u ConversationItemUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConversationItemUnion) UnmarshalJSON

func (r *ConversationItemUnion) UnmarshalJSON(data []byte) error

type ConversationItemUnionAction

type ConversationItemUnionAction struct {
	// This field is from variant [responses.ResponseFunctionWebSearchActionUnion].
	Query string `json:"query"`
	Type  string `json:"type"`
	// This field is from variant [responses.ResponseFunctionWebSearchActionUnion].
	Sources []responses.ResponseFunctionWebSearchActionSearchSource `json:"sources"`
	URL     string                                                  `json:"url"`
	// This field is from variant [responses.ResponseFunctionWebSearchActionUnion].
	Pattern string `json:"pattern"`
	// This field is from variant [responses.ResponseComputerToolCallActionUnion].
	Button string `json:"button"`
	X      int64  `json:"x"`
	Y      int64  `json:"y"`
	// This field is from variant [responses.ResponseComputerToolCallActionUnion].
	Path []responses.ResponseComputerToolCallActionDragPath `json:"path"`
	// This field is from variant [responses.ResponseComputerToolCallActionUnion].
	Keys []string `json:"keys"`
	// This field is from variant [responses.ResponseComputerToolCallActionUnion].
	ScrollX int64 `json:"scroll_x"`
	// This field is from variant [responses.ResponseComputerToolCallActionUnion].
	ScrollY int64 `json:"scroll_y"`
	// This field is from variant [responses.ResponseComputerToolCallActionUnion].
	Text string `json:"text"`
	// This field is from variant [ConversationItemLocalShellCallAction].
	Command []string `json:"command"`
	// This field is from variant [ConversationItemLocalShellCallAction].
	Env map[string]string `json:"env"`
	// This field is from variant [ConversationItemLocalShellCallAction].
	TimeoutMs int64 `json:"timeout_ms"`
	// This field is from variant [ConversationItemLocalShellCallAction].
	User string `json:"user"`
	// This field is from variant [ConversationItemLocalShellCallAction].
	WorkingDirectory string `json:"working_directory"`
	JSON             struct {
		Query            respjson.Field
		Type             respjson.Field
		Sources          respjson.Field
		URL              respjson.Field
		Pattern          respjson.Field
		Button           respjson.Field
		X                respjson.Field
		Y                respjson.Field
		Path             respjson.Field
		Keys             respjson.Field
		ScrollX          respjson.Field
		ScrollY          respjson.Field
		Text             respjson.Field
		Command          respjson.Field
		Env              respjson.Field
		TimeoutMs        respjson.Field
		User             respjson.Field
		WorkingDirectory respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemUnionAction is an implicit subunion of ConversationItemUnion. ConversationItemUnionAction provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ConversationItemUnion.

func (*ConversationItemUnionAction) UnmarshalJSON

func (r *ConversationItemUnionAction) UnmarshalJSON(data []byte) error

type ConversationItemUnionContent

type ConversationItemUnionContent struct {
	// This field will be present if the value is a [[]MessageContentUnion] instead of
	// an object.
	OfMessageContentArray []MessageContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]responses.ResponseReasoningItemContent] instead of an object.
	OfResponseReasoningItemContentArray []responses.ResponseReasoningItemContent `json:",inline"`
	JSON                                struct {
		OfMessageContentArray               respjson.Field
		OfResponseReasoningItemContentArray respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemUnionContent is an implicit subunion of ConversationItemUnion. ConversationItemUnionContent provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ConversationItemUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfMessageContentArray OfResponseReasoningItemContentArray]

func (*ConversationItemUnionContent) UnmarshalJSON

func (r *ConversationItemUnionContent) UnmarshalJSON(data []byte) error

type ConversationItemUnionOutput

type ConversationItemUnionOutput struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field is from variant [responses.ResponseComputerToolCallOutputScreenshot].
	Type constant.ComputerScreenshot `json:"type"`
	// This field is from variant [responses.ResponseComputerToolCallOutputScreenshot].
	FileID string `json:"file_id"`
	// This field is from variant [responses.ResponseComputerToolCallOutputScreenshot].
	ImageURL string `json:"image_url"`
	JSON     struct {
		OfString respjson.Field
		Type     respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemUnionOutput is an implicit subunion of ConversationItemUnion. ConversationItemUnionOutput provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ConversationItemUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (*ConversationItemUnionOutput) UnmarshalJSON

func (r *ConversationItemUnionOutput) UnmarshalJSON(data []byte) error

type ConversationNewParams

type ConversationNewParams struct {
	// Initial items to include in the conversation context. You may add up to 20 items
	// at a time.
	Items []responses.ResponseInputItemUnionParam `json:"items,omitzero"`
	// Set of 16 key-value pairs that can be attached to an object. Useful for storing
	// additional information about the object in a structured format.
	Metadata shared.Metadata `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (ConversationNewParams) MarshalJSON

func (r ConversationNewParams) MarshalJSON() (data []byte, err error)

func (*ConversationNewParams) UnmarshalJSON

func (r *ConversationNewParams) UnmarshalJSON(data []byte) error

type ConversationService

type ConversationService struct {
	Options []option.RequestOption
	Items   ItemService
}

ConversationService contains methods and other services that help with interacting with the openai API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConversationService method instead.

func NewConversationService

func NewConversationService(opts ...option.RequestOption) (r ConversationService)

NewConversationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ConversationService) Delete

func (r *ConversationService) Delete(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *ConversationDeletedResource, err error)

Delete a conversation with the given ID.

func (*ConversationService) Get

func (r *ConversationService) Get(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *Conversation, err error)

Get a conversation with the given ID.

func (*ConversationService) New

Create a conversation.

func (*ConversationService) Update

func (r *ConversationService) Update(ctx context.Context, conversationID string, body ConversationUpdateParams, opts ...option.RequestOption) (res *Conversation, err error)

Update a conversation's metadata with the given ID.

type ConversationUpdateParams

type ConversationUpdateParams struct {
	// Set of 16 key-value pairs that can be attached to an object. This can be useful
	// for storing additional information about the object in a structured format, and
	// querying for objects via API or the dashboard. Keys are strings with a maximum
	// length of 64 characters. Values are strings with a maximum length of 512
	// characters.
	Metadata map[string]string `json:"metadata,omitzero,required"`
	// contains filtered or unexported fields
}

func (ConversationUpdateParams) MarshalJSON

func (r ConversationUpdateParams) MarshalJSON() (data []byte, err error)

func (*ConversationUpdateParams) UnmarshalJSON

func (r *ConversationUpdateParams) UnmarshalJSON(data []byte) error

type CustomToolInputFormatGrammar

type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar

A grammar defined by the user.

This is an alias to an internal type.

type CustomToolInputFormatGrammarParam

type CustomToolInputFormatGrammarParam = shared.CustomToolInputFormatGrammarParam

A grammar defined by the user.

This is an alias to an internal type.

type CustomToolInputFormatText

type CustomToolInputFormatText = shared.CustomToolInputFormatText

Unconstrained free-form text.

This is an alias to an internal type.

type CustomToolInputFormatTextParam

type CustomToolInputFormatTextParam = shared.CustomToolInputFormatTextParam

Unconstrained free-form text.

This is an alias to an internal type.

type CustomToolInputFormatUnion

type CustomToolInputFormatUnion = shared.CustomToolInputFormatUnion

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

This is an alias to an internal type.

type CustomToolInputFormatUnionParam

type CustomToolInputFormatUnionParam = shared.CustomToolInputFormatUnionParam

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

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorObject

type ErrorObject = shared.ErrorObject

This is an alias to an internal type.

type FileCitationBody

type FileCitationBody struct {
	// The ID of the file.
	FileID string `json:"file_id,required"`
	// The filename of the file cited.
	Filename string `json:"filename,required"`
	// The index of the file in the list of files.
	Index int64 `json:"index,required"`
	// The type of the file citation. Always `file_citation`.
	Type constant.FileCitation `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileID      respjson.Field
		Filename    respjson.Field
		Index       respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileCitationBody) RawJSON

func (r FileCitationBody) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileCitationBody) UnmarshalJSON

func (r *FileCitationBody) UnmarshalJSON(data []byte) error

type FunctionDefinition

type FunctionDefinition = shared.FunctionDefinition

This is an alias to an internal type.

type FunctionDefinitionParam

type FunctionDefinitionParam = shared.FunctionDefinitionParam

This is an alias to an internal type.

type FunctionParameters

type FunctionParameters = shared.FunctionParameters

The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.

Omitting `parameters` defines a function with an empty parameter list.

This is an alias to an internal type.

type InputFileContent

type InputFileContent struct {
	// The ID of the file to be sent to the model.
	FileID string `json:"file_id,required"`
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileID      respjson.Field
		Type        respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InputFileContent) RawJSON

func (r InputFileContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*InputFileContent) UnmarshalJSON

func (r *InputFileContent) UnmarshalJSON(data []byte) error

type InputImageContent

type InputImageContent struct {
	// The detail level of the image to be sent to the model. One of `high`, `low`, or
	// `auto`. Defaults to `auto`.
	//
	// Any of "low", "high", "auto".
	Detail InputImageContentDetail `json:"detail,required"`
	// The ID of the file to be sent to the model.
	FileID string `json:"file_id,required"`
	// The URL of the image to be sent to the model. A fully qualified URL or base64
	// encoded image in a data URL.
	ImageURL string `json:"image_url,required"`
	// The type of the input item. Always `input_image`.
	Type constant.InputImage `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Detail      respjson.Field
		FileID      respjson.Field
		ImageURL    respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InputImageContent) RawJSON

func (r InputImageContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*InputImageContent) UnmarshalJSON

func (r *InputImageContent) UnmarshalJSON(data []byte) error

type InputImageContentDetail

type InputImageContentDetail string

The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.

const (
	InputImageContentDetailLow  InputImageContentDetail = "low"
	InputImageContentDetailHigh InputImageContentDetail = "high"
	InputImageContentDetailAuto InputImageContentDetail = "auto"
)

type InputTextContent

type InputTextContent struct {
	// The text input to the model.
	Text string `json:"text,required"`
	// The type of the input item. Always `input_text`.
	Type constant.InputText `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InputTextContent) RawJSON

func (r InputTextContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*InputTextContent) UnmarshalJSON

func (r *InputTextContent) UnmarshalJSON(data []byte) error

type ItemGetParams

type ItemGetParams struct {
	// Additional fields to include in the response. See the `include` parameter for
	// [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include)
	// for more information.
	Include []responses.ResponseIncludable `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ItemGetParams) URLQuery

func (r ItemGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ItemGetParams's query parameters as `url.Values`.

type ItemListParams

type ItemListParams struct {
	// An item ID to list items after, used in pagination.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// A limit on the number of objects to be returned. Limit can range between 1 and
	// 100, and the default is 20.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Specify additional output data to include in the model response. Currently
	// supported values are:
	//
	//   - `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).
	Include []responses.ResponseIncludable `query:"include,omitzero" json:"-"`
	// The order to return the input items in. Default is `desc`.
	//
	// - `asc`: Return the input items in ascending order.
	// - `desc`: Return the input items in descending order.
	//
	// Any of "asc", "desc".
	Order ItemListParamsOrder `query:"order,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ItemListParams) URLQuery

func (r ItemListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ItemListParams's query parameters as `url.Values`.

type ItemListParamsOrder

type ItemListParamsOrder string

The order to return the input items in. Default is `desc`.

- `asc`: Return the input items in ascending order. - `desc`: Return the input items in descending order.

const (
	ItemListParamsOrderAsc  ItemListParamsOrder = "asc"
	ItemListParamsOrderDesc ItemListParamsOrder = "desc"
)

type ItemNewParams

type ItemNewParams struct {
	// The items to add to the conversation. You may add up to 20 items at a time.
	Items []responses.ResponseInputItemUnionParam `json:"items,omitzero,required"`
	// Additional fields to include in the response. See the `include` parameter for
	// [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include)
	// for more information.
	Include []responses.ResponseIncludable `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ItemNewParams) MarshalJSON

func (r ItemNewParams) MarshalJSON() (data []byte, err error)

func (ItemNewParams) URLQuery

func (r ItemNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes ItemNewParams's query parameters as `url.Values`.

func (*ItemNewParams) UnmarshalJSON

func (r *ItemNewParams) UnmarshalJSON(data []byte) error

type ItemService

type ItemService struct {
	Options []option.RequestOption
}

ItemService contains methods and other services that help with interacting with the openai API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewItemService method instead.

func NewItemService

func NewItemService(opts ...option.RequestOption) (r ItemService)

NewItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ItemService) Delete

func (r *ItemService) Delete(ctx context.Context, conversationID string, itemID string, opts ...option.RequestOption) (res *Conversation, err error)

Delete an item from a conversation with the given IDs.

func (*ItemService) Get

func (r *ItemService) Get(ctx context.Context, conversationID string, itemID string, query ItemGetParams, opts ...option.RequestOption) (res *ConversationItemUnion, err error)

Get a single item from a conversation with the given IDs.

func (*ItemService) List

List all items for a conversation with the given ID.

func (*ItemService) ListAutoPaging

List all items for a conversation with the given ID.

func (*ItemService) New

func (r *ItemService) New(ctx context.Context, conversationID string, params ItemNewParams, opts ...option.RequestOption) (res *ConversationItemList, err error)

Create items in a conversation with the given ID.

type LobProb

type LobProb struct {
	Token       string       `json:"token,required"`
	Bytes       []int64      `json:"bytes,required"`
	Logprob     float64      `json:"logprob,required"`
	TopLogprobs []TopLogProb `json:"top_logprobs,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Token       respjson.Field
		Bytes       respjson.Field
		Logprob     respjson.Field
		TopLogprobs respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LobProb) RawJSON

func (r LobProb) RawJSON() string

Returns the unmodified JSON received from the API

func (*LobProb) UnmarshalJSON

func (r *LobProb) UnmarshalJSON(data []byte) error

type Message

type Message struct {
	// The unique ID of the message.
	ID string `json:"id,required"`
	// The content of the message
	Content []MessageContentUnion `json:"content,required"`
	// The role of the message. One of `unknown`, `user`, `assistant`, `system`,
	// `critic`, `discriminator`, `developer`, or `tool`.
	//
	// Any of "unknown", "user", "assistant", "system", "critic", "discriminator",
	// "developer", "tool".
	Role MessageRole `json:"role,required"`
	// The status of item. One of `in_progress`, `completed`, or `incomplete`.
	// Populated when items are returned via API.
	//
	// Any of "in_progress", "completed", "incomplete".
	Status MessageStatus `json:"status,required"`
	// The type of the message. Always set to `message`.
	Type constant.Message `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Content     respjson.Field
		Role        respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Message) ImplConversationItemUnion

func (Message) ImplConversationItemUnion()

func (Message) RawJSON

func (r Message) RawJSON() string

Returns the unmodified JSON received from the API

func (*Message) UnmarshalJSON

func (r *Message) UnmarshalJSON(data []byte) error

type MessageContentUnion

type MessageContentUnion struct {
	Text string `json:"text"`
	// Any of "input_text", "output_text", "text", "summary_text", "refusal",
	// "input_image", "computer_screenshot", "input_file".
	Type string `json:"type"`
	// This field is from variant [OutputTextContent].
	Annotations []OutputTextContentAnnotationUnion `json:"annotations"`
	// This field is from variant [OutputTextContent].
	Logprobs []LobProb `json:"logprobs"`
	// This field is from variant [RefusalContent].
	Refusal string `json:"refusal"`
	// This field is from variant [InputImageContent].
	Detail   InputImageContentDetail `json:"detail"`
	FileID   string                  `json:"file_id"`
	ImageURL string                  `json:"image_url"`
	// This field is from variant [InputFileContent].
	FileURL string `json:"file_url"`
	// This field is from variant [InputFileContent].
	Filename string `json:"filename"`
	JSON     struct {
		Text        respjson.Field
		Type        respjson.Field
		Annotations respjson.Field
		Logprobs    respjson.Field
		Refusal     respjson.Field
		Detail      respjson.Field
		FileID      respjson.Field
		ImageURL    respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MessageContentUnion contains all possible properties and values from InputTextContent, OutputTextContent, TextContent, SummaryTextContent, RefusalContent, InputImageContent, ComputerScreenshotContent, InputFileContent.

Use the MessageContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (MessageContentUnion) AsAny

func (u MessageContentUnion) AsAny() anyMessageContent

Use the following switch statement to find the correct variant

switch variant := MessageContentUnion.AsAny().(type) {
case conversations.InputTextContent:
case conversations.OutputTextContent:
case conversations.TextContent:
case conversations.SummaryTextContent:
case conversations.RefusalContent:
case conversations.InputImageContent:
case conversations.ComputerScreenshotContent:
case conversations.InputFileContent:
default:
  fmt.Errorf("no variant present")
}

func (MessageContentUnion) AsComputerScreenshot

func (u MessageContentUnion) AsComputerScreenshot() (v ComputerScreenshotContent)

func (MessageContentUnion) AsInputFile

func (u MessageContentUnion) AsInputFile() (v InputFileContent)

func (MessageContentUnion) AsInputImage

func (u MessageContentUnion) AsInputImage() (v InputImageContent)

func (MessageContentUnion) AsInputText

func (u MessageContentUnion) AsInputText() (v InputTextContent)

func (MessageContentUnion) AsOutputText

func (u MessageContentUnion) AsOutputText() (v OutputTextContent)

func (MessageContentUnion) AsRefusal

func (u MessageContentUnion) AsRefusal() (v RefusalContent)

func (MessageContentUnion) AsSummaryText

func (u MessageContentUnion) AsSummaryText() (v SummaryTextContent)

func (MessageContentUnion) AsText

func (u MessageContentUnion) AsText() (v TextContent)

func (MessageContentUnion) RawJSON

func (u MessageContentUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*MessageContentUnion) UnmarshalJSON

func (r *MessageContentUnion) UnmarshalJSON(data []byte) error

type MessageRole

type MessageRole string

The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`.

const (
	MessageRoleUnknown       MessageRole = "unknown"
	MessageRoleUser          MessageRole = "user"
	MessageRoleAssistant     MessageRole = "assistant"
	MessageRoleSystem        MessageRole = "system"
	MessageRoleCritic        MessageRole = "critic"
	MessageRoleDiscriminator MessageRole = "discriminator"
	MessageRoleDeveloper     MessageRole = "developer"
	MessageRoleTool          MessageRole = "tool"
)

type MessageStatus

type MessageStatus string

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

const (
	MessageStatusInProgress MessageStatus = "in_progress"
	MessageStatusCompleted  MessageStatus = "completed"
	MessageStatusIncomplete MessageStatus = "incomplete"
)

type Metadata

type Metadata = shared.Metadata

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

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

This is an alias to an internal type.

type OutputTextContent

type OutputTextContent struct {
	// The annotations of the text output.
	Annotations []OutputTextContentAnnotationUnion `json:"annotations,required"`
	// The text output from the model.
	Text string `json:"text,required"`
	// The type of the output text. Always `output_text`.
	Type     constant.OutputText `json:"type,required"`
	Logprobs []LobProb           `json:"logprobs"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Annotations respjson.Field
		Text        respjson.Field
		Type        respjson.Field
		Logprobs    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OutputTextContent) RawJSON

func (r OutputTextContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*OutputTextContent) UnmarshalJSON

func (r *OutputTextContent) UnmarshalJSON(data []byte) error

type OutputTextContentAnnotationUnion

type OutputTextContentAnnotationUnion struct {
	FileID   string `json:"file_id"`
	Filename string `json:"filename"`
	// This field is from variant [FileCitationBody].
	Index int64 `json:"index"`
	// Any of "file_citation", "url_citation", "container_file_citation".
	Type       string `json:"type"`
	EndIndex   int64  `json:"end_index"`
	StartIndex int64  `json:"start_index"`
	// This field is from variant [URLCitationBody].
	Title string `json:"title"`
	// This field is from variant [URLCitationBody].
	URL string `json:"url"`
	// This field is from variant [ContainerFileCitationBody].
	ContainerID string `json:"container_id"`
	JSON        struct {
		FileID      respjson.Field
		Filename    respjson.Field
		Index       respjson.Field
		Type        respjson.Field
		EndIndex    respjson.Field
		StartIndex  respjson.Field
		Title       respjson.Field
		URL         respjson.Field
		ContainerID respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OutputTextContentAnnotationUnion contains all possible properties and values from FileCitationBody, URLCitationBody, ContainerFileCitationBody.

Use the OutputTextContentAnnotationUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (OutputTextContentAnnotationUnion) AsAny

func (u OutputTextContentAnnotationUnion) AsAny() anyOutputTextContentAnnotation

Use the following switch statement to find the correct variant

switch variant := OutputTextContentAnnotationUnion.AsAny().(type) {
case conversations.FileCitationBody:
case conversations.URLCitationBody:
case conversations.ContainerFileCitationBody:
default:
  fmt.Errorf("no variant present")
}

func (OutputTextContentAnnotationUnion) AsContainerFileCitation

func (u OutputTextContentAnnotationUnion) AsContainerFileCitation() (v ContainerFileCitationBody)

func (OutputTextContentAnnotationUnion) AsFileCitation

func (u OutputTextContentAnnotationUnion) AsFileCitation() (v FileCitationBody)

func (OutputTextContentAnnotationUnion) AsURLCitation

func (u OutputTextContentAnnotationUnion) AsURLCitation() (v URLCitationBody)

func (OutputTextContentAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OutputTextContentAnnotationUnion) UnmarshalJSON

func (r *OutputTextContentAnnotationUnion) UnmarshalJSON(data []byte) error

type Reasoning

type Reasoning = shared.Reasoning

**gpt-5 and o-series models only**

Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).

This is an alias to an internal type.

type ReasoningEffort

type ReasoningEffort = shared.ReasoningEffort

Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.

This is an alias to an internal type.

type ReasoningGenerateSummary

type ReasoningGenerateSummary = shared.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`.

This is an alias to an internal type.

type ReasoningParam

type ReasoningParam = shared.ReasoningParam

**gpt-5 and o-series models only**

Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).

This is an alias to an internal type.

type ReasoningSummary

type ReasoningSummary = shared.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`.

This is an alias to an internal type.

type RefusalContent

type RefusalContent struct {
	// The refusal explanation from the model.
	Refusal string `json:"refusal,required"`
	// The type of the refusal. Always `refusal`.
	Type constant.Refusal `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Refusal     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RefusalContent) RawJSON

func (r RefusalContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*RefusalContent) UnmarshalJSON

func (r *RefusalContent) UnmarshalJSON(data []byte) error

type ResponseFormatJSONObject

type ResponseFormatJSONObject = shared.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.

This is an alias to an internal type.

type ResponseFormatJSONObjectParam

type ResponseFormatJSONObjectParam = shared.ResponseFormatJSONObjectParam

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.

This is an alias to an internal type.

type ResponseFormatJSONSchema

type ResponseFormatJSONSchema = shared.ResponseFormatJSONSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

This is an alias to an internal type.

type ResponseFormatJSONSchemaJSONSchema

type ResponseFormatJSONSchemaJSONSchema = shared.ResponseFormatJSONSchemaJSONSchema

Structured Outputs configuration options, including a JSON Schema.

This is an alias to an internal type.

type ResponseFormatJSONSchemaJSONSchemaParam

type ResponseFormatJSONSchemaJSONSchemaParam = shared.ResponseFormatJSONSchemaJSONSchemaParam

Structured Outputs configuration options, including a JSON Schema.

This is an alias to an internal type.

type ResponseFormatJSONSchemaParam

type ResponseFormatJSONSchemaParam = shared.ResponseFormatJSONSchemaParam

JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

This is an alias to an internal type.

type ResponseFormatText

type ResponseFormatText = shared.ResponseFormatText

Default response format. Used to generate text responses.

This is an alias to an internal type.

type ResponseFormatTextParam

type ResponseFormatTextParam = shared.ResponseFormatTextParam

Default response format. Used to generate text responses.

This is an alias to an internal type.

type ResponsesModel

type ResponsesModel = shared.ResponsesModel

This is an alias to an internal type.

type SummaryTextContent

type SummaryTextContent struct {
	Text string               `json:"text,required"`
	Type constant.SummaryText `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SummaryTextContent) RawJSON

func (r SummaryTextContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*SummaryTextContent) UnmarshalJSON

func (r *SummaryTextContent) UnmarshalJSON(data []byte) error

type TextContent

type TextContent struct {
	Text string        `json:"text,required"`
	Type constant.Text `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TextContent) RawJSON

func (r TextContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*TextContent) UnmarshalJSON

func (r *TextContent) UnmarshalJSON(data []byte) error

type TopLogProb

type TopLogProb struct {
	Token   string  `json:"token,required"`
	Bytes   []int64 `json:"bytes,required"`
	Logprob float64 `json:"logprob,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Token       respjson.Field
		Bytes       respjson.Field
		Logprob     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TopLogProb) RawJSON

func (r TopLogProb) RawJSON() string

Returns the unmodified JSON received from the API

func (*TopLogProb) UnmarshalJSON

func (r *TopLogProb) UnmarshalJSON(data []byte) error

type URLCitationBody

type URLCitationBody struct {
	// The index of the last character of the URL citation in the message.
	EndIndex int64 `json:"end_index,required"`
	// The index of the first character of the URL citation in the message.
	StartIndex int64 `json:"start_index,required"`
	// The title of the web resource.
	Title string `json:"title,required"`
	// The type of the URL citation. Always `url_citation`.
	Type constant.URLCitation `json:"type,required"`
	// The URL of the web resource.
	URL string `json:"url,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EndIndex    respjson.Field
		StartIndex  respjson.Field
		Title       respjson.Field
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (URLCitationBody) RawJSON

func (r URLCitationBody) RawJSON() string

Returns the unmodified JSON received from the API

func (*URLCitationBody) UnmarshalJSON

func (r *URLCitationBody) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL