fix: add involves edge from task to agent:nomos at creation
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

Plus sync vendor directory for Docker build compatibility.
This commit is contained in:
2026-08-11 22:03:12 +02:00
parent 7d6a3320d4
commit febc153b7f
3384 changed files with 945212 additions and 2 deletions

View File

@@ -0,0 +1,731 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package constant
import (
"encoding/json"
)
type Constant[T any] interface {
Default() T
}
// ValueOf gives the default value of a constant from its type. It's helpful when
// constructing constants as variants in a one-of. Note that empty structs are
// marshalled by default. Usage: constant.ValueOf[constant.Foo]()
func ValueOf[T Constant[T]]() T {
var t T
return t.Default()
}
type Approximate string // Always "approximate"
type Assistant string // Always "assistant"
type AssistantDeleted string // Always "assistant.deleted"
type Auto string // Always "auto"
type Batch string // Always "batch"
type BatchCancelled string // Always "batch.cancelled"
type BatchCompleted string // Always "batch.completed"
type BatchExpired string // Always "batch.expired"
type BatchFailed string // Always "batch.failed"
type ChatCompletion string // Always "chat.completion"
type ChatCompletionChunk string // Always "chat.completion.chunk"
type ChatCompletionDeleted string // Always "chat.completion.deleted"
type CheckpointPermission string // Always "checkpoint.permission"
type Click string // Always "click"
type CodeInterpreter string // Always "code_interpreter"
type CodeInterpreterCall string // Always "code_interpreter_call"
type ComputerCallOutput string // Always "computer_call_output"
type ComputerScreenshot string // Always "computer_screenshot"
type ComputerUsePreview string // Always "computer_use_preview"
type ContainerFileCitation string // Always "container_file_citation"
type ContainerFile string // Always "container.file"
type Content string // Always "content"
type Developer string // Always "developer"
type DoubleClick string // Always "double_click"
type Drag string // Always "drag"
type Duration string // Always "duration"
type Embedding string // Always "embedding"
type Error string // Always "error"
type EvalRunCanceled string // Always "eval.run.canceled"
type EvalRunFailed string // Always "eval.run.failed"
type EvalRunSucceeded string // Always "eval.run.succeeded"
type Exec string // Always "exec"
type File string // Always "file"
type FileCitation string // Always "file_citation"
type FilePath string // Always "file_path"
type FileSearch string // Always "file_search"
type FileSearchCall string // Always "file_search_call"
type Find string // Always "find"
type FineTuningJob string // Always "fine_tuning.job"
type FineTuningJobCancelled string // Always "fine_tuning.job.cancelled"
type FineTuningJobCheckpoint string // Always "fine_tuning.job.checkpoint"
type FineTuningJobEvent string // Always "fine_tuning.job.event"
type FineTuningJobFailed string // Always "fine_tuning.job.failed"
type FineTuningJobSucceeded string // Always "fine_tuning.job.succeeded"
type Function string // Always "function"
type FunctionCall string // Always "function_call"
type FunctionCallOutput string // Always "function_call_output"
type Image string // Always "image"
type ImageEditCompleted string // Always "image_edit.completed"
type ImageEditPartialImage string // Always "image_edit.partial_image"
type ImageFile string // Always "image_file"
type ImageGeneration string // Always "image_generation"
type ImageGenerationCall string // Always "image_generation_call"
type ImageGenerationCompleted string // Always "image_generation.completed"
type ImageGenerationPartialImage string // Always "image_generation.partial_image"
type ImageURL string // Always "image_url"
type InputAudio string // Always "input_audio"
type InputFile string // Always "input_file"
type InputImage string // Always "input_image"
type InputText string // Always "input_text"
type JSONObject string // Always "json_object"
type JSONSchema string // Always "json_schema"
type Keypress string // Always "keypress"
type LabelModel string // Always "label_model"
type LastActiveAt string // Always "last_active_at"
type List string // Always "list"
type LocalShell string // Always "local_shell"
type LocalShellCall string // Always "local_shell_call"
type LocalShellCallOutput string // Always "local_shell_call_output"
type Logs string // Always "logs"
type Mcp string // Always "mcp"
type McpApprovalRequest string // Always "mcp_approval_request"
type McpApprovalResponse string // Always "mcp_approval_response"
type McpCall string // Always "mcp_call"
type McpListTools string // Always "mcp_list_tools"
type Message string // Always "message"
type MessageCreation string // Always "message_creation"
type Model string // Always "model"
type Move string // Always "move"
type Multi string // Always "multi"
type OpenPage string // Always "open_page"
type Other string // Always "other"
type OutputAudio string // Always "output_audio"
type OutputText string // Always "output_text"
type Python string // Always "python"
type Reasoning string // Always "reasoning"
type Refusal string // Always "refusal"
type Response string // Always "response"
type ResponseAudioDelta string // Always "response.audio.delta"
type ResponseAudioDone string // Always "response.audio.done"
type ResponseAudioTranscriptDelta string // Always "response.audio.transcript.delta"
type ResponseAudioTranscriptDone string // Always "response.audio.transcript.done"
type ResponseCancelled string // Always "response.cancelled"
type ResponseCodeInterpreterCallCodeDelta string // Always "response.code_interpreter_call_code.delta"
type ResponseCodeInterpreterCallCodeDone string // Always "response.code_interpreter_call_code.done"
type ResponseCodeInterpreterCallCompleted string // Always "response.code_interpreter_call.completed"
type ResponseCodeInterpreterCallInProgress string // Always "response.code_interpreter_call.in_progress"
type ResponseCodeInterpreterCallInterpreting string // Always "response.code_interpreter_call.interpreting"
type ResponseCompleted string // Always "response.completed"
type ResponseContentPartAdded string // Always "response.content_part.added"
type ResponseContentPartDone string // Always "response.content_part.done"
type ResponseCreated string // Always "response.created"
type ResponseFailed string // Always "response.failed"
type ResponseFileSearchCallCompleted string // Always "response.file_search_call.completed"
type ResponseFileSearchCallInProgress string // Always "response.file_search_call.in_progress"
type ResponseFileSearchCallSearching string // Always "response.file_search_call.searching"
type ResponseFunctionCallArgumentsDelta string // Always "response.function_call_arguments.delta"
type ResponseFunctionCallArgumentsDone string // Always "response.function_call_arguments.done"
type ResponseImageGenerationCallCompleted string // Always "response.image_generation_call.completed"
type ResponseImageGenerationCallGenerating string // Always "response.image_generation_call.generating"
type ResponseImageGenerationCallInProgress string // Always "response.image_generation_call.in_progress"
type ResponseImageGenerationCallPartialImage string // Always "response.image_generation_call.partial_image"
type ResponseInProgress string // Always "response.in_progress"
type ResponseIncomplete string // Always "response.incomplete"
type ResponseMcpCallArgumentsDelta string // Always "response.mcp_call_arguments.delta"
type ResponseMcpCallArgumentsDone string // Always "response.mcp_call_arguments.done"
type ResponseMcpCallCompleted string // Always "response.mcp_call.completed"
type ResponseMcpCallFailed string // Always "response.mcp_call.failed"
type ResponseMcpCallInProgress string // Always "response.mcp_call.in_progress"
type ResponseMcpListToolsCompleted string // Always "response.mcp_list_tools.completed"
type ResponseMcpListToolsFailed string // Always "response.mcp_list_tools.failed"
type ResponseMcpListToolsInProgress string // Always "response.mcp_list_tools.in_progress"
type ResponseOutputItemAdded string // Always "response.output_item.added"
type ResponseOutputItemDone string // Always "response.output_item.done"
type ResponseOutputTextAnnotationAdded string // Always "response.output_text.annotation.added"
type ResponseOutputTextDelta string // Always "response.output_text.delta"
type ResponseOutputTextDone string // Always "response.output_text.done"
type ResponseQueued string // Always "response.queued"
type ResponseReasoningSummaryPartAdded string // Always "response.reasoning_summary_part.added"
type ResponseReasoningSummaryPartDone string // Always "response.reasoning_summary_part.done"
type ResponseReasoningSummaryTextDelta string // Always "response.reasoning_summary_text.delta"
type ResponseReasoningSummaryTextDone string // Always "response.reasoning_summary_text.done"
type ResponseReasoningSummaryDelta string // Always "response.reasoning_summary.delta"
type ResponseReasoningSummaryDone string // Always "response.reasoning_summary.done"
type ResponseRefusalDelta string // Always "response.refusal.delta"
type ResponseRefusalDone string // Always "response.refusal.done"
type ResponseWebSearchCallCompleted string // Always "response.web_search_call.completed"
type ResponseWebSearchCallInProgress string // Always "response.web_search_call.in_progress"
type ResponseWebSearchCallSearching string // Always "response.web_search_call.searching"
type ScoreModel string // Always "score_model"
type Screenshot string // Always "screenshot"
type Scroll string // Always "scroll"
type Search string // Always "search"
type Static string // Always "static"
type StringCheck string // Always "string_check"
type SubmitToolOutputs string // Always "submit_tool_outputs"
type SummaryText string // Always "summary_text"
type System string // Always "system"
type Text string // Always "text"
type TextCompletion string // Always "text_completion"
type TextSimilarity string // Always "text_similarity"
type Thread string // Always "thread"
type ThreadCreated string // Always "thread.created"
type ThreadDeleted string // Always "thread.deleted"
type ThreadMessage string // Always "thread.message"
type ThreadMessageCompleted string // Always "thread.message.completed"
type ThreadMessageCreated string // Always "thread.message.created"
type ThreadMessageDeleted string // Always "thread.message.deleted"
type ThreadMessageDelta string // Always "thread.message.delta"
type ThreadMessageInProgress string // Always "thread.message.in_progress"
type ThreadMessageIncomplete string // Always "thread.message.incomplete"
type ThreadRun string // Always "thread.run"
type ThreadRunCancelled string // Always "thread.run.cancelled"
type ThreadRunCancelling string // Always "thread.run.cancelling"
type ThreadRunCompleted string // Always "thread.run.completed"
type ThreadRunCreated string // Always "thread.run.created"
type ThreadRunExpired string // Always "thread.run.expired"
type ThreadRunFailed string // Always "thread.run.failed"
type ThreadRunInProgress string // Always "thread.run.in_progress"
type ThreadRunIncomplete string // Always "thread.run.incomplete"
type ThreadRunQueued string // Always "thread.run.queued"
type ThreadRunRequiresAction string // Always "thread.run.requires_action"
type ThreadRunStep string // Always "thread.run.step"
type ThreadRunStepCancelled string // Always "thread.run.step.cancelled"
type ThreadRunStepCompleted string // Always "thread.run.step.completed"
type ThreadRunStepCreated string // Always "thread.run.step.created"
type ThreadRunStepDelta string // Always "thread.run.step.delta"
type ThreadRunStepExpired string // Always "thread.run.step.expired"
type ThreadRunStepFailed string // Always "thread.run.step.failed"
type ThreadRunStepInProgress string // Always "thread.run.step.in_progress"
type Tokens string // Always "tokens"
type Tool string // Always "tool"
type ToolCalls string // Always "tool_calls"
type TranscriptTextDelta string // Always "transcript.text.delta"
type TranscriptTextDone string // Always "transcript.text.done"
type Type string // Always "type"
type Upload string // Always "upload"
type UploadPart string // Always "upload.part"
type URLCitation string // Always "url_citation"
type User string // Always "user"
type VectorStore string // Always "vector_store"
type VectorStoreDeleted string // Always "vector_store.deleted"
type VectorStoreFile string // Always "vector_store.file"
type VectorStoreFileContentPage string // Always "vector_store.file_content.page"
type VectorStoreFileDeleted string // Always "vector_store.file.deleted"
type VectorStoreFilesBatch string // Always "vector_store.files_batch"
type VectorStoreSearchResultsPage string // Always "vector_store.search_results.page"
type Wait string // Always "wait"
type Wandb string // Always "wandb"
type WebSearchCall string // Always "web_search_call"
func (c Approximate) Default() Approximate { return "approximate" }
func (c Assistant) Default() Assistant { return "assistant" }
func (c AssistantDeleted) Default() AssistantDeleted { return "assistant.deleted" }
func (c Auto) Default() Auto { return "auto" }
func (c Batch) Default() Batch { return "batch" }
func (c BatchCancelled) Default() BatchCancelled { return "batch.cancelled" }
func (c BatchCompleted) Default() BatchCompleted { return "batch.completed" }
func (c BatchExpired) Default() BatchExpired { return "batch.expired" }
func (c BatchFailed) Default() BatchFailed { return "batch.failed" }
func (c ChatCompletion) Default() ChatCompletion { return "chat.completion" }
func (c ChatCompletionChunk) Default() ChatCompletionChunk { return "chat.completion.chunk" }
func (c ChatCompletionDeleted) Default() ChatCompletionDeleted { return "chat.completion.deleted" }
func (c CheckpointPermission) Default() CheckpointPermission { return "checkpoint.permission" }
func (c Click) Default() Click { return "click" }
func (c CodeInterpreter) Default() CodeInterpreter { return "code_interpreter" }
func (c CodeInterpreterCall) Default() CodeInterpreterCall { return "code_interpreter_call" }
func (c ComputerCallOutput) Default() ComputerCallOutput { return "computer_call_output" }
func (c ComputerScreenshot) Default() ComputerScreenshot { return "computer_screenshot" }
func (c ComputerUsePreview) Default() ComputerUsePreview { return "computer_use_preview" }
func (c ContainerFileCitation) Default() ContainerFileCitation { return "container_file_citation" }
func (c ContainerFile) Default() ContainerFile { return "container.file" }
func (c Content) Default() Content { return "content" }
func (c Developer) Default() Developer { return "developer" }
func (c DoubleClick) Default() DoubleClick { return "double_click" }
func (c Drag) Default() Drag { return "drag" }
func (c Duration) Default() Duration { return "duration" }
func (c Embedding) Default() Embedding { return "embedding" }
func (c Error) Default() Error { return "error" }
func (c EvalRunCanceled) Default() EvalRunCanceled { return "eval.run.canceled" }
func (c EvalRunFailed) Default() EvalRunFailed { return "eval.run.failed" }
func (c EvalRunSucceeded) Default() EvalRunSucceeded { return "eval.run.succeeded" }
func (c Exec) Default() Exec { return "exec" }
func (c File) Default() File { return "file" }
func (c FileCitation) Default() FileCitation { return "file_citation" }
func (c FilePath) Default() FilePath { return "file_path" }
func (c FileSearch) Default() FileSearch { return "file_search" }
func (c FileSearchCall) Default() FileSearchCall { return "file_search_call" }
func (c Find) Default() Find { return "find" }
func (c FineTuningJob) Default() FineTuningJob { return "fine_tuning.job" }
func (c FineTuningJobCancelled) Default() FineTuningJobCancelled { return "fine_tuning.job.cancelled" }
func (c FineTuningJobCheckpoint) Default() FineTuningJobCheckpoint {
return "fine_tuning.job.checkpoint"
}
func (c FineTuningJobEvent) Default() FineTuningJobEvent { return "fine_tuning.job.event" }
func (c FineTuningJobFailed) Default() FineTuningJobFailed { return "fine_tuning.job.failed" }
func (c FineTuningJobSucceeded) Default() FineTuningJobSucceeded { return "fine_tuning.job.succeeded" }
func (c Function) Default() Function { return "function" }
func (c FunctionCall) Default() FunctionCall { return "function_call" }
func (c FunctionCallOutput) Default() FunctionCallOutput { return "function_call_output" }
func (c Image) Default() Image { return "image" }
func (c ImageEditCompleted) Default() ImageEditCompleted { return "image_edit.completed" }
func (c ImageEditPartialImage) Default() ImageEditPartialImage { return "image_edit.partial_image" }
func (c ImageFile) Default() ImageFile { return "image_file" }
func (c ImageGeneration) Default() ImageGeneration { return "image_generation" }
func (c ImageGenerationCall) Default() ImageGenerationCall { return "image_generation_call" }
func (c ImageGenerationCompleted) Default() ImageGenerationCompleted {
return "image_generation.completed"
}
func (c ImageGenerationPartialImage) Default() ImageGenerationPartialImage {
return "image_generation.partial_image"
}
func (c ImageURL) Default() ImageURL { return "image_url" }
func (c InputAudio) Default() InputAudio { return "input_audio" }
func (c InputFile) Default() InputFile { return "input_file" }
func (c InputImage) Default() InputImage { return "input_image" }
func (c InputText) Default() InputText { return "input_text" }
func (c JSONObject) Default() JSONObject { return "json_object" }
func (c JSONSchema) Default() JSONSchema { return "json_schema" }
func (c Keypress) Default() Keypress { return "keypress" }
func (c LabelModel) Default() LabelModel { return "label_model" }
func (c LastActiveAt) Default() LastActiveAt { return "last_active_at" }
func (c List) Default() List { return "list" }
func (c LocalShell) Default() LocalShell { return "local_shell" }
func (c LocalShellCall) Default() LocalShellCall { return "local_shell_call" }
func (c LocalShellCallOutput) Default() LocalShellCallOutput { return "local_shell_call_output" }
func (c Logs) Default() Logs { return "logs" }
func (c Mcp) Default() Mcp { return "mcp" }
func (c McpApprovalRequest) Default() McpApprovalRequest { return "mcp_approval_request" }
func (c McpApprovalResponse) Default() McpApprovalResponse { return "mcp_approval_response" }
func (c McpCall) Default() McpCall { return "mcp_call" }
func (c McpListTools) Default() McpListTools { return "mcp_list_tools" }
func (c Message) Default() Message { return "message" }
func (c MessageCreation) Default() MessageCreation { return "message_creation" }
func (c Model) Default() Model { return "model" }
func (c Move) Default() Move { return "move" }
func (c Multi) Default() Multi { return "multi" }
func (c OpenPage) Default() OpenPage { return "open_page" }
func (c Other) Default() Other { return "other" }
func (c OutputAudio) Default() OutputAudio { return "output_audio" }
func (c OutputText) Default() OutputText { return "output_text" }
func (c Python) Default() Python { return "python" }
func (c Reasoning) Default() Reasoning { return "reasoning" }
func (c Refusal) Default() Refusal { return "refusal" }
func (c Response) Default() Response { return "response" }
func (c ResponseAudioDelta) Default() ResponseAudioDelta { return "response.audio.delta" }
func (c ResponseAudioDone) Default() ResponseAudioDone { return "response.audio.done" }
func (c ResponseAudioTranscriptDelta) Default() ResponseAudioTranscriptDelta {
return "response.audio.transcript.delta"
}
func (c ResponseAudioTranscriptDone) Default() ResponseAudioTranscriptDone {
return "response.audio.transcript.done"
}
func (c ResponseCancelled) Default() ResponseCancelled { return "response.cancelled" }
func (c ResponseCodeInterpreterCallCodeDelta) Default() ResponseCodeInterpreterCallCodeDelta {
return "response.code_interpreter_call_code.delta"
}
func (c ResponseCodeInterpreterCallCodeDone) Default() ResponseCodeInterpreterCallCodeDone {
return "response.code_interpreter_call_code.done"
}
func (c ResponseCodeInterpreterCallCompleted) Default() ResponseCodeInterpreterCallCompleted {
return "response.code_interpreter_call.completed"
}
func (c ResponseCodeInterpreterCallInProgress) Default() ResponseCodeInterpreterCallInProgress {
return "response.code_interpreter_call.in_progress"
}
func (c ResponseCodeInterpreterCallInterpreting) Default() ResponseCodeInterpreterCallInterpreting {
return "response.code_interpreter_call.interpreting"
}
func (c ResponseCompleted) Default() ResponseCompleted { return "response.completed" }
func (c ResponseContentPartAdded) Default() ResponseContentPartAdded {
return "response.content_part.added"
}
func (c ResponseContentPartDone) Default() ResponseContentPartDone {
return "response.content_part.done"
}
func (c ResponseCreated) Default() ResponseCreated { return "response.created" }
func (c ResponseFailed) Default() ResponseFailed { return "response.failed" }
func (c ResponseFileSearchCallCompleted) Default() ResponseFileSearchCallCompleted {
return "response.file_search_call.completed"
}
func (c ResponseFileSearchCallInProgress) Default() ResponseFileSearchCallInProgress {
return "response.file_search_call.in_progress"
}
func (c ResponseFileSearchCallSearching) Default() ResponseFileSearchCallSearching {
return "response.file_search_call.searching"
}
func (c ResponseFunctionCallArgumentsDelta) Default() ResponseFunctionCallArgumentsDelta {
return "response.function_call_arguments.delta"
}
func (c ResponseFunctionCallArgumentsDone) Default() ResponseFunctionCallArgumentsDone {
return "response.function_call_arguments.done"
}
func (c ResponseImageGenerationCallCompleted) Default() ResponseImageGenerationCallCompleted {
return "response.image_generation_call.completed"
}
func (c ResponseImageGenerationCallGenerating) Default() ResponseImageGenerationCallGenerating {
return "response.image_generation_call.generating"
}
func (c ResponseImageGenerationCallInProgress) Default() ResponseImageGenerationCallInProgress {
return "response.image_generation_call.in_progress"
}
func (c ResponseImageGenerationCallPartialImage) Default() ResponseImageGenerationCallPartialImage {
return "response.image_generation_call.partial_image"
}
func (c ResponseInProgress) Default() ResponseInProgress { return "response.in_progress" }
func (c ResponseIncomplete) Default() ResponseIncomplete { return "response.incomplete" }
func (c ResponseMcpCallArgumentsDelta) Default() ResponseMcpCallArgumentsDelta {
return "response.mcp_call_arguments.delta"
}
func (c ResponseMcpCallArgumentsDone) Default() ResponseMcpCallArgumentsDone {
return "response.mcp_call_arguments.done"
}
func (c ResponseMcpCallCompleted) Default() ResponseMcpCallCompleted {
return "response.mcp_call.completed"
}
func (c ResponseMcpCallFailed) Default() ResponseMcpCallFailed { return "response.mcp_call.failed" }
func (c ResponseMcpCallInProgress) Default() ResponseMcpCallInProgress {
return "response.mcp_call.in_progress"
}
func (c ResponseMcpListToolsCompleted) Default() ResponseMcpListToolsCompleted {
return "response.mcp_list_tools.completed"
}
func (c ResponseMcpListToolsFailed) Default() ResponseMcpListToolsFailed {
return "response.mcp_list_tools.failed"
}
func (c ResponseMcpListToolsInProgress) Default() ResponseMcpListToolsInProgress {
return "response.mcp_list_tools.in_progress"
}
func (c ResponseOutputItemAdded) Default() ResponseOutputItemAdded {
return "response.output_item.added"
}
func (c ResponseOutputItemDone) Default() ResponseOutputItemDone { return "response.output_item.done" }
func (c ResponseOutputTextAnnotationAdded) Default() ResponseOutputTextAnnotationAdded {
return "response.output_text.annotation.added"
}
func (c ResponseOutputTextDelta) Default() ResponseOutputTextDelta {
return "response.output_text.delta"
}
func (c ResponseOutputTextDone) Default() ResponseOutputTextDone { return "response.output_text.done" }
func (c ResponseQueued) Default() ResponseQueued { return "response.queued" }
func (c ResponseReasoningSummaryPartAdded) Default() ResponseReasoningSummaryPartAdded {
return "response.reasoning_summary_part.added"
}
func (c ResponseReasoningSummaryPartDone) Default() ResponseReasoningSummaryPartDone {
return "response.reasoning_summary_part.done"
}
func (c ResponseReasoningSummaryTextDelta) Default() ResponseReasoningSummaryTextDelta {
return "response.reasoning_summary_text.delta"
}
func (c ResponseReasoningSummaryTextDone) Default() ResponseReasoningSummaryTextDone {
return "response.reasoning_summary_text.done"
}
func (c ResponseReasoningSummaryDelta) Default() ResponseReasoningSummaryDelta {
return "response.reasoning_summary.delta"
}
func (c ResponseReasoningSummaryDone) Default() ResponseReasoningSummaryDone {
return "response.reasoning_summary.done"
}
func (c ResponseRefusalDelta) Default() ResponseRefusalDelta { return "response.refusal.delta" }
func (c ResponseRefusalDone) Default() ResponseRefusalDone { return "response.refusal.done" }
func (c ResponseWebSearchCallCompleted) Default() ResponseWebSearchCallCompleted {
return "response.web_search_call.completed"
}
func (c ResponseWebSearchCallInProgress) Default() ResponseWebSearchCallInProgress {
return "response.web_search_call.in_progress"
}
func (c ResponseWebSearchCallSearching) Default() ResponseWebSearchCallSearching {
return "response.web_search_call.searching"
}
func (c ScoreModel) Default() ScoreModel { return "score_model" }
func (c Screenshot) Default() Screenshot { return "screenshot" }
func (c Scroll) Default() Scroll { return "scroll" }
func (c Search) Default() Search { return "search" }
func (c Static) Default() Static { return "static" }
func (c StringCheck) Default() StringCheck { return "string_check" }
func (c SubmitToolOutputs) Default() SubmitToolOutputs { return "submit_tool_outputs" }
func (c SummaryText) Default() SummaryText { return "summary_text" }
func (c System) Default() System { return "system" }
func (c Text) Default() Text { return "text" }
func (c TextCompletion) Default() TextCompletion { return "text_completion" }
func (c TextSimilarity) Default() TextSimilarity { return "text_similarity" }
func (c Thread) Default() Thread { return "thread" }
func (c ThreadCreated) Default() ThreadCreated { return "thread.created" }
func (c ThreadDeleted) Default() ThreadDeleted { return "thread.deleted" }
func (c ThreadMessage) Default() ThreadMessage { return "thread.message" }
func (c ThreadMessageCompleted) Default() ThreadMessageCompleted { return "thread.message.completed" }
func (c ThreadMessageCreated) Default() ThreadMessageCreated { return "thread.message.created" }
func (c ThreadMessageDeleted) Default() ThreadMessageDeleted { return "thread.message.deleted" }
func (c ThreadMessageDelta) Default() ThreadMessageDelta { return "thread.message.delta" }
func (c ThreadMessageInProgress) Default() ThreadMessageInProgress {
return "thread.message.in_progress"
}
func (c ThreadMessageIncomplete) Default() ThreadMessageIncomplete {
return "thread.message.incomplete"
}
func (c ThreadRun) Default() ThreadRun { return "thread.run" }
func (c ThreadRunCancelled) Default() ThreadRunCancelled { return "thread.run.cancelled" }
func (c ThreadRunCancelling) Default() ThreadRunCancelling { return "thread.run.cancelling" }
func (c ThreadRunCompleted) Default() ThreadRunCompleted { return "thread.run.completed" }
func (c ThreadRunCreated) Default() ThreadRunCreated { return "thread.run.created" }
func (c ThreadRunExpired) Default() ThreadRunExpired { return "thread.run.expired" }
func (c ThreadRunFailed) Default() ThreadRunFailed { return "thread.run.failed" }
func (c ThreadRunInProgress) Default() ThreadRunInProgress { return "thread.run.in_progress" }
func (c ThreadRunIncomplete) Default() ThreadRunIncomplete { return "thread.run.incomplete" }
func (c ThreadRunQueued) Default() ThreadRunQueued { return "thread.run.queued" }
func (c ThreadRunRequiresAction) Default() ThreadRunRequiresAction {
return "thread.run.requires_action"
}
func (c ThreadRunStep) Default() ThreadRunStep { return "thread.run.step" }
func (c ThreadRunStepCancelled) Default() ThreadRunStepCancelled { return "thread.run.step.cancelled" }
func (c ThreadRunStepCompleted) Default() ThreadRunStepCompleted { return "thread.run.step.completed" }
func (c ThreadRunStepCreated) Default() ThreadRunStepCreated { return "thread.run.step.created" }
func (c ThreadRunStepDelta) Default() ThreadRunStepDelta { return "thread.run.step.delta" }
func (c ThreadRunStepExpired) Default() ThreadRunStepExpired { return "thread.run.step.expired" }
func (c ThreadRunStepFailed) Default() ThreadRunStepFailed { return "thread.run.step.failed" }
func (c ThreadRunStepInProgress) Default() ThreadRunStepInProgress {
return "thread.run.step.in_progress"
}
func (c Tokens) Default() Tokens { return "tokens" }
func (c Tool) Default() Tool { return "tool" }
func (c ToolCalls) Default() ToolCalls { return "tool_calls" }
func (c TranscriptTextDelta) Default() TranscriptTextDelta { return "transcript.text.delta" }
func (c TranscriptTextDone) Default() TranscriptTextDone { return "transcript.text.done" }
func (c Type) Default() Type { return "type" }
func (c Upload) Default() Upload { return "upload" }
func (c UploadPart) Default() UploadPart { return "upload.part" }
func (c URLCitation) Default() URLCitation { return "url_citation" }
func (c User) Default() User { return "user" }
func (c VectorStore) Default() VectorStore { return "vector_store" }
func (c VectorStoreDeleted) Default() VectorStoreDeleted { return "vector_store.deleted" }
func (c VectorStoreFile) Default() VectorStoreFile { return "vector_store.file" }
func (c VectorStoreFileContentPage) Default() VectorStoreFileContentPage {
return "vector_store.file_content.page"
}
func (c VectorStoreFileDeleted) Default() VectorStoreFileDeleted { return "vector_store.file.deleted" }
func (c VectorStoreFilesBatch) Default() VectorStoreFilesBatch { return "vector_store.files_batch" }
func (c VectorStoreSearchResultsPage) Default() VectorStoreSearchResultsPage {
return "vector_store.search_results.page"
}
func (c Wait) Default() Wait { return "wait" }
func (c Wandb) Default() Wandb { return "wandb" }
func (c WebSearchCall) Default() WebSearchCall { return "web_search_call" }
func (c Approximate) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Assistant) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c AssistantDeleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Auto) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Batch) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c BatchCancelled) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c BatchCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c BatchExpired) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c BatchFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ChatCompletion) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ChatCompletionChunk) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ChatCompletionDeleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c CheckpointPermission) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Click) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c CodeInterpreter) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c CodeInterpreterCall) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ComputerCallOutput) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ComputerScreenshot) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ComputerUsePreview) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ContainerFileCitation) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ContainerFile) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Content) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Developer) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c DoubleClick) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Drag) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Duration) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Embedding) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Error) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c EvalRunCanceled) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c EvalRunFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c EvalRunSucceeded) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Exec) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c File) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FileCitation) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FilePath) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FileSearch) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FileSearchCall) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Find) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FineTuningJob) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FineTuningJobCancelled) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FineTuningJobCheckpoint) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FineTuningJobEvent) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FineTuningJobFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FineTuningJobSucceeded) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Function) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FunctionCall) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c FunctionCallOutput) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Image) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageEditCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageEditPartialImage) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageFile) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageGeneration) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageGenerationCall) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageGenerationCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageGenerationPartialImage) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ImageURL) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c InputAudio) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c InputFile) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c InputImage) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c InputText) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c JSONObject) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c JSONSchema) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Keypress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c LabelModel) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c LastActiveAt) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c List) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c LocalShell) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c LocalShellCall) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c LocalShellCallOutput) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Logs) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Mcp) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c McpApprovalRequest) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c McpApprovalResponse) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c McpCall) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c McpListTools) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Message) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c MessageCreation) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Model) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Move) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Multi) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c OpenPage) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Other) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c OutputAudio) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c OutputText) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Python) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Reasoning) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Refusal) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Response) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseAudioDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseAudioDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseAudioTranscriptDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseAudioTranscriptDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseCancelled) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseCodeInterpreterCallCodeDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseCodeInterpreterCallCodeDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseCodeInterpreterCallCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseCodeInterpreterCallInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseCodeInterpreterCallInterpreting) MarshalJSON() ([]byte, error) {
return marshalString(c)
}
func (c ResponseCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseContentPartAdded) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseContentPartDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseCreated) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseFileSearchCallCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseFileSearchCallInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseFileSearchCallSearching) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseFunctionCallArgumentsDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseFunctionCallArgumentsDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseImageGenerationCallCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseImageGenerationCallGenerating) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseImageGenerationCallInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseImageGenerationCallPartialImage) MarshalJSON() ([]byte, error) {
return marshalString(c)
}
func (c ResponseInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseIncomplete) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpCallArgumentsDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpCallArgumentsDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpCallCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpCallFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpCallInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpListToolsCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpListToolsFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseMcpListToolsInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseOutputItemAdded) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseOutputItemDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseOutputTextAnnotationAdded) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseOutputTextDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseOutputTextDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseQueued) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseReasoningSummaryPartAdded) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseReasoningSummaryPartDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseReasoningSummaryTextDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseReasoningSummaryTextDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseReasoningSummaryDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseReasoningSummaryDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseRefusalDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseRefusalDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseWebSearchCallCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseWebSearchCallInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ResponseWebSearchCallSearching) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ScoreModel) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Screenshot) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Scroll) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Search) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Static) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c StringCheck) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c SubmitToolOutputs) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c SummaryText) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c System) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Text) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c TextCompletion) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c TextSimilarity) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Thread) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadCreated) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadDeleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadMessage) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadMessageCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadMessageCreated) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadMessageDeleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadMessageDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadMessageInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadMessageIncomplete) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRun) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunCancelled) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunCancelling) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunCreated) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunExpired) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunIncomplete) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunQueued) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunRequiresAction) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStep) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStepCancelled) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStepCompleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStepCreated) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStepDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStepExpired) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStepFailed) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ThreadRunStepInProgress) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Tokens) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Tool) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c ToolCalls) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c TranscriptTextDelta) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c TranscriptTextDone) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Type) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Upload) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c UploadPart) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c URLCitation) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c User) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c VectorStore) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c VectorStoreDeleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c VectorStoreFile) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c VectorStoreFileContentPage) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c VectorStoreFileDeleted) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c VectorStoreFilesBatch) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c VectorStoreSearchResultsPage) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Wait) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c Wandb) MarshalJSON() ([]byte, error) { return marshalString(c) }
func (c WebSearchCall) MarshalJSON() ([]byte, error) { return marshalString(c) }
type constant[T any] interface {
Constant[T]
*T
}
func marshalString[T ~string, PT constant[T]](v T) ([]byte, error) {
var zero T
if v == zero {
v = PT(&v).Default()
}
return json.Marshal(string(v))
}

796
vendor/github.com/openai/openai-go/shared/shared.go generated vendored Normal file
View File

@@ -0,0 +1,796 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package shared
import (
"encoding/json"
"github.com/openai/openai-go/internal/apijson"
"github.com/openai/openai-go/packages/param"
"github.com/openai/openai-go/packages/respjson"
"github.com/openai/openai-go/shared/constant"
)
// aliased to make [param.APIUnion] private when embedding
type paramUnion = param.APIUnion
type paramObj = param.APIObject
type ChatModel = string
type ResponsesModel = string
// aliased to make [param.APIObject] private when embedding
const (
ChatModelGPT4_1 ChatModel = "gpt-4.1"
ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"
ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"
ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"
ChatModelGPT4_1Mini2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"
ChatModelGPT4_1Nano2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"
ChatModelO4Mini ChatModel = "o4-mini"
ChatModelO4Mini2025_04_16 ChatModel = "o4-mini-2025-04-16"
ChatModelO3 ChatModel = "o3"
ChatModelO3_2025_04_16 ChatModel = "o3-2025-04-16"
ChatModelO3Mini ChatModel = "o3-mini"
ChatModelO3Mini2025_01_31 ChatModel = "o3-mini-2025-01-31"
ChatModelO1 ChatModel = "o1"
ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"
ChatModelO1Preview ChatModel = "o1-preview"
ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"
ChatModelO1Mini ChatModel = "o1-mini"
ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"
ChatModelGPT4o ChatModel = "gpt-4o"
ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"
ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"
ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"
ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"
ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"
ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"
ChatModelGPT4oAudioPreview2025_06_03 ChatModel = "gpt-4o-audio-preview-2025-06-03"
ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"
ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"
ChatModelGPT4oSearchPreview ChatModel = "gpt-4o-search-preview"
ChatModelGPT4oMiniSearchPreview ChatModel = "gpt-4o-mini-search-preview"
ChatModelGPT4oSearchPreview2025_03_11 ChatModel = "gpt-4o-search-preview-2025-03-11"
ChatModelGPT4oMiniSearchPreview2025_03_11 ChatModel = "gpt-4o-mini-search-preview-2025-03-11"
ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"
ChatModelCodexMiniLatest ChatModel = "codex-mini-latest"
ChatModelGPT4oMini ChatModel = "gpt-4o-mini"
ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"
ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"
ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"
ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"
ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"
ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"
ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"
ChatModelGPT4 ChatModel = "gpt-4"
ChatModelGPT4_0314 ChatModel = "gpt-4-0314"
ChatModelGPT4_0613 ChatModel = "gpt-4-0613"
ChatModelGPT4_32k ChatModel = "gpt-4-32k"
ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"
ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"
ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"
ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"
ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"
ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"
ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"
ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"
ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"
)
// A filter used to compare a specified attribute key to a given value using a
// defined comparison operation.
type ComparisonFilter struct {
// The key to compare against the value.
Key string `json:"key,required"`
// 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
//
// Any of "eq", "ne", "gt", "gte", "lt", "lte".
Type ComparisonFilterType `json:"type,required"`
// The value to compare against the attribute key; supports string, number, or
// boolean types.
Value ComparisonFilterValueUnion `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r ComparisonFilter) RawJSON() string { return r.JSON.raw }
func (r *ComparisonFilter) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// ToParam converts this ComparisonFilter to a ComparisonFilterParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// ComparisonFilterParam.Overrides()
func (r ComparisonFilter) ToParam() ComparisonFilterParam {
return param.Override[ComparisonFilterParam](json.RawMessage(r.RawJSON()))
}
// 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
type ComparisonFilterType string
const (
ComparisonFilterTypeEq ComparisonFilterType = "eq"
ComparisonFilterTypeNe ComparisonFilterType = "ne"
ComparisonFilterTypeGt ComparisonFilterType = "gt"
ComparisonFilterTypeGte ComparisonFilterType = "gte"
ComparisonFilterTypeLt ComparisonFilterType = "lt"
ComparisonFilterTypeLte ComparisonFilterType = "lte"
)
// ComparisonFilterValueUnion contains all possible properties and values from
// [string], [float64], [bool].
//
// Use the methods beginning with 'As' to cast the union to one of its variants.
//
// If the underlying value is not a json object, one of the following properties
// will be valid: OfString OfFloat OfBool]
type ComparisonFilterValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
raw string
} `json:"-"`
}
func (u ComparisonFilterValueUnion) AsString() (v string) {
apijson.UnmarshalRoot(json.RawMessage(u.JSON.raw), &v)
return
}
func (u ComparisonFilterValueUnion) AsFloat() (v float64) {
apijson.UnmarshalRoot(json.RawMessage(u.JSON.raw), &v)
return
}
func (u ComparisonFilterValueUnion) AsBool() (v bool) {
apijson.UnmarshalRoot(json.RawMessage(u.JSON.raw), &v)
return
}
// Returns the unmodified JSON received from the API
func (u ComparisonFilterValueUnion) RawJSON() string { return u.JSON.raw }
func (r *ComparisonFilterValueUnion) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// A filter used to compare a specified attribute key to a given value using a
// defined comparison operation.
//
// The properties Key, Type, Value are required.
type ComparisonFilterParam struct {
// The key to compare against the value.
Key string `json:"key,required"`
// 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
//
// Any of "eq", "ne", "gt", "gte", "lt", "lte".
Type ComparisonFilterType `json:"type,omitzero,required"`
// The value to compare against the attribute key; supports string, number, or
// boolean types.
Value ComparisonFilterValueUnionParam `json:"value,omitzero,required"`
paramObj
}
func (r ComparisonFilterParam) MarshalJSON() (data []byte, err error) {
type shadow ComparisonFilterParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *ComparisonFilterParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// Only one field can be non-zero.
//
// Use [param.IsOmitted] to confirm if a field is set.
type ComparisonFilterValueUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
paramUnion
}
func (u ComparisonFilterValueUnionParam) MarshalJSON() ([]byte, error) {
return param.MarshalUnion(u, u.OfString, u.OfFloat, u.OfBool)
}
func (u *ComparisonFilterValueUnionParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, u)
}
func (u *ComparisonFilterValueUnionParam) asAny() any {
if !param.IsOmitted(u.OfString) {
return &u.OfString.Value
} else if !param.IsOmitted(u.OfFloat) {
return &u.OfFloat.Value
} else if !param.IsOmitted(u.OfBool) {
return &u.OfBool.Value
}
return nil
}
// Combine multiple filters using `and` or `or`.
type CompoundFilter struct {
// Array of filters to combine. Items can be `ComparisonFilter` or
// `CompoundFilter`.
Filters []ComparisonFilter `json:"filters,required"`
// Type of operation: `and` or `or`.
//
// Any of "and", "or".
Type CompoundFilterType `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Filters respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r CompoundFilter) RawJSON() string { return r.JSON.raw }
func (r *CompoundFilter) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// ToParam converts this CompoundFilter to a CompoundFilterParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// CompoundFilterParam.Overrides()
func (r CompoundFilter) ToParam() CompoundFilterParam {
return param.Override[CompoundFilterParam](json.RawMessage(r.RawJSON()))
}
// Type of operation: `and` or `or`.
type CompoundFilterType string
const (
CompoundFilterTypeAnd CompoundFilterType = "and"
CompoundFilterTypeOr CompoundFilterType = "or"
)
// Combine multiple filters using `and` or `or`.
//
// The properties Filters, Type are required.
type CompoundFilterParam struct {
// Array of filters to combine. Items can be `ComparisonFilter` or
// `CompoundFilter`.
Filters []ComparisonFilterParam `json:"filters,omitzero,required"`
// Type of operation: `and` or `or`.
//
// Any of "and", "or".
Type CompoundFilterType `json:"type,omitzero,required"`
paramObj
}
func (r CompoundFilterParam) MarshalJSON() (data []byte, err error) {
type shadow CompoundFilterParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *CompoundFilterParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
type ErrorObject struct {
Code string `json:"code,required"`
Message string `json:"message,required"`
Param string `json:"param,required"`
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Message respjson.Field
Param respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r ErrorObject) RawJSON() string { return r.JSON.raw }
func (r *ErrorObject) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
type FunctionDefinition struct {
// The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
// underscores and dashes, with a maximum length of 64.
Name string `json:"name,required"`
// A description of what the function does, used by the model to choose when and
// how to call the function.
Description string `json:"description"`
// 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.
Parameters FunctionParameters `json:"parameters"`
// Whether to enable strict schema adherence when generating the function call. If
// set to true, the model will follow the exact schema defined in the `parameters`
// field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn
// more about Structured Outputs in the
// [function calling guide](https://platform.openai.com/docs/guides/function-calling).
Strict bool `json:"strict,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Description respjson.Field
Parameters respjson.Field
Strict respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r FunctionDefinition) RawJSON() string { return r.JSON.raw }
func (r *FunctionDefinition) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// ToParam converts this FunctionDefinition to a FunctionDefinitionParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// FunctionDefinitionParam.Overrides()
func (r FunctionDefinition) ToParam() FunctionDefinitionParam {
return param.Override[FunctionDefinitionParam](json.RawMessage(r.RawJSON()))
}
// The property Name is required.
type FunctionDefinitionParam struct {
// The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
// underscores and dashes, with a maximum length of 64.
Name string `json:"name,required"`
// Whether to enable strict schema adherence when generating the function call. If
// set to true, the model will follow the exact schema defined in the `parameters`
// field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn
// more about Structured Outputs in the
// [function calling guide](https://platform.openai.com/docs/guides/function-calling).
Strict param.Opt[bool] `json:"strict,omitzero"`
// A description of what the function does, used by the model to choose when and
// how to call the function.
Description param.Opt[string] `json:"description,omitzero"`
// 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.
Parameters FunctionParameters `json:"parameters,omitzero"`
paramObj
}
func (r FunctionDefinitionParam) MarshalJSON() (data []byte, err error) {
type shadow FunctionDefinitionParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *FunctionDefinitionParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
type FunctionParameters map[string]any
type Metadata map[string]string
// **o-series models only**
//
// Configuration options for
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
type Reasoning struct {
// **o-series models only**
//
// Constrains effort on reasoning for
// [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
// supported values are `low`, `medium`, and `high`. Reducing reasoning effort can
// result in faster responses and fewer tokens used on reasoning in a response.
//
// Any of "low", "medium", "high".
Effort ReasoningEffort `json:"effort,nullable"`
// **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`.
//
// Any of "auto", "concise", "detailed".
//
// Deprecated: deprecated
GenerateSummary ReasoningGenerateSummary `json:"generate_summary,nullable"`
// 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`.
//
// Any of "auto", "concise", "detailed".
Summary ReasoningSummary `json:"summary,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Effort respjson.Field
GenerateSummary respjson.Field
Summary respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r Reasoning) RawJSON() string { return r.JSON.raw }
func (r *Reasoning) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// ToParam converts this Reasoning to a ReasoningParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// ReasoningParam.Overrides()
func (r Reasoning) ToParam() ReasoningParam {
return param.Override[ReasoningParam](json.RawMessage(r.RawJSON()))
}
// **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`.
type ReasoningGenerateSummary string
const (
ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
)
// 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`.
type ReasoningSummary string
const (
ReasoningSummaryAuto ReasoningSummary = "auto"
ReasoningSummaryConcise ReasoningSummary = "concise"
ReasoningSummaryDetailed ReasoningSummary = "detailed"
)
// **o-series models only**
//
// Configuration options for
// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
type ReasoningParam struct {
// **o-series models only**
//
// Constrains effort on reasoning for
// [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
// supported values are `low`, `medium`, and `high`. Reducing reasoning effort can
// result in faster responses and fewer tokens used on reasoning in a response.
//
// Any of "low", "medium", "high".
Effort ReasoningEffort `json:"effort,omitzero"`
// **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`.
//
// Any of "auto", "concise", "detailed".
//
// Deprecated: deprecated
GenerateSummary ReasoningGenerateSummary `json:"generate_summary,omitzero"`
// 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`.
//
// Any of "auto", "concise", "detailed".
Summary ReasoningSummary `json:"summary,omitzero"`
paramObj
}
func (r ReasoningParam) MarshalJSON() (data []byte, err error) {
type shadow ReasoningParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *ReasoningParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// **o-series models only**
//
// Constrains effort on reasoning for
// [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
// supported values are `low`, `medium`, and `high`. Reducing reasoning effort can
// result in faster responses and fewer tokens used on reasoning in a response.
type ReasoningEffort string
const (
ReasoningEffortLow ReasoningEffort = "low"
ReasoningEffortMedium ReasoningEffort = "medium"
ReasoningEffortHigh ReasoningEffort = "high"
)
// 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 ResponseFormatJSONObject struct {
// The type of response format being defined. Always `json_object`.
Type constant.JSONObject `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r ResponseFormatJSONObject) RawJSON() string { return r.JSON.raw }
func (r *ResponseFormatJSONObject) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
func (ResponseFormatJSONObject) ImplResponseFormatTextConfigUnion() {}
// ToParam converts this ResponseFormatJSONObject to a
// ResponseFormatJSONObjectParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// ResponseFormatJSONObjectParam.Overrides()
func (r ResponseFormatJSONObject) ToParam() ResponseFormatJSONObjectParam {
return param.Override[ResponseFormatJSONObjectParam](json.RawMessage(r.RawJSON()))
}
func NewResponseFormatJSONObjectParam() ResponseFormatJSONObjectParam {
return ResponseFormatJSONObjectParam{
Type: "json_object",
}
}
// 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 struct has a constant value, construct it with
// [NewResponseFormatJSONObjectParam].
type ResponseFormatJSONObjectParam struct {
// The type of response format being defined. Always `json_object`.
Type constant.JSONObject `json:"type,required"`
paramObj
}
func (r ResponseFormatJSONObjectParam) MarshalJSON() (data []byte, err error) {
type shadow ResponseFormatJSONObjectParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *ResponseFormatJSONObjectParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// JSON Schema response format. Used to generate structured JSON responses. Learn
// more about
// [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
type ResponseFormatJSONSchema struct {
// Structured Outputs configuration options, including a JSON Schema.
JSONSchema ResponseFormatJSONSchemaJSONSchema `json:"json_schema,required"`
// The type of response format being defined. Always `json_schema`.
Type constant.JSONSchema `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
JSONSchema respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r ResponseFormatJSONSchema) RawJSON() string { return r.JSON.raw }
func (r *ResponseFormatJSONSchema) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// ToParam converts this ResponseFormatJSONSchema to a
// ResponseFormatJSONSchemaParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// ResponseFormatJSONSchemaParam.Overrides()
func (r ResponseFormatJSONSchema) ToParam() ResponseFormatJSONSchemaParam {
return param.Override[ResponseFormatJSONSchemaParam](json.RawMessage(r.RawJSON()))
}
// Structured Outputs configuration options, including a JSON Schema.
type ResponseFormatJSONSchemaJSONSchema struct {
// 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,required"`
// 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"`
// The schema for the response format, described as a JSON Schema object. Learn how
// to build JSON schemas [here](https://json-schema.org/).
Schema map[string]any `json:"schema"`
// Whether to enable strict schema adherence when generating the output. If set to
// true, the model will always follow the exact schema defined in the `schema`
// field. Only a subset of JSON Schema is supported when `strict` is `true`. To
// learn more, read the
// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
Strict bool `json:"strict,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Description respjson.Field
Schema respjson.Field
Strict respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r ResponseFormatJSONSchemaJSONSchema) RawJSON() string { return r.JSON.raw }
func (r *ResponseFormatJSONSchemaJSONSchema) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// JSON Schema response format. Used to generate structured JSON responses. Learn
// more about
// [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
//
// The properties JSONSchema, Type are required.
type ResponseFormatJSONSchemaParam struct {
// Structured Outputs configuration options, including a JSON Schema.
JSONSchema ResponseFormatJSONSchemaJSONSchemaParam `json:"json_schema,omitzero,required"`
// The type of response format being defined. Always `json_schema`.
//
// This field can be elided, and will marshal its zero value as "json_schema".
Type constant.JSONSchema `json:"type,required"`
paramObj
}
func (r ResponseFormatJSONSchemaParam) MarshalJSON() (data []byte, err error) {
type shadow ResponseFormatJSONSchemaParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *ResponseFormatJSONSchemaParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// Structured Outputs configuration options, including a JSON Schema.
//
// The property Name is required.
type ResponseFormatJSONSchemaJSONSchemaParam struct {
// 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,required"`
// Whether to enable strict schema adherence when generating the output. If set to
// true, the model will always follow the exact schema defined in the `schema`
// field. Only a subset of JSON Schema is supported when `strict` is `true`. To
// learn more, read the
// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
Strict param.Opt[bool] `json:"strict,omitzero"`
// A description of what the response format is for, used by the model to determine
// how to respond in the format.
Description param.Opt[string] `json:"description,omitzero"`
// The schema for the response format, described as a JSON Schema object. Learn how
// to build JSON schemas [here](https://json-schema.org/).
Schema any `json:"schema,omitzero"`
paramObj
}
func (r ResponseFormatJSONSchemaJSONSchemaParam) MarshalJSON() (data []byte, err error) {
type shadow ResponseFormatJSONSchemaJSONSchemaParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *ResponseFormatJSONSchemaJSONSchemaParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// Default response format. Used to generate text responses.
type ResponseFormatText struct {
// The type of response format being defined. Always `text`.
Type constant.Text `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}
// Returns the unmodified JSON received from the API
func (r ResponseFormatText) RawJSON() string { return r.JSON.raw }
func (r *ResponseFormatText) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
func (ResponseFormatText) ImplResponseFormatTextConfigUnion() {}
// ToParam converts this ResponseFormatText to a ResponseFormatTextParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// ResponseFormatTextParam.Overrides()
func (r ResponseFormatText) ToParam() ResponseFormatTextParam {
return param.Override[ResponseFormatTextParam](json.RawMessage(r.RawJSON()))
}
func NewResponseFormatTextParam() ResponseFormatTextParam {
return ResponseFormatTextParam{
Type: "text",
}
}
// Default response format. Used to generate text responses.
//
// This struct has a constant value, construct it with
// [NewResponseFormatTextParam].
type ResponseFormatTextParam struct {
// The type of response format being defined. Always `text`.
Type constant.Text `json:"type,required"`
paramObj
}
func (r ResponseFormatTextParam) MarshalJSON() (data []byte, err error) {
type shadow ResponseFormatTextParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *ResponseFormatTextParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
// ResponsesModel also accepts any [string] or [ChatModel]
const (
ResponsesModelO1Pro ResponsesModel = "o1-pro"
ResponsesModelO1Pro2025_03_19 ResponsesModel = "o1-pro-2025-03-19"
ResponsesModelO3Pro ResponsesModel = "o3-pro"
ResponsesModelO3Pro2025_06_10 ResponsesModel = "o3-pro-2025-06-10"
ResponsesModelO3DeepResearch ResponsesModel = "o3-deep-research"
ResponsesModelO3DeepResearch2025_06_26 ResponsesModel = "o3-deep-research-2025-06-26"
ResponsesModelO4MiniDeepResearch ResponsesModel = "o4-mini-deep-research"
ResponsesModelO4MiniDeepResearch2025_06_26 ResponsesModel = "o4-mini-deep-research-2025-06-26"
ResponsesModelComputerUsePreview ResponsesModel = "computer-use-preview"
ResponsesModelComputerUsePreview2025_03_11 ResponsesModel = "computer-use-preview-2025-03-11"
// Or some ...[ChatModel]
)