glopenai/response
Types
Tagged by “type”.
pub type Annotation {
AnnotationFileCitation(FileCitationBody)
AnnotationUrlCitation(UrlCitationBody)
AnnotationContainerFileCitation(ContainerFileCitationBody)
AnnotationFilePath(FilePathAnnotation)
}
Constructors
-
AnnotationFileCitation(FileCitationBody) -
AnnotationUrlCitation(UrlCitationBody) -
AnnotationContainerFileCitation(ContainerFileCitationBody) -
AnnotationFilePath(FilePathAnnotation)
pub type ApplyPatchCallOutputStatusParam {
ApplyPatchOutputCompleted
ApplyPatchOutputFailed
}
Constructors
-
ApplyPatchOutputCompleted -
ApplyPatchOutputFailed
pub type ApplyPatchCallStatusParam {
ApplyPatchInProgress
ApplyPatchCompleted
}
Constructors
-
ApplyPatchInProgress -
ApplyPatchCompleted
pub type ApplyPatchCreateFileOperation {
ApplyPatchCreateFileOperation(path: String, diff: String)
}
Constructors
-
ApplyPatchCreateFileOperation(path: String, diff: String)
pub type ApplyPatchCreateFileOperationParam {
ApplyPatchCreateFileOperationParam(path: String, diff: String)
}
Constructors
-
ApplyPatchCreateFileOperationParam(path: String, diff: String)
pub type ApplyPatchDeleteFileOperation {
ApplyPatchDeleteFileOperation(path: String)
}
Constructors
-
ApplyPatchDeleteFileOperation(path: String)
pub type ApplyPatchDeleteFileOperationParam {
ApplyPatchDeleteFileOperationParam(path: String)
}
Constructors
-
ApplyPatchDeleteFileOperationParam(path: String)
Tagged by “type”.
pub type ApplyPatchOperation {
ApplyPatchCreateFile(ApplyPatchCreateFileOperation)
ApplyPatchDeleteFile(ApplyPatchDeleteFileOperation)
ApplyPatchUpdateFile(ApplyPatchUpdateFileOperation)
}
Constructors
-
ApplyPatchCreateFile(ApplyPatchCreateFileOperation) -
ApplyPatchDeleteFile(ApplyPatchDeleteFileOperation) -
ApplyPatchUpdateFile(ApplyPatchUpdateFileOperation)
Tagged by “type”.
pub type ApplyPatchOperationParam {
ApplyPatchOpCreateFile(ApplyPatchCreateFileOperationParam)
ApplyPatchOpDeleteFile(ApplyPatchDeleteFileOperationParam)
ApplyPatchOpUpdateFile(ApplyPatchUpdateFileOperationParam)
}
Constructors
-
ApplyPatchOpCreateFile(ApplyPatchCreateFileOperationParam) -
ApplyPatchOpDeleteFile(ApplyPatchDeleteFileOperationParam) -
ApplyPatchOpUpdateFile(ApplyPatchUpdateFileOperationParam)
pub type ApplyPatchToolCall {
ApplyPatchToolCall(
id: String,
call_id: String,
status: ApplyPatchCallStatusParam,
operation: ApplyPatchOperation,
created_by: option.Option(String),
)
}
Constructors
-
ApplyPatchToolCall( id: String, call_id: String, status: ApplyPatchCallStatusParam, operation: ApplyPatchOperation, created_by: option.Option(String), )
pub type ApplyPatchToolCallItemParam {
ApplyPatchToolCallItemParam(
id: option.Option(String),
call_id: String,
status: ApplyPatchCallStatusParam,
operation: ApplyPatchOperationParam,
)
}
Constructors
-
ApplyPatchToolCallItemParam( id: option.Option(String), call_id: String, status: ApplyPatchCallStatusParam, operation: ApplyPatchOperationParam, )
pub type ApplyPatchToolCallOutput {
ApplyPatchToolCallOutput(
id: String,
call_id: String,
status: ApplyPatchCallOutputStatusParam,
output: option.Option(String),
created_by: option.Option(String),
)
}
Constructors
-
ApplyPatchToolCallOutput( id: String, call_id: String, status: ApplyPatchCallOutputStatusParam, output: option.Option(String), created_by: option.Option(String), )
pub type ApplyPatchToolCallOutputItemParam {
ApplyPatchToolCallOutputItemParam(
id: option.Option(String),
call_id: String,
status: ApplyPatchCallOutputStatusParam,
output: option.Option(String),
)
}
Constructors
-
ApplyPatchToolCallOutputItemParam( id: option.Option(String), call_id: String, status: ApplyPatchCallOutputStatusParam, output: option.Option(String), )
pub type ApplyPatchUpdateFileOperation {
ApplyPatchUpdateFileOperation(path: String, diff: String)
}
Constructors
-
ApplyPatchUpdateFileOperation(path: String, diff: String)
pub type ApplyPatchUpdateFileOperationParam {
ApplyPatchUpdateFileOperationParam(path: String, diff: String)
}
Constructors
-
ApplyPatchUpdateFileOperationParam(path: String, diff: String)
pub type ClickButtonType {
ClickLeft
ClickRight
ClickWheel
ClickBack
ClickForward
}
Constructors
-
ClickLeft -
ClickRight -
ClickWheel -
ClickBack -
ClickForward
pub type ClickParam {
ClickParam(button: ClickButtonType, x: Int, y: Int)
}
Constructors
-
ClickParam(button: ClickButtonType, x: Int, y: Int)
pub type CodeInterpreterContainerAuto {
CodeInterpreterContainerAuto(
file_ids: option.Option(List(String)),
memory_limit: option.Option(Int),
)
}
Constructors
-
CodeInterpreterContainerAuto( file_ids: option.Option(List(String)), memory_limit: option.Option(Int), )
pub type CodeInterpreterOutputImage {
CodeInterpreterOutputImage(url: String)
}
Constructors
-
CodeInterpreterOutputImage(url: String)
pub type CodeInterpreterOutputLogs {
CodeInterpreterOutputLogs(logs: String)
}
Constructors
-
CodeInterpreterOutputLogs(logs: String)
pub type CodeInterpreterTool {
CodeInterpreterTool(container: CodeInterpreterToolContainer)
}
Constructors
-
CodeInterpreterTool(container: CodeInterpreterToolContainer)
pub type CodeInterpreterToolCall {
CodeInterpreterToolCall(
code: option.Option(String),
container_id: String,
id: String,
outputs: option.Option(List(CodeInterpreterToolCallOutput)),
status: CodeInterpreterToolCallStatus,
)
}
Constructors
-
CodeInterpreterToolCall( code: option.Option(String), container_id: String, id: String, outputs: option.Option(List(CodeInterpreterToolCallOutput)), status: CodeInterpreterToolCallStatus, )
Tagged by “type”.
pub type CodeInterpreterToolCallOutput {
CodeInterpOutputLogs(CodeInterpreterOutputLogs)
CodeInterpOutputImage(CodeInterpreterOutputImage)
}
Constructors
-
CodeInterpOutputLogs(CodeInterpreterOutputLogs) -
CodeInterpOutputImage(CodeInterpreterOutputImage)
pub type CodeInterpreterToolCallStatus {
CodeInterpInProgress
CodeInterpCompleted
CodeInterpIncomplete
CodeInterpInterpreting
CodeInterpFailed
}
Constructors
-
CodeInterpInProgress -
CodeInterpCompleted -
CodeInterpIncomplete -
CodeInterpInterpreting -
CodeInterpFailed
Tagged by “type”, with ContainerID as untagged fallback.
pub type CodeInterpreterToolContainer {
CodeInterpContainerAuto(CodeInterpreterContainerAuto)
CodeInterpContainerId(String)
}
Constructors
-
CodeInterpContainerAuto(CodeInterpreterContainerAuto) -
CodeInterpContainerId(String)
pub type CompactResource {
CompactResource(
id: String,
object: String,
output: List(OutputItem),
created_at: Int,
usage: shared.ResponseUsage,
)
}
Constructors
-
CompactResource( id: String, object: String, output: List(OutputItem), created_at: Int, usage: shared.ResponseUsage, )
pub type CompactionBody {
CompactionBody(
id: String,
encrypted_content: String,
created_by: option.Option(String),
)
}
Constructors
-
CompactionBody( id: String, encrypted_content: String, created_by: option.Option(String), )
pub type CompactionSummaryItemParam {
CompactionSummaryItemParam(
id: option.Option(String),
encrypted_content: String,
)
}
Constructors
-
CompactionSummaryItemParam( id: option.Option(String), encrypted_content: String, )
Tagged by “type”.
pub type ComputerAction {
ComputerClick(ClickParam)
ComputerDoubleClick(DoubleClickAction)
ComputerDrag(DragParam)
ComputerKeypress(KeyPressAction)
ComputerMove(MoveParam)
ComputerScreenshot
ComputerScroll(ScrollParam)
ComputerType(TypeActionParam)
ComputerWait
}
Constructors
-
ComputerClick(ClickParam) -
ComputerDoubleClick(DoubleClickAction) -
ComputerDrag(DragParam) -
ComputerKeypress(KeyPressAction) -
ComputerMove(MoveParam) -
ComputerScreenshot -
ComputerScroll(ScrollParam) -
ComputerType(TypeActionParam) -
ComputerWait
pub type ComputerCallOutputItemParam {
ComputerCallOutputItemParam(
call_id: String,
output: ComputerScreenshotImage,
acknowledged_safety_checks: option.Option(
List(ComputerCallSafetyCheckParam),
),
id: option.Option(String),
status: option.Option(OutputStatus),
)
}
Constructors
-
ComputerCallOutputItemParam( call_id: String, output: ComputerScreenshotImage, acknowledged_safety_checks: option.Option( List(ComputerCallSafetyCheckParam), ), id: option.Option(String), status: option.Option(OutputStatus), )
pub type ComputerCallSafetyCheckParam {
ComputerCallSafetyCheckParam(
id: String,
code: option.Option(String),
message: option.Option(String),
)
}
Constructors
-
ComputerCallSafetyCheckParam( id: String, code: option.Option(String), message: option.Option(String), )
pub type ComputerEnvironment {
EnvironmentWindows
EnvironmentMac
EnvironmentLinux
EnvironmentUbuntu
EnvironmentBrowser
}
Constructors
-
EnvironmentWindows -
EnvironmentMac -
EnvironmentLinux -
EnvironmentUbuntu -
EnvironmentBrowser
pub type ComputerScreenshotImage {
ComputerScreenshotImage(
file_id: option.Option(String),
image_url: option.Option(String),
)
}
Constructors
-
ComputerScreenshotImage( file_id: option.Option(String), image_url: option.Option(String), )
pub type ComputerToolCall {
ComputerToolCall(
action: option.Option(ComputerAction),
actions: option.Option(List(ComputerAction)),
call_id: String,
id: String,
pending_safety_checks: List(ComputerCallSafetyCheckParam),
status: OutputStatus,
)
}
Constructors
-
ComputerToolCall( action: option.Option(ComputerAction), actions: option.Option(List(ComputerAction)), call_id: String, id: String, pending_safety_checks: List(ComputerCallSafetyCheckParam), status: OutputStatus, )
pub type ComputerUsePreviewTool {
ComputerUsePreviewTool(
environment: ComputerEnvironment,
display_width: Int,
display_height: Int,
)
}
Constructors
-
ComputerUsePreviewTool( environment: ComputerEnvironment, display_width: Int, display_height: Int, )
pub type ContainerAutoParam {
ContainerAutoParam(
file_ids: option.Option(List(String)),
network_policy: option.Option(dynamic.Dynamic),
skills: option.Option(dynamic.Dynamic),
)
}
Constructors
-
ContainerAutoParam( file_ids: option.Option(List(String)), network_policy: option.Option(dynamic.Dynamic), skills: option.Option(dynamic.Dynamic), )
pub type ContainerFileCitationBody {
ContainerFileCitationBody(
container_id: String,
end_index: Int,
file_id: String,
filename: String,
start_index: Int,
)
}
Constructors
-
ContainerFileCitationBody( container_id: String, end_index: Int, file_id: String, filename: String, start_index: Int, )
pub type ContainerReferenceParam {
ContainerReferenceParam(container_id: String)
}
Constructors
-
ContainerReferenceParam(container_id: String)
pub type ContainerReferenceResource {
ContainerReferenceResource(container_id: String)
}
Constructors
-
ContainerReferenceResource(container_id: String)
pub type Conversation {
Conversation(id: String)
}
Constructors
-
Conversation(id: String)
Untagged: string ID or object.
pub type ConversationParam {
ConversationId(String)
ConversationObject(Conversation)
}
Constructors
-
ConversationId(String) -
ConversationObject(Conversation)
pub type CoordParam {
CoordParam(x: Int, y: Int)
}
Constructors
-
CoordParam(x: Int, y: Int)
pub type CreateResponse {
CreateResponse(
background: option.Option(Bool),
conversation: option.Option(ConversationParam),
include: option.Option(List(IncludeEnum)),
input: InputParam,
instructions: option.Option(String),
max_output_tokens: option.Option(Int),
max_tool_calls: option.Option(Int),
metadata: option.Option(dict.Dict(String, String)),
model: option.Option(String),
parallel_tool_calls: option.Option(Bool),
previous_response_id: option.Option(String),
prompt: option.Option(Prompt),
prompt_cache_key: option.Option(String),
prompt_cache_retention: option.Option(PromptCacheRetention),
reasoning: option.Option(Reasoning),
safety_identifier: option.Option(String),
service_tier: option.Option(ServiceTier),
store: option.Option(Bool),
stream: option.Option(Bool),
stream_options: option.Option(ResponseStreamOptions),
temperature: option.Option(Float),
text: option.Option(ResponseTextParam),
tool_choice: option.Option(ToolChoiceParam),
tools: option.Option(List(Tool)),
top_logprobs: option.Option(Int),
top_p: option.Option(Float),
truncation: option.Option(Truncation),
)
}
Constructors
-
CreateResponse( background: option.Option(Bool), conversation: option.Option(ConversationParam), include: option.Option(List(IncludeEnum)), input: InputParam, instructions: option.Option(String), max_output_tokens: option.Option(Int), max_tool_calls: option.Option(Int), metadata: option.Option(dict.Dict(String, String)), model: option.Option(String), parallel_tool_calls: option.Option(Bool), previous_response_id: option.Option(String), prompt: option.Option(Prompt), prompt_cache_key: option.Option(String), prompt_cache_retention: option.Option(PromptCacheRetention), reasoning: option.Option(Reasoning), safety_identifier: option.Option(String), service_tier: option.Option(ServiceTier), store: option.Option(Bool), stream: option.Option(Bool), stream_options: option.Option(ResponseStreamOptions), temperature: option.Option(Float), text: option.Option(ResponseTextParam), tool_choice: option.Option(ToolChoiceParam), tools: option.Option(List(Tool)), top_logprobs: option.Option(Int), top_p: option.Option(Float), truncation: option.Option(Truncation), )
pub type CustomToolCall {
CustomToolCall(
call_id: String,
namespace: option.Option(String),
input: String,
name: String,
id: String,
)
}
Constructors
-
CustomToolCall( call_id: String, namespace: option.Option(String), input: String, name: String, id: String, )
pub type CustomToolCallOutput {
CustomToolCallOutput(
call_id: String,
output: CustomToolCallOutputOutput,
id: option.Option(String),
)
}
Constructors
-
CustomToolCallOutput( call_id: String, output: CustomToolCallOutputOutput, id: option.Option(String), )
pub type CustomToolCallOutputOutput {
CustomToolCallOutputText(String)
CustomToolCallOutputList(List(InputContent))
}
Constructors
-
CustomToolCallOutputText(String) -
CustomToolCallOutputList(List(InputContent))
pub type CustomToolParam {
CustomToolParam(
name: String,
description: option.Option(String),
format: CustomToolParamFormat,
defer_loading: option.Option(Bool),
)
}
Constructors
-
CustomToolParam( name: String, description: option.Option(String), format: CustomToolParamFormat, defer_loading: option.Option(Bool), )
pub type CustomToolParamFormat {
CustomFormatText
CustomFormatGrammar(dynamic.Dynamic)
}
Constructors
-
CustomFormatText -
CustomFormatGrammar(dynamic.Dynamic)
pub type DeleteResponse {
DeleteResponse(object: String, deleted: Bool, id: String)
}
Constructors
-
DeleteResponse(object: String, deleted: Bool, id: String)
pub type DoubleClickAction {
DoubleClickAction(x: Int, y: Int)
}
Constructors
-
DoubleClickAction(x: Int, y: Int)
pub type DragParam {
DragParam(path: List(CoordParam))
}
Constructors
-
DragParam(path: List(CoordParam))
Untagged: content can be string or list.
pub type EasyInputContent {
EasyContentText(String)
EasyContentList(List(InputContent))
}
Constructors
-
EasyContentText(String) -
EasyContentList(List(InputContent))
pub type EasyInputMessage {
EasyInputMessage(
role: Role,
content: EasyInputContent,
phase: option.Option(MessagePhase),
)
}
Constructors
-
EasyInputMessage( role: Role, content: EasyInputContent, phase: option.Option(MessagePhase), )
pub type ErrorObject {
ErrorObject(code: String, message: String)
}
Constructors
-
ErrorObject(code: String, message: String)
pub type FileCitationBody {
FileCitationBody(file_id: String, filename: String, index: Int)
}
Constructors
-
FileCitationBody(file_id: String, filename: String, index: Int)
pub type FilePathAnnotation {
FilePathAnnotation(file_id: String, index: Int)
}
Constructors
-
FilePathAnnotation(file_id: String, index: Int)
pub type FileSearchTool {
FileSearchTool(
vector_store_ids: List(String),
max_num_results: option.Option(Int),
filters: option.Option(dynamic.Dynamic),
ranking_options: option.Option(RankingOptions),
)
}
Constructors
-
FileSearchTool( vector_store_ids: List(String), max_num_results: option.Option(Int), filters: option.Option(dynamic.Dynamic), ranking_options: option.Option(RankingOptions), )
pub type FileSearchToolCall {
FileSearchToolCall(
id: String,
queries: List(String),
status: FileSearchToolCallStatus,
results: option.Option(List(FileSearchToolCallResult)),
)
}
Constructors
-
FileSearchToolCall( id: String, queries: List(String), status: FileSearchToolCallStatus, results: option.Option(List(FileSearchToolCallResult)), )
pub type FileSearchToolCallResult {
FileSearchToolCallResult(
attributes: dynamic.Dynamic,
file_id: String,
filename: String,
score: Float,
text: String,
)
}
Constructors
-
FileSearchToolCallResult( attributes: dynamic.Dynamic, file_id: String, filename: String, score: Float, text: String, )
pub type FileSearchToolCallStatus {
FileSearchInProgress
FileSearchSearching
FileSearchIncomplete
FileSearchFailed
FileSearchCompleted
}
Constructors
-
FileSearchInProgress -
FileSearchSearching -
FileSearchIncomplete -
FileSearchFailed -
FileSearchCompleted
Untagged: string or content list.
pub type FunctionCallOutput {
FunctionCallOutputText(String)
FunctionCallOutputContent(List(InputContent))
}
Constructors
-
FunctionCallOutputText(String) -
FunctionCallOutputContent(List(InputContent))
pub type FunctionCallOutputItemParam {
FunctionCallOutputItemParam(
call_id: String,
output: FunctionCallOutput,
id: option.Option(String),
status: option.Option(OutputStatus),
)
}
Constructors
-
FunctionCallOutputItemParam( call_id: String, output: FunctionCallOutput, id: option.Option(String), status: option.Option(OutputStatus), )
pub type FunctionCallStatus {
FunctionCallInProgress
FunctionCallCompleted
FunctionCallIncomplete
}
Constructors
-
FunctionCallInProgress -
FunctionCallCompleted -
FunctionCallIncomplete
pub type FunctionShellAction {
FunctionShellAction(
commands: List(String),
timeout_ms: option.Option(Int),
max_output_length: option.Option(Int),
)
}
Constructors
-
FunctionShellAction( commands: List(String), timeout_ms: option.Option(Int), max_output_length: option.Option(Int), )
pub type FunctionShellActionParam {
FunctionShellActionParam(
commands: List(String),
timeout_ms: option.Option(Int),
max_output_length: option.Option(Int),
)
}
Constructors
-
FunctionShellActionParam( commands: List(String), timeout_ms: option.Option(Int), max_output_length: option.Option(Int), )
pub type FunctionShellCall {
FunctionShellCall(
id: String,
call_id: String,
action: FunctionShellAction,
status: FunctionShellCallItemStatus,
environment: option.Option(FunctionShellCallEnvironment),
created_by: option.Option(String),
)
}
Constructors
-
FunctionShellCall( id: String, call_id: String, action: FunctionShellAction, status: FunctionShellCallItemStatus, environment: option.Option(FunctionShellCallEnvironment), created_by: option.Option(String), )
Tagged by “type”.
pub type FunctionShellCallEnvironment {
ShellCallEnvLocal
ShellCallEnvContainerReference(ContainerReferenceResource)
}
Constructors
-
ShellCallEnvLocal -
ShellCallEnvContainerReference(ContainerReferenceResource)
Tagged by “type”.
pub type FunctionShellCallItemEnvironment {
ShellEnvLocal(LocalEnvironmentParam)
ShellEnvContainerReference(ContainerReferenceParam)
}
Constructors
-
ShellEnvLocal(LocalEnvironmentParam) -
ShellEnvContainerReference(ContainerReferenceParam)
pub type FunctionShellCallItemParam {
FunctionShellCallItemParam(
id: option.Option(String),
call_id: String,
action: FunctionShellActionParam,
status: option.Option(FunctionShellCallItemStatus),
environment: option.Option(FunctionShellCallItemEnvironment),
)
}
Constructors
-
FunctionShellCallItemParam( id: option.Option(String), call_id: String, action: FunctionShellActionParam, status: option.Option(FunctionShellCallItemStatus), environment: option.Option(FunctionShellCallItemEnvironment), )
pub type FunctionShellCallItemStatus {
ShellItemInProgress
ShellItemCompleted
ShellItemIncomplete
}
Constructors
-
ShellItemInProgress -
ShellItemCompleted -
ShellItemIncomplete
pub type FunctionShellCallOutput {
FunctionShellCallOutput(
id: String,
call_id: String,
output: List(FunctionShellCallOutputContent),
max_output_length: option.Option(Int),
created_by: option.Option(String),
)
}
Constructors
-
FunctionShellCallOutput( id: String, call_id: String, output: List(FunctionShellCallOutputContent), max_output_length: option.Option(Int), created_by: option.Option(String), )
pub type FunctionShellCallOutputContent {
FunctionShellCallOutputContent(
stdout: String,
stderr: String,
outcome: FunctionShellCallOutputOutcome,
created_by: option.Option(String),
)
}
Constructors
-
FunctionShellCallOutputContent( stdout: String, stderr: String, outcome: FunctionShellCallOutputOutcome, created_by: option.Option(String), )
pub type FunctionShellCallOutputContentParam {
FunctionShellCallOutputContentParam(
stdout: String,
stderr: String,
outcome: FunctionShellCallOutputOutcomeParam,
)
}
Constructors
-
FunctionShellCallOutputContentParam( stdout: String, stderr: String, outcome: FunctionShellCallOutputOutcomeParam, )
pub type FunctionShellCallOutputExitOutcome {
FunctionShellCallOutputExitOutcome(exit_code: Int)
}
Constructors
-
FunctionShellCallOutputExitOutcome(exit_code: Int)
pub type FunctionShellCallOutputExitOutcomeParam {
FunctionShellCallOutputExitOutcomeParam(exit_code: Int)
}
Constructors
-
FunctionShellCallOutputExitOutcomeParam(exit_code: Int)
pub type FunctionShellCallOutputItemParam {
FunctionShellCallOutputItemParam(
id: option.Option(String),
call_id: String,
output: List(FunctionShellCallOutputContentParam),
max_output_length: option.Option(Int),
)
}
Constructors
-
FunctionShellCallOutputItemParam( id: option.Option(String), call_id: String, output: List(FunctionShellCallOutputContentParam), max_output_length: option.Option(Int), )
Tagged by “type”.
pub type FunctionShellCallOutputOutcome {
ShellCallOutcomeTimeout
ShellCallOutcomeExit(FunctionShellCallOutputExitOutcome)
}
Constructors
-
ShellCallOutcomeTimeout -
ShellCallOutcomeExit(FunctionShellCallOutputExitOutcome)
Tagged by “type”.
pub type FunctionShellCallOutputOutcomeParam {
ShellOutcomeTimeout
ShellOutcomeExit(FunctionShellCallOutputExitOutcomeParam)
}
Constructors
-
ShellOutcomeTimeout -
ShellOutcomeExit(FunctionShellCallOutputExitOutcomeParam)
pub type FunctionShellEnvironment {
FunctionShellEnvContainerAuto(ContainerAutoParam)
FunctionShellEnvLocal(LocalEnvironmentParam)
FunctionShellEnvContainerReference(ContainerReferenceParam)
}
Constructors
-
FunctionShellEnvContainerAuto(ContainerAutoParam) -
FunctionShellEnvLocal(LocalEnvironmentParam) -
FunctionShellEnvContainerReference(ContainerReferenceParam)
pub type FunctionShellToolParam {
FunctionShellToolParam(
environment: option.Option(FunctionShellEnvironment),
)
}
Constructors
-
FunctionShellToolParam( environment: option.Option(FunctionShellEnvironment), )
pub type FunctionTool {
FunctionTool(
name: String,
parameters: option.Option(dynamic.Dynamic),
strict: option.Option(Bool),
description: option.Option(String),
defer_loading: option.Option(Bool),
)
}
Constructors
-
FunctionTool( name: String, parameters: option.Option(dynamic.Dynamic), strict: option.Option(Bool), description: option.Option(String), defer_loading: option.Option(Bool), )
pub type FunctionToolCall {
FunctionToolCall(
arguments: String,
call_id: String,
namespace: option.Option(String),
name: String,
id: option.Option(String),
status: option.Option(OutputStatus),
)
}
Constructors
-
FunctionToolCall( arguments: String, call_id: String, namespace: option.Option(String), name: String, id: option.Option(String), status: option.Option(OutputStatus), )
pub type FunctionToolParam {
FunctionToolParam(
name: String,
description: option.Option(String),
parameters: option.Option(dynamic.Dynamic),
strict: option.Option(Bool),
defer_loading: option.Option(Bool),
)
}
Constructors
-
FunctionToolParam( name: String, description: option.Option(String), parameters: option.Option(dynamic.Dynamic), strict: option.Option(Bool), defer_loading: option.Option(Bool), )
pub type HybridSearch {
HybridSearch(embedding_weight: Float, text_weight: Float)
}
Constructors
-
HybridSearch(embedding_weight: Float, text_weight: Float)
pub type ImageGenActionEnum {
ImageGenGenerate
ImageGenEdit
ImageGenActionAuto
}
Constructors
-
ImageGenGenerate -
ImageGenEdit -
ImageGenActionAuto
pub type ImageGenTool {
ImageGenTool(
background: option.Option(ImageGenToolBackground),
input_fidelity: option.Option(InputFidelity),
input_image_mask: option.Option(ImageGenToolInputImageMask),
model: option.Option(String),
moderation: option.Option(ImageGenToolModeration),
output_compression: option.Option(Int),
output_format: option.Option(ImageGenToolOutputFormat),
partial_images: option.Option(Int),
quality: option.Option(ImageGenToolQuality),
size: option.Option(ImageGenToolSize),
action: option.Option(ImageGenActionEnum),
)
}
Constructors
-
ImageGenTool( background: option.Option(ImageGenToolBackground), input_fidelity: option.Option(InputFidelity), input_image_mask: option.Option(ImageGenToolInputImageMask), model: option.Option(String), moderation: option.Option(ImageGenToolModeration), output_compression: option.Option(Int), output_format: option.Option(ImageGenToolOutputFormat), partial_images: option.Option(Int), quality: option.Option(ImageGenToolQuality), size: option.Option(ImageGenToolSize), action: option.Option(ImageGenActionEnum), )
pub type ImageGenToolBackground {
ImageGenBgTransparent
ImageGenBgOpaque
ImageGenBgAuto
}
Constructors
-
ImageGenBgTransparent -
ImageGenBgOpaque -
ImageGenBgAuto
pub type ImageGenToolCall {
ImageGenToolCall(
id: String,
result: option.Option(String),
status: ImageGenToolCallStatus,
)
}
Constructors
-
ImageGenToolCall( id: String, result: option.Option(String), status: ImageGenToolCallStatus, )
pub type ImageGenToolCallStatus {
ImageGenCallInProgress
ImageGenCallCompleted
ImageGenCallGenerating
ImageGenCallFailed
}
Constructors
-
ImageGenCallInProgress -
ImageGenCallCompleted -
ImageGenCallGenerating -
ImageGenCallFailed
pub type ImageGenToolInputImageMask {
ImageGenToolInputImageMask(
image_url: option.Option(String),
file_id: option.Option(String),
)
}
Constructors
-
ImageGenToolInputImageMask( image_url: option.Option(String), file_id: option.Option(String), )
pub type ImageGenToolModeration {
ImageGenModerationAuto
ImageGenModerationLow
}
Constructors
-
ImageGenModerationAuto -
ImageGenModerationLow
pub type ImageGenToolOutputFormat {
ImageGenFmtPng
ImageGenFmtWebp
ImageGenFmtJpeg
}
Constructors
-
ImageGenFmtPng -
ImageGenFmtWebp -
ImageGenFmtJpeg
pub type ImageGenToolQuality {
ImageGenQualityLow
ImageGenQualityMedium
ImageGenQualityHigh
ImageGenQualityAuto
}
Constructors
-
ImageGenQualityLow -
ImageGenQualityMedium -
ImageGenQualityHigh -
ImageGenQualityAuto
pub type ImageGenToolSize {
ImageGenSizeAuto
ImageGenSize1024x1024
ImageGenSize1024x1536
ImageGenSize1536x1024
}
Constructors
-
ImageGenSizeAuto -
ImageGenSize1024x1024 -
ImageGenSize1024x1536 -
ImageGenSize1536x1024
Which data to include in the response.
pub type IncludeEnum {
IncludeFileSearchCallResults
IncludeWebSearchCallResults
IncludeWebSearchCallActionSources
IncludeMessageInputImageImageUrl
IncludeComputerCallOutputOutputImageUrl
IncludeCodeInterpreterCallOutputs
IncludeReasoningEncryptedContent
IncludeMessageOutputTextLogprobs
}
Constructors
-
IncludeFileSearchCallResults -
IncludeWebSearchCallResults -
IncludeWebSearchCallActionSources -
IncludeMessageInputImageImageUrl -
IncludeComputerCallOutputOutputImageUrl -
IncludeCodeInterpreterCallOutputs -
IncludeReasoningEncryptedContent -
IncludeMessageOutputTextLogprobs
pub type IncompleteDetails {
IncompleteDetails(reason: String)
}
Constructors
-
IncompleteDetails(reason: String)
Parts of a message: text, image, or file. Tagged by “type”.
pub type InputContent {
ContentInputText(InputTextContent)
ContentInputImage(InputImageContent)
ContentInputFile(InputFileContent)
}
Constructors
-
ContentInputText(InputTextContent) -
ContentInputImage(InputImageContent) -
ContentInputFile(InputFileContent)
pub type InputFidelity {
FidelityHigh
FidelityLow
}
Constructors
-
FidelityHigh -
FidelityLow
pub type InputFileContent {
InputFileContent(
file_data: option.Option(String),
file_id: option.Option(String),
file_url: option.Option(String),
filename: option.Option(String),
)
}
Constructors
-
InputFileContent( file_data: option.Option(String), file_id: option.Option(String), file_url: option.Option(String), filename: option.Option(String), )
pub type InputImageContent {
InputImageContent(
detail: shared.ImageDetail,
file_id: option.Option(String),
image_url: option.Option(String),
)
}
Constructors
-
InputImageContent( detail: shared.ImageDetail, file_id: option.Option(String), image_url: option.Option(String), )
Untagged: ItemReference, Item, or EasyMessage.
pub type InputItem {
InputItemReference(ItemReference)
InputItemItem(Item)
InputItemEasyMessage(EasyInputMessage)
}
Constructors
-
InputItemReference(ItemReference) -
InputItemItem(Item) -
InputItemEasyMessage(EasyInputMessage)
pub type InputMessage {
InputMessage(
content: List(InputContent),
role: InputRole,
status: option.Option(OutputStatus),
)
}
Constructors
-
InputMessage( content: List(InputContent), role: InputRole, status: option.Option(OutputStatus), )
pub type InputRole {
InputRoleUser
InputRoleSystem
InputRoleDeveloper
}
Constructors
-
InputRoleUser -
InputRoleSystem -
InputRoleDeveloper
pub type InputTextContent {
InputTextContent(text: String)
}
Constructors
-
InputTextContent(text: String)
Content item used to generate a response. Tagged by “type”.
pub type Item {
ItemMessage(MessageItem)
ItemFileSearchCall(FileSearchToolCall)
ItemComputerCall(ComputerToolCall)
ItemComputerCallOutput(ComputerCallOutputItemParam)
ItemWebSearchCall(WebSearchToolCall)
ItemFunctionCall(FunctionToolCall)
ItemFunctionCallOutput(FunctionCallOutputItemParam)
ItemToolSearchCall(ToolSearchCallItemParam)
ItemToolSearchOutput(ToolSearchOutputItemParam)
ItemReasoning(ReasoningItem)
ItemCompaction(CompactionSummaryItemParam)
ItemImageGenerationCall(ImageGenToolCall)
ItemCodeInterpreterCall(CodeInterpreterToolCall)
ItemLocalShellCall(LocalShellToolCall)
ItemLocalShellCallOutput(LocalShellToolCallOutput)
ItemShellCall(FunctionShellCallItemParam)
ItemShellCallOutput(FunctionShellCallOutputItemParam)
ItemApplyPatchCall(ApplyPatchToolCallItemParam)
ItemApplyPatchCallOutput(ApplyPatchToolCallOutputItemParam)
ItemMcpListTools(McpListTools)
ItemMcpApprovalRequest(McpApprovalRequest)
ItemMcpApprovalResponse(McpApprovalResponse)
ItemMcpCall(McpToolCall)
ItemCustomToolCallOutput(CustomToolCallOutput)
ItemCustomToolCall(CustomToolCall)
}
Constructors
-
ItemMessage(MessageItem) -
ItemFileSearchCall(FileSearchToolCall) -
ItemComputerCall(ComputerToolCall) -
ItemComputerCallOutput(ComputerCallOutputItemParam) -
ItemWebSearchCall(WebSearchToolCall) -
ItemFunctionCall(FunctionToolCall) -
ItemFunctionCallOutput(FunctionCallOutputItemParam) -
ItemToolSearchCall(ToolSearchCallItemParam) -
ItemToolSearchOutput(ToolSearchOutputItemParam) -
ItemReasoning(ReasoningItem) -
ItemCompaction(CompactionSummaryItemParam) -
ItemImageGenerationCall(ImageGenToolCall) -
ItemCodeInterpreterCall(CodeInterpreterToolCall) -
ItemLocalShellCall(LocalShellToolCall) -
ItemLocalShellCallOutput(LocalShellToolCallOutput) -
ItemShellCall(FunctionShellCallItemParam) -
ItemShellCallOutput(FunctionShellCallOutputItemParam) -
ItemApplyPatchCall(ApplyPatchToolCallItemParam) -
ItemApplyPatchCallOutput(ApplyPatchToolCallOutputItemParam) -
ItemMcpListTools(McpListTools) -
ItemMcpApprovalRequest(McpApprovalRequest) -
ItemMcpApprovalResponse(McpApprovalResponse) -
ItemMcpCall(McpToolCall) -
ItemCustomToolCallOutput(CustomToolCallOutput) -
ItemCustomToolCall(CustomToolCall)
pub type ItemReference {
ItemReference(item_type: option.Option(String), id: String)
}
Constructors
-
ItemReference(item_type: option.Option(String), id: String)
pub type KeyPressAction {
KeyPressAction(keys: List(String))
}
Constructors
-
KeyPressAction(keys: List(String))
pub type LocalEnvironmentParam {
LocalEnvironmentParam(skills: option.Option(dynamic.Dynamic))
}
Constructors
-
LocalEnvironmentParam(skills: option.Option(dynamic.Dynamic))
pub type LocalShellExecAction {
LocalShellExecAction(
command: List(String),
env: dict.Dict(String, String),
timeout_ms: option.Option(Int),
user: option.Option(String),
working_directory: option.Option(String),
)
}
Constructors
-
LocalShellExecAction( command: List(String), env: dict.Dict(String, String), timeout_ms: option.Option(Int), user: option.Option(String), working_directory: option.Option(String), )
pub type LocalShellToolCall {
LocalShellToolCall(
action: LocalShellExecAction,
call_id: String,
id: String,
status: OutputStatus,
)
}
Constructors
-
LocalShellToolCall( action: LocalShellExecAction, call_id: String, id: String, status: OutputStatus, )
pub type LocalShellToolCallOutput {
LocalShellToolCallOutput(
id: String,
output: String,
status: option.Option(OutputStatus),
)
}
Constructors
-
LocalShellToolCallOutput( id: String, output: String, status: option.Option(OutputStatus), )
pub type McpApprovalRequest {
McpApprovalRequest(
arguments: String,
id: String,
name: String,
server_label: String,
)
}
Constructors
-
McpApprovalRequest( arguments: String, id: String, name: String, server_label: String, )
pub type McpApprovalResponse {
McpApprovalResponse(
approval_request_id: String,
approve: Bool,
id: option.Option(String),
reason: option.Option(String),
)
}
Constructors
-
McpApprovalResponse( approval_request_id: String, approve: Bool, id: option.Option(String), reason: option.Option(String), )
pub type McpListTools {
McpListTools(
id: String,
server_label: String,
tools: dynamic.Dynamic,
error: option.Option(String),
)
}
Constructors
-
McpListTools( id: String, server_label: String, tools: dynamic.Dynamic, error: option.Option(String), )
pub type McpToolCall {
McpToolCall(
arguments: String,
id: String,
name: String,
server_label: String,
approval_request_id: option.Option(String),
error: option.Option(String),
output: option.Option(String),
status: option.Option(McpToolCallStatus),
)
}
Constructors
-
McpToolCall( arguments: String, id: String, name: String, server_label: String, approval_request_id: option.Option(String), error: option.Option(String), output: option.Option(String), status: option.Option(McpToolCallStatus), )
pub type McpToolCallStatus {
McpCallInProgress
McpCallCompleted
McpCallIncomplete
McpCallCalling
McpCallFailed
}
Constructors
-
McpCallInProgress -
McpCallCompleted -
McpCallIncomplete -
McpCallCalling -
McpCallFailed
Untagged: OutputMessage or InputMessage.
pub type MessageItem {
MessageItemOutput(OutputMessage)
MessageItemInput(InputMessage)
}
Constructors
-
MessageItemOutput(OutputMessage) -
MessageItemInput(InputMessage)
pub type MessagePhase {
Commentary
FinalAnswer
}
Constructors
-
Commentary -
FinalAnswer
pub type MoveParam {
MoveParam(x: Int, y: Int)
}
Constructors
-
MoveParam(x: Int, y: Int)
pub type NamespaceToolParam {
NamespaceToolParam(
name: String,
description: String,
tools: List(NamespaceToolParamTool),
)
}
Constructors
-
NamespaceToolParam( name: String, description: String, tools: List(NamespaceToolParamTool), )
pub type NamespaceToolParamTool {
NamespaceFunction(FunctionToolParam)
NamespaceCustom(CustomToolParam)
}
Constructors
-
NamespaceFunction(FunctionToolParam) -
NamespaceCustom(CustomToolParam)
Tagged by “type”.
pub type OutputContent {
OutputContentOutputText(OutputTextContent)
OutputContentRefusal(RefusalContent)
OutputContentReasoningText(ReasoningTextContent)
}
Constructors
-
OutputContentOutputText(OutputTextContent) -
OutputContentRefusal(RefusalContent) -
OutputContentReasoningText(ReasoningTextContent)
Output item from the model. Tagged by “type”.
pub type OutputItem {
OutputItemMessage(OutputMessage)
OutputItemFileSearchCall(FileSearchToolCall)
OutputItemFunctionCall(FunctionToolCall)
OutputItemWebSearchCall(WebSearchToolCall)
OutputItemComputerCall(ComputerToolCall)
OutputItemReasoning(ReasoningItem)
OutputItemCompaction(CompactionBody)
OutputItemImageGenerationCall(ImageGenToolCall)
OutputItemCodeInterpreterCall(CodeInterpreterToolCall)
OutputItemLocalShellCall(LocalShellToolCall)
OutputItemShellCall(FunctionShellCall)
OutputItemShellCallOutput(FunctionShellCallOutput)
OutputItemApplyPatchCall(ApplyPatchToolCall)
OutputItemApplyPatchCallOutput(ApplyPatchToolCallOutput)
OutputItemMcpCall(McpToolCall)
OutputItemMcpListTools(McpListTools)
OutputItemMcpApprovalRequest(McpApprovalRequest)
OutputItemCustomToolCall(CustomToolCall)
OutputItemToolSearchCall(ToolSearchCall)
OutputItemToolSearchOutput(ToolSearchOutput)
}
Constructors
-
OutputItemMessage(OutputMessage) -
OutputItemFileSearchCall(FileSearchToolCall) -
OutputItemFunctionCall(FunctionToolCall) -
OutputItemWebSearchCall(WebSearchToolCall) -
OutputItemComputerCall(ComputerToolCall) -
OutputItemReasoning(ReasoningItem) -
OutputItemCompaction(CompactionBody) -
OutputItemImageGenerationCall(ImageGenToolCall) -
OutputItemCodeInterpreterCall(CodeInterpreterToolCall) -
OutputItemLocalShellCall(LocalShellToolCall) -
OutputItemShellCall(FunctionShellCall) -
OutputItemShellCallOutput(FunctionShellCallOutput) -
OutputItemApplyPatchCall(ApplyPatchToolCall) -
OutputItemApplyPatchCallOutput(ApplyPatchToolCallOutput) -
OutputItemMcpCall(McpToolCall) -
OutputItemMcpListTools(McpListTools) -
OutputItemMcpApprovalRequest(McpApprovalRequest) -
OutputItemCustomToolCall(CustomToolCall) -
OutputItemToolSearchCall(ToolSearchCall) -
OutputItemToolSearchOutput(ToolSearchOutput)
pub type OutputMessage {
OutputMessage(
content: List(OutputMessageContent),
id: String,
role: Role,
phase: option.Option(MessagePhase),
status: OutputStatus,
)
}
Constructors
-
OutputMessage( content: List(OutputMessageContent), id: String, role: Role, phase: option.Option(MessagePhase), status: OutputStatus, )
Tagged by “type”.
pub type OutputMessageContent {
OutputMessageOutputText(OutputTextContent)
OutputMessageRefusal(RefusalContent)
}
Constructors
-
OutputMessageOutputText(OutputTextContent) -
OutputMessageRefusal(RefusalContent)
pub type OutputStatus {
OutputInProgress
OutputCompleted
OutputIncomplete
}
Constructors
-
OutputInProgress -
OutputCompleted -
OutputIncomplete
pub type OutputTextContent {
OutputTextContent(
annotations: List(Annotation),
logprobs: option.Option(List(ResponseLogProb)),
text: String,
)
}
Constructors
-
OutputTextContent( annotations: List(Annotation), logprobs: option.Option(List(ResponseLogProb)), text: String, )
pub type Prompt {
Prompt(
id: String,
version: option.Option(String),
variables: option.Option(dynamic.Dynamic),
)
}
Constructors
-
Prompt( id: String, version: option.Option(String), variables: option.Option(dynamic.Dynamic), )
pub type PromptCacheRetention {
PromptCacheInMemory
PromptCacheHours24
}
Constructors
-
PromptCacheInMemory -
PromptCacheHours24
pub type RankVersionType {
RankAuto
RankDefault20241115
}
Constructors
-
RankAuto -
RankDefault20241115
pub type RankingOptions {
RankingOptions(
hybrid_search: option.Option(HybridSearch),
ranker: RankVersionType,
score_threshold: option.Option(Float),
)
}
Constructors
-
RankingOptions( hybrid_search: option.Option(HybridSearch), ranker: RankVersionType, score_threshold: option.Option(Float), )
pub type Reasoning {
Reasoning(
effort: option.Option(shared.ReasoningEffort),
summary: option.Option(ReasoningSummary),
)
}
Constructors
-
Reasoning( effort: option.Option(shared.ReasoningEffort), summary: option.Option(ReasoningSummary), )
pub type ReasoningItem {
ReasoningItem(
id: String,
summary: List(SummaryPart),
content: option.Option(List(ReasoningTextContent)),
encrypted_content: option.Option(String),
status: option.Option(OutputStatus),
)
}
Constructors
-
ReasoningItem( id: String, summary: List(SummaryPart), content: option.Option(List(ReasoningTextContent)), encrypted_content: option.Option(String), status: option.Option(OutputStatus), )
pub type ReasoningSummary {
ReasoningSummaryAuto
ReasoningSummaryConcise
ReasoningSummaryDetailed
}
Constructors
-
ReasoningSummaryAuto -
ReasoningSummaryConcise -
ReasoningSummaryDetailed
pub type ReasoningTextContent {
ReasoningTextContent(text: String)
}
Constructors
-
ReasoningTextContent(text: String)
pub type RefusalContent {
RefusalContent(refusal: String)
}
Constructors
-
RefusalContent(refusal: String)
pub type Response {
Response(
background: option.Option(Bool),
billing: option.Option(Billing),
conversation: option.Option(Conversation),
created_at: Int,
completed_at: option.Option(Int),
error: option.Option(ErrorObject),
id: String,
incomplete_details: option.Option(IncompleteDetails),
instructions: option.Option(Instructions),
max_output_tokens: option.Option(Int),
metadata: option.Option(dict.Dict(String, String)),
model: String,
object: String,
output: List(OutputItem),
parallel_tool_calls: option.Option(Bool),
previous_response_id: option.Option(String),
prompt: option.Option(Prompt),
prompt_cache_key: option.Option(String),
prompt_cache_retention: option.Option(PromptCacheRetention),
reasoning: option.Option(Reasoning),
safety_identifier: option.Option(String),
service_tier: option.Option(ServiceTier),
status: ResponseStatus,
temperature: option.Option(Float),
text: option.Option(ResponseTextParam),
tool_choice: option.Option(ToolChoiceParam),
tools: option.Option(List(Tool)),
top_logprobs: option.Option(Int),
top_p: option.Option(Float),
truncation: option.Option(Truncation),
usage: option.Option(shared.ResponseUsage),
)
}
Constructors
-
Response( background: option.Option(Bool), billing: option.Option(Billing), conversation: option.Option(Conversation), created_at: Int, completed_at: option.Option(Int), error: option.Option(ErrorObject), id: String, incomplete_details: option.Option(IncompleteDetails), instructions: option.Option(Instructions), max_output_tokens: option.Option(Int), metadata: option.Option(dict.Dict(String, String)), model: String, object: String, output: List(OutputItem), parallel_tool_calls: option.Option(Bool), previous_response_id: option.Option(String), prompt: option.Option(Prompt), prompt_cache_key: option.Option(String), prompt_cache_retention: option.Option(PromptCacheRetention), reasoning: option.Option(Reasoning), safety_identifier: option.Option(String), service_tier: option.Option(ServiceTier), status: ResponseStatus, temperature: option.Option(Float), text: option.Option(ResponseTextParam), tool_choice: option.Option(ToolChoiceParam), tools: option.Option(List(Tool)), top_logprobs: option.Option(Int), top_p: option.Option(Float), truncation: option.Option(Truncation), usage: option.Option(shared.ResponseUsage), )
pub type ResponseItemList {
ResponseItemList(
object: String,
first_id: option.Option(String),
last_id: option.Option(String),
has_more: Bool,
data: dynamic.Dynamic,
)
}
Constructors
-
ResponseItemList( object: String, first_id: option.Option(String), last_id: option.Option(String), has_more: Bool, data: dynamic.Dynamic, )
pub type ResponseLogProb {
ResponseLogProb(
logprob: Float,
token: String,
top_logprobs: List(ResponseTopLogProb),
)
}
Constructors
-
ResponseLogProb( logprob: Float, token: String, top_logprobs: List(ResponseTopLogProb), )
pub type ResponseStatus {
StatusCompleted
StatusFailed
StatusInProgress
StatusCancelled
StatusQueued
StatusIncomplete
}
Constructors
-
StatusCompleted -
StatusFailed -
StatusInProgress -
StatusCancelled -
StatusQueued -
StatusIncomplete
All 48 streaming event types. Tagged by “type” with dotted names like “response.created”, “response.output_text.delta”, etc.
pub type ResponseStreamEvent {
EventResponseCreated(sequence_number: Int, response: Response)
EventResponseInProgress(
sequence_number: Int,
response: Response,
)
EventResponseCompleted(
sequence_number: Int,
response: Response,
)
EventResponseFailed(sequence_number: Int, response: Response)
EventResponseIncomplete(
sequence_number: Int,
response: Response,
)
EventResponseQueued(sequence_number: Int, response: Response)
EventResponseOutputItemAdded(
sequence_number: Int,
output_index: Int,
item: OutputItem,
)
EventResponseOutputItemDone(
sequence_number: Int,
output_index: Int,
item: OutputItem,
)
EventResponseContentPartAdded(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
part: OutputContent,
)
EventResponseContentPartDone(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
part: OutputContent,
)
EventResponseOutputTextDelta(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
delta: String,
logprobs: option.Option(List(ResponseLogProb)),
)
EventResponseOutputTextDone(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
text: String,
logprobs: option.Option(List(ResponseLogProb)),
)
EventResponseRefusalDelta(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
delta: String,
)
EventResponseRefusalDone(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
refusal: String,
)
EventResponseFunctionCallArgumentsDelta(
sequence_number: Int,
item_id: String,
output_index: Int,
delta: String,
)
EventResponseFunctionCallArgumentsDone(
name: option.Option(String),
sequence_number: Int,
item_id: String,
output_index: Int,
arguments: String,
)
EventResponseFileSearchCallInProgress(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseFileSearchCallSearching(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseFileSearchCallCompleted(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseWebSearchCallInProgress(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseWebSearchCallSearching(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseWebSearchCallCompleted(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseReasoningSummaryPartAdded(
sequence_number: Int,
item_id: String,
output_index: Int,
summary_index: Int,
part: SummaryPart,
)
EventResponseReasoningSummaryPartDone(
sequence_number: Int,
item_id: String,
output_index: Int,
summary_index: Int,
part: SummaryPart,
)
EventResponseReasoningSummaryTextDelta(
sequence_number: Int,
item_id: String,
output_index: Int,
summary_index: Int,
delta: String,
)
EventResponseReasoningSummaryTextDone(
sequence_number: Int,
item_id: String,
output_index: Int,
summary_index: Int,
text: String,
)
EventResponseReasoningTextDelta(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
delta: String,
)
EventResponseReasoningTextDone(
sequence_number: Int,
item_id: String,
output_index: Int,
content_index: Int,
text: String,
)
EventResponseImageGenCallCompleted(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseImageGenCallGenerating(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseImageGenCallInProgress(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseImageGenCallPartialImage(
sequence_number: Int,
output_index: Int,
item_id: String,
partial_image_index: Int,
partial_image_b64: String,
)
EventResponseMcpCallArgumentsDelta(
sequence_number: Int,
output_index: Int,
item_id: String,
delta: String,
)
EventResponseMcpCallArgumentsDone(
sequence_number: Int,
output_index: Int,
item_id: String,
arguments: String,
)
EventResponseMcpCallCompleted(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseMcpCallFailed(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseMcpCallInProgress(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseMcpListToolsCompleted(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseMcpListToolsFailed(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseMcpListToolsInProgress(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseCodeInterpreterCallInProgress(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseCodeInterpreterCallInterpreting(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseCodeInterpreterCallCompleted(
sequence_number: Int,
output_index: Int,
item_id: String,
)
EventResponseCodeInterpreterCallCodeDelta(
sequence_number: Int,
output_index: Int,
item_id: String,
delta: String,
)
EventResponseCodeInterpreterCallCodeDone(
sequence_number: Int,
output_index: Int,
item_id: String,
code: String,
)
EventResponseOutputTextAnnotationAdded(
sequence_number: Int,
output_index: Int,
content_index: Int,
annotation_index: Int,
item_id: String,
annotation: dynamic.Dynamic,
)
EventResponseCustomToolCallInputDelta(
sequence_number: Int,
output_index: Int,
item_id: String,
delta: String,
)
EventResponseCustomToolCallInputDone(
sequence_number: Int,
output_index: Int,
item_id: String,
input: String,
)
EventResponseError(
sequence_number: Int,
code: option.Option(String),
message: String,
param: option.Option(String),
)
}
Constructors
-
EventResponseCreated(sequence_number: Int, response: Response) -
EventResponseInProgress(sequence_number: Int, response: Response) -
EventResponseCompleted(sequence_number: Int, response: Response) -
EventResponseFailed(sequence_number: Int, response: Response) -
EventResponseIncomplete(sequence_number: Int, response: Response) -
EventResponseQueued(sequence_number: Int, response: Response) -
EventResponseOutputItemAdded( sequence_number: Int, output_index: Int, item: OutputItem, ) -
EventResponseOutputItemDone( sequence_number: Int, output_index: Int, item: OutputItem, ) -
EventResponseContentPartAdded( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, part: OutputContent, ) -
EventResponseContentPartDone( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, part: OutputContent, ) -
EventResponseOutputTextDelta( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, delta: String, logprobs: option.Option(List(ResponseLogProb)), ) -
EventResponseOutputTextDone( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, text: String, logprobs: option.Option(List(ResponseLogProb)), ) -
EventResponseRefusalDelta( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, delta: String, ) -
EventResponseRefusalDone( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, refusal: String, ) -
EventResponseFunctionCallArgumentsDelta( sequence_number: Int, item_id: String, output_index: Int, delta: String, ) -
EventResponseFunctionCallArgumentsDone( name: option.Option(String), sequence_number: Int, item_id: String, output_index: Int, arguments: String, ) -
EventResponseFileSearchCallInProgress( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseFileSearchCallSearching( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseFileSearchCallCompleted( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseWebSearchCallInProgress( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseWebSearchCallSearching( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseWebSearchCallCompleted( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseReasoningSummaryPartAdded( sequence_number: Int, item_id: String, output_index: Int, summary_index: Int, part: SummaryPart, ) -
EventResponseReasoningSummaryPartDone( sequence_number: Int, item_id: String, output_index: Int, summary_index: Int, part: SummaryPart, ) -
EventResponseReasoningSummaryTextDelta( sequence_number: Int, item_id: String, output_index: Int, summary_index: Int, delta: String, ) -
EventResponseReasoningSummaryTextDone( sequence_number: Int, item_id: String, output_index: Int, summary_index: Int, text: String, ) -
EventResponseReasoningTextDelta( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, delta: String, ) -
EventResponseReasoningTextDone( sequence_number: Int, item_id: String, output_index: Int, content_index: Int, text: String, ) -
EventResponseImageGenCallCompleted( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseImageGenCallGenerating( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseImageGenCallInProgress( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseImageGenCallPartialImage( sequence_number: Int, output_index: Int, item_id: String, partial_image_index: Int, partial_image_b64: String, ) -
EventResponseMcpCallArgumentsDelta( sequence_number: Int, output_index: Int, item_id: String, delta: String, ) -
EventResponseMcpCallArgumentsDone( sequence_number: Int, output_index: Int, item_id: String, arguments: String, ) -
EventResponseMcpCallCompleted( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseMcpCallFailed( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseMcpCallInProgress( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseMcpListToolsCompleted( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseMcpListToolsFailed( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseMcpListToolsInProgress( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseCodeInterpreterCallInProgress( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseCodeInterpreterCallInterpreting( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseCodeInterpreterCallCompleted( sequence_number: Int, output_index: Int, item_id: String, ) -
EventResponseCodeInterpreterCallCodeDelta( sequence_number: Int, output_index: Int, item_id: String, delta: String, ) -
EventResponseCodeInterpreterCallCodeDone( sequence_number: Int, output_index: Int, item_id: String, code: String, ) -
EventResponseOutputTextAnnotationAdded( sequence_number: Int, output_index: Int, content_index: Int, annotation_index: Int, item_id: String, annotation: dynamic.Dynamic, ) -
EventResponseCustomToolCallInputDelta( sequence_number: Int, output_index: Int, item_id: String, delta: String, ) -
EventResponseCustomToolCallInputDone( sequence_number: Int, output_index: Int, item_id: String, input: String, ) -
EventResponseError( sequence_number: Int, code: option.Option(String), message: String, param: option.Option(String), )
pub type ResponseStreamOptions {
ResponseStreamOptions(include_obfuscation: option.Option(Bool))
}
Constructors
-
ResponseStreamOptions(include_obfuscation: option.Option(Bool))
pub type ResponseTextParam {
ResponseTextParam(
format: TextResponseFormatConfiguration,
verbosity: option.Option(Verbosity),
)
}
Constructors
-
ResponseTextParam( format: TextResponseFormatConfiguration, verbosity: option.Option(Verbosity), )
pub type ResponseTopLogProb {
ResponseTopLogProb(logprob: Float, token: String)
}
Constructors
-
ResponseTopLogProb(logprob: Float, token: String)
pub type Role {
RoleUser
RoleAssistant
RoleSystem
RoleDeveloper
}
Constructors
-
RoleUser -
RoleAssistant -
RoleSystem -
RoleDeveloper
pub type ScrollParam {
ScrollParam(scroll_x: Int, scroll_y: Int, x: Int, y: Int)
}
Constructors
-
ScrollParam(scroll_x: Int, scroll_y: Int, x: Int, y: Int)
pub type SearchContentType {
SearchText
SearchImage
}
Constructors
-
SearchText -
SearchImage
pub type ServiceTier {
ServiceTierAuto
ServiceTierDefault
ServiceTierFlex
ServiceTierScale
ServiceTierPriority
}
Constructors
-
ServiceTierAuto -
ServiceTierDefault -
ServiceTierFlex -
ServiceTierScale -
ServiceTierPriority
Tagged by “type”.
pub type SummaryPart {
SummaryPartSummaryText(SummaryTextContent)
}
Constructors
-
SummaryPartSummaryText(SummaryTextContent)
pub type SummaryTextContent {
SummaryTextContent(text: String)
}
Constructors
-
SummaryTextContent(text: String)
Tagged by “type”.
pub type TextResponseFormatConfiguration {
TextFormatText
TextFormatJsonObject
TextFormatJsonSchema(shared.ResponseFormatJsonSchema)
}
Constructors
-
TextFormatText -
TextFormatJsonObject -
TextFormatJsonSchema(shared.ResponseFormatJsonSchema)
pub type TokenCountsResource {
TokenCountsResource(object: String, input_tokens: Int)
}
Constructors
-
TokenCountsResource(object: String, input_tokens: Int)
All tool definitions. Tagged by “type”.
pub type Tool {
ToolFunction(FunctionTool)
ToolFileSearch(FileSearchTool)
ToolComputerUsePreview(ComputerUsePreviewTool)
ToolWebSearch(WebSearchTool)
ToolWebSearch20250826(WebSearchTool)
ToolMcp(dynamic.Dynamic)
ToolCodeInterpreter(CodeInterpreterTool)
ToolImageGeneration(ImageGenTool)
ToolLocalShell
ToolShell(FunctionShellToolParam)
ToolCustom(CustomToolParam)
ToolComputer
ToolNamespace(NamespaceToolParam)
ToolToolSearch(ToolSearchToolParam)
ToolWebSearchPreview(WebSearchTool)
ToolWebSearchPreview20250311(WebSearchTool)
ToolApplyPatch
}
Constructors
-
ToolFunction(FunctionTool) -
ToolFileSearch(FileSearchTool) -
ToolComputerUsePreview(ComputerUsePreviewTool) -
ToolWebSearch(WebSearchTool) -
ToolWebSearch20250826(WebSearchTool) -
ToolMcp(dynamic.Dynamic) -
ToolCodeInterpreter(CodeInterpreterTool) -
ToolImageGeneration(ImageGenTool) -
ToolLocalShell -
ToolShell(FunctionShellToolParam) -
ToolCustom(CustomToolParam) -
ToolComputer -
ToolNamespace(NamespaceToolParam) -
ToolToolSearch(ToolSearchToolParam) -
ToolWebSearchPreview(WebSearchTool) -
ToolWebSearchPreview20250311(WebSearchTool) -
ToolApplyPatch
pub type ToolChoiceAllowed {
ToolChoiceAllowed(
mode: ToolChoiceAllowedMode,
tools: dynamic.Dynamic,
)
}
Constructors
-
ToolChoiceAllowed( mode: ToolChoiceAllowedMode, tools: dynamic.Dynamic, )
pub type ToolChoiceAllowedMode {
AllowedModeAuto
AllowedModeRequired
}
Constructors
-
AllowedModeAuto -
AllowedModeRequired
pub type ToolChoiceCustom {
ToolChoiceCustom(name: String)
}
Constructors
-
ToolChoiceCustom(name: String)
pub type ToolChoiceFunction {
ToolChoiceFunction(name: String)
}
Constructors
-
ToolChoiceFunction(name: String)
pub type ToolChoiceMcp {
ToolChoiceMcp(name: String, server_label: String)
}
Constructors
-
ToolChoiceMcp(name: String, server_label: String)
pub type ToolChoiceOptions {
ToolChoiceNone
ToolChoiceAuto
ToolChoiceRequired
}
Constructors
-
ToolChoiceNone -
ToolChoiceAuto -
ToolChoiceRequired
How the model should select which tool to use. Complex union: tagged variants + untagged fallbacks for Mode and Hosted.
pub type ToolChoiceParam {
ToolChoiceParamAllowedTools(ToolChoiceAllowed)
ToolChoiceParamFunction(ToolChoiceFunction)
ToolChoiceParamMcp(ToolChoiceMcp)
ToolChoiceParamCustom(ToolChoiceCustom)
ToolChoiceParamApplyPatch
ToolChoiceParamShell
ToolChoiceParamHosted(ToolChoiceTypes)
ToolChoiceParamMode(ToolChoiceOptions)
}
Constructors
-
ToolChoiceParamAllowedTools(ToolChoiceAllowed) -
ToolChoiceParamFunction(ToolChoiceFunction) -
ToolChoiceParamMcp(ToolChoiceMcp) -
ToolChoiceParamCustom(ToolChoiceCustom) -
ToolChoiceParamApplyPatch -
ToolChoiceParamShell -
ToolChoiceParamHosted(ToolChoiceTypes) -
ToolChoiceParamMode(ToolChoiceOptions)
Tagged by “type”.
pub type ToolChoiceTypes {
ToolChoiceFileSearch
ToolChoiceWebSearchPreview
ToolChoiceComputer
ToolChoiceComputerUsePreview
ToolChoiceComputerUse
ToolChoiceWebSearchPreview20250311
ToolChoiceCodeInterpreter
ToolChoiceImageGeneration
}
Constructors
-
ToolChoiceFileSearch -
ToolChoiceWebSearchPreview -
ToolChoiceComputer -
ToolChoiceComputerUsePreview -
ToolChoiceComputerUse -
ToolChoiceWebSearchPreview20250311 -
ToolChoiceCodeInterpreter -
ToolChoiceImageGeneration
pub type ToolSearchCall {
ToolSearchCall(
id: String,
call_id: option.Option(String),
execution: ToolSearchExecutionType,
arguments: dynamic.Dynamic,
status: FunctionCallStatus,
created_by: option.Option(String),
)
}
Constructors
-
ToolSearchCall( id: String, call_id: option.Option(String), execution: ToolSearchExecutionType, arguments: dynamic.Dynamic, status: FunctionCallStatus, created_by: option.Option(String), )
pub type ToolSearchCallItemParam {
ToolSearchCallItemParam(
id: option.Option(String),
call_id: option.Option(String),
execution: option.Option(ToolSearchExecutionType),
arguments: dynamic.Dynamic,
status: option.Option(OutputStatus),
)
}
Constructors
-
ToolSearchCallItemParam( id: option.Option(String), call_id: option.Option(String), execution: option.Option(ToolSearchExecutionType), arguments: dynamic.Dynamic, status: option.Option(OutputStatus), )
pub type ToolSearchExecutionType {
ExecutionServer
ExecutionClient
}
Constructors
-
ExecutionServer -
ExecutionClient
pub type ToolSearchOutput {
ToolSearchOutput(
id: String,
call_id: option.Option(String),
execution: ToolSearchExecutionType,
tools: dynamic.Dynamic,
status: FunctionCallStatus,
created_by: option.Option(String),
)
}
Constructors
-
ToolSearchOutput( id: String, call_id: option.Option(String), execution: ToolSearchExecutionType, tools: dynamic.Dynamic, status: FunctionCallStatus, created_by: option.Option(String), )
pub type ToolSearchOutputItemParam {
ToolSearchOutputItemParam(
id: option.Option(String),
call_id: option.Option(String),
execution: option.Option(ToolSearchExecutionType),
tools: dynamic.Dynamic,
status: option.Option(OutputStatus),
)
}
Constructors
-
ToolSearchOutputItemParam( id: option.Option(String), call_id: option.Option(String), execution: option.Option(ToolSearchExecutionType), tools: dynamic.Dynamic, status: option.Option(OutputStatus), )
pub type ToolSearchToolParam {
ToolSearchToolParam(
execution: option.Option(ToolSearchExecutionType),
description: option.Option(String),
parameters: option.Option(dynamic.Dynamic),
)
}
Constructors
-
ToolSearchToolParam( execution: option.Option(ToolSearchExecutionType), description: option.Option(String), parameters: option.Option(dynamic.Dynamic), )
pub type Truncation {
TruncationAuto
TruncationDisabled
}
Constructors
-
TruncationAuto -
TruncationDisabled
pub type TypeActionParam {
TypeActionParam(text: String)
}
Constructors
-
TypeActionParam(text: String)
pub type UrlCitationBody {
UrlCitationBody(
end_index: Int,
start_index: Int,
title: String,
url: String,
)
}
Constructors
-
UrlCitationBody( end_index: Int, start_index: Int, title: String, url: String, )
pub type Verbosity {
VerbosityLow
VerbosityMedium
VerbosityHigh
}
Constructors
-
VerbosityLow -
VerbosityMedium -
VerbosityHigh
pub type WebSearchActionFind {
WebSearchActionFind(url: String, pattern: String)
}
Constructors
-
WebSearchActionFind(url: String, pattern: String)
pub type WebSearchActionOpenPage {
WebSearchActionOpenPage(url: option.Option(String))
}
Constructors
-
WebSearchActionOpenPage(url: option.Option(String))
pub type WebSearchActionSearch {
WebSearchActionSearch(
query: String,
sources: option.Option(List(WebSearchActionSearchSource)),
)
}
Constructors
-
WebSearchActionSearch( query: String, sources: option.Option(List(WebSearchActionSearchSource)), )
pub type WebSearchActionSearchSource {
WebSearchActionSearchSource(source_type: String, url: String)
}
Constructors
-
WebSearchActionSearchSource(source_type: String, url: String)
pub type WebSearchApproximateLocation {
WebSearchApproximateLocation(
city: option.Option(String),
country: option.Option(String),
region: option.Option(String),
timezone: option.Option(String),
)
}
Constructors
-
WebSearchApproximateLocation( city: option.Option(String), country: option.Option(String), region: option.Option(String), timezone: option.Option(String), )
pub type WebSearchTool {
WebSearchTool(
filters: option.Option(WebSearchToolFilters),
user_location: option.Option(WebSearchApproximateLocation),
search_context_size: option.Option(
WebSearchToolSearchContextSize,
),
search_content_types: option.Option(List(SearchContentType)),
)
}
Constructors
-
WebSearchTool( filters: option.Option(WebSearchToolFilters), user_location: option.Option(WebSearchApproximateLocation), search_context_size: option.Option( WebSearchToolSearchContextSize, ), search_content_types: option.Option(List(SearchContentType)), )
pub type WebSearchToolCall {
WebSearchToolCall(
action: WebSearchToolCallAction,
id: String,
status: WebSearchToolCallStatus,
)
}
Constructors
-
WebSearchToolCall( action: WebSearchToolCallAction, id: String, status: WebSearchToolCallStatus, )
Tagged by “type”.
pub type WebSearchToolCallAction {
WebSearchActionSearchVariant(WebSearchActionSearch)
WebSearchActionOpenPageVariant(WebSearchActionOpenPage)
WebSearchActionFindVariant(WebSearchActionFind)
WebSearchActionFindInPageVariant(WebSearchActionFind)
}
Constructors
-
WebSearchActionSearchVariant(WebSearchActionSearch) -
WebSearchActionOpenPageVariant(WebSearchActionOpenPage) -
WebSearchActionFindVariant(WebSearchActionFind) -
WebSearchActionFindInPageVariant(WebSearchActionFind)
pub type WebSearchToolCallStatus {
WebSearchInProgress
WebSearchSearching
WebSearchCompleted
WebSearchFailed
}
Constructors
-
WebSearchInProgress -
WebSearchSearching -
WebSearchCompleted -
WebSearchFailed
pub type WebSearchToolFilters {
WebSearchToolFilters(
allowed_domains: option.Option(List(String)),
)
}
Constructors
-
WebSearchToolFilters( allowed_domains: option.Option(List(String)), )
pub type WebSearchToolSearchContextSize {
WebSearchContextLow
WebSearchContextMedium
WebSearchContextHigh
}
Constructors
-
WebSearchContextLow -
WebSearchContextMedium -
WebSearchContextHigh
Values
pub fn annotation_decoder() -> decode.Decoder(Annotation)
pub fn cancel_request(
config: config.Config,
response_id: String,
) -> request.Request(String)
Build a request to cancel a background response.
pub fn cancel_response(
response: response.Response(String),
) -> Result(Response, error.GlopenaiError)
Parse the response from cancelling a response.
pub fn compact_request(
config: config.Config,
body: json.Json,
) -> request.Request(String)
Build a request to compact a conversation.
pub fn compact_response(
response: response.Response(String),
) -> Result(CompactResource, error.GlopenaiError)
Parse the response from compacting a conversation.
pub fn compaction_body_decoder() -> decode.Decoder(CompactionBody)
pub fn conversation_decoder() -> decode.Decoder(Conversation)
pub fn conversation_param_to_json(
c: ConversationParam,
) -> json.Json
pub fn create_request(
config: config.Config,
params: CreateResponse,
) -> request.Request(String)
Build a request to create a response.
pub fn create_response_response(
response: response.Response(String),
) -> Result(Response, error.GlopenaiError)
Parse the response from creating a response.
pub fn create_response_to_json(
request: CreateResponse,
) -> json.Json
pub fn custom_tool_call_decoder() -> decode.Decoder(
CustomToolCall,
)
pub fn delete_request(
config: config.Config,
response_id: String,
) -> request.Request(String)
Build a request to delete a response by ID.
pub fn delete_response(
response: response.Response(String),
) -> Result(DeleteResponse, error.GlopenaiError)
Parse the response from deleting a response.
pub fn easy_input_content_to_json(
c: EasyInputContent,
) -> json.Json
pub fn easy_input_message_to_json(
m: EasyInputMessage,
) -> json.Json
pub fn error_object_decoder() -> decode.Decoder(ErrorObject)
pub fn file_search_tool_call_decoder() -> decode.Decoder(
FileSearchToolCall,
)
pub fn function_tool_call_decoder() -> decode.Decoder(
FunctionToolCall,
)
pub fn function_tool_to_json(tool: FunctionTool) -> json.Json
pub fn get_input_token_counts_request(
config: config.Config,
body: json.Json,
) -> request.Request(String)
Build a request to count input tokens.
pub fn get_input_token_counts_response(
response: response.Response(String),
) -> Result(TokenCountsResource, error.GlopenaiError)
Parse the response from counting input tokens.
pub fn image_gen_action_to_json(
a: ImageGenActionEnum,
) -> json.Json
pub fn image_gen_bg_to_json(
b: ImageGenToolBackground,
) -> json.Json
pub fn image_gen_fmt_to_json(
f: ImageGenToolOutputFormat,
) -> json.Json
pub fn image_gen_moderation_to_json(
m: ImageGenToolModeration,
) -> json.Json
pub fn image_gen_quality_to_json(
q: ImageGenToolQuality,
) -> json.Json
pub fn image_gen_size_to_json(s: ImageGenToolSize) -> json.Json
pub fn image_gen_tool_call_decoder() -> decode.Decoder(
ImageGenToolCall,
)
pub fn image_gen_tool_to_json(tool: ImageGenTool) -> json.Json
pub fn include_enum_to_json(i: IncludeEnum) -> json.Json
pub fn input_content_to_json(content: InputContent) -> json.Json
pub fn input_fidelity_to_json(f: InputFidelity) -> json.Json
pub fn input_param_to_json(input: InputParam) -> json.Json
pub fn input_role_decoder() -> decode.Decoder(InputRole)
pub fn item_to_json(item: Item) -> json.Json
Encode the item tagged union. Since this has many variants, we encode just the type tag + the inner struct’s fields.
pub fn list_input_items_request(
config: config.Config,
response_id: String,
) -> request.Request(String)
Build a request to list input items for a response.
pub fn list_input_items_response(
response: response.Response(String),
) -> Result(ResponseItemList, error.GlopenaiError)
Parse the response from listing input items.
pub fn mcp_tool_call_decoder() -> decode.Decoder(McpToolCall)
pub fn message_phase_decoder() -> decode.Decoder(MessagePhase)
pub fn message_phase_to_json(phase: MessagePhase) -> json.Json
pub fn new_create_response(
input input: InputParam,
) -> CreateResponse
Create a new response request with required input.
pub fn output_content_decoder() -> decode.Decoder(OutputContent)
pub fn output_item_decoder() -> decode.Decoder(OutputItem)
pub fn output_message_content_decoder() -> decode.Decoder(
OutputMessageContent,
)
pub fn output_message_decoder() -> decode.Decoder(OutputMessage)
pub fn output_status_decoder() -> decode.Decoder(OutputStatus)
pub fn output_status_to_json(s: OutputStatus) -> json.Json
pub fn output_text_content_decoder() -> decode.Decoder(
OutputTextContent,
)
pub fn parse_stream_event(
data: String,
) -> Result(
option.Option(ResponseStreamEvent),
error.GlopenaiError,
)
Parse a single SSE data line from the Responses API streaming endpoint.
Returns Ok(Some(event)) for data, Ok(None) for the [DONE] sentinel.
pub fn prompt_cache_retention_decoder() -> decode.Decoder(
PromptCacheRetention,
)
pub fn prompt_cache_retention_to_json(
r: PromptCacheRetention,
) -> json.Json
pub fn prompt_decoder() -> decode.Decoder(Prompt)
pub fn rank_version_type_to_json(r: RankVersionType) -> json.Json
pub fn reasoning_decoder() -> decode.Decoder(Reasoning)
pub fn reasoning_item_decoder() -> decode.Decoder(ReasoningItem)
pub fn reasoning_summary_decoder() -> decode.Decoder(
ReasoningSummary,
)
pub fn reasoning_summary_to_json(
s: ReasoningSummary,
) -> json.Json
pub fn response_decoder() -> decode.Decoder(Response)
pub fn response_log_prob_decoder() -> decode.Decoder(
ResponseLogProb,
)
pub fn response_status_decoder() -> decode.Decoder(ResponseStatus)
pub fn response_status_to_json(s: ResponseStatus) -> json.Json
pub fn response_stream_event_decoder() -> decode.Decoder(
ResponseStreamEvent,
)
pub fn response_stream_options_to_json(
o: ResponseStreamOptions,
) -> json.Json
pub fn response_text_param_decoder() -> decode.Decoder(
ResponseTextParam,
)
pub fn response_text_param_to_json(
p: ResponseTextParam,
) -> json.Json
pub fn retrieve_request(
config: config.Config,
response_id: String,
) -> request.Request(String)
Build a request to retrieve a response by ID.
pub fn retrieve_response(
response: response.Response(String),
) -> Result(Response, error.GlopenaiError)
Parse the response from retrieving a response.
pub fn role_decoder() -> decode.Decoder(Role)
pub fn search_content_type_to_json(
t: SearchContentType,
) -> json.Json
pub fn service_tier_decoder() -> decode.Decoder(ServiceTier)
pub fn service_tier_to_json(t: ServiceTier) -> json.Json
pub fn summary_part_decoder() -> decode.Decoder(SummaryPart)
pub fn text_response_format_decoder() -> decode.Decoder(
TextResponseFormatConfiguration,
)
pub fn text_response_format_to_json(
f: TextResponseFormatConfiguration,
) -> json.Json
pub fn tool_choice_options_to_json(
o: ToolChoiceOptions,
) -> json.Json
pub fn tool_choice_param_to_json(
tc: ToolChoiceParam,
) -> json.Json
pub fn tool_search_execution_type_to_json(
t: ToolSearchExecutionType,
) -> json.Json
pub fn truncation_decoder() -> decode.Decoder(Truncation)
pub fn truncation_to_json(t: Truncation) -> json.Json
pub fn verbosity_decoder() -> decode.Decoder(Verbosity)
pub fn web_search_context_size_to_json(
s: WebSearchToolSearchContextSize,
) -> json.Json
pub fn web_search_tool_call_decoder() -> decode.Decoder(
WebSearchToolCall,
)
pub fn web_search_tool_to_json(tool: WebSearchTool) -> json.Json
pub fn with_background(
request: CreateResponse,
background: Bool,
) -> CreateResponse
pub fn with_conversation(
request: CreateResponse,
conversation: ConversationParam,
) -> CreateResponse
pub fn with_include(
request: CreateResponse,
include: List(IncludeEnum),
) -> CreateResponse
pub fn with_instructions(
request: CreateResponse,
instructions: String,
) -> CreateResponse
pub fn with_max_output_tokens(
request: CreateResponse,
max_output_tokens: Int,
) -> CreateResponse
pub fn with_metadata(
request: CreateResponse,
metadata: dict.Dict(String, String),
) -> CreateResponse
pub fn with_model(
request: CreateResponse,
model: String,
) -> CreateResponse
pub fn with_previous_response_id(
request: CreateResponse,
previous_response_id: String,
) -> CreateResponse
pub fn with_reasoning(
request: CreateResponse,
reasoning: Reasoning,
) -> CreateResponse
pub fn with_service_tier(
request: CreateResponse,
tier: ServiceTier,
) -> CreateResponse
pub fn with_store(
request: CreateResponse,
store: Bool,
) -> CreateResponse
pub fn with_stream(
request: CreateResponse,
stream: Bool,
) -> CreateResponse
pub fn with_temperature(
request: CreateResponse,
temperature: Float,
) -> CreateResponse
pub fn with_text(
request: CreateResponse,
text: ResponseTextParam,
) -> CreateResponse
pub fn with_tool_choice(
request: CreateResponse,
tool_choice: ToolChoiceParam,
) -> CreateResponse
pub fn with_tools(
request: CreateResponse,
tools: List(Tool),
) -> CreateResponse
pub fn with_top_p(
request: CreateResponse,
top_p: Float,
) -> CreateResponse
pub fn with_truncation(
request: CreateResponse,
truncation: Truncation,
) -> CreateResponse