/// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
/// Either a URL of the image or the base64 encoded image data.
puburl:String,
/// Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding).
/// An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text, image, or audio inputs.
/// The name and arguments of a function that should be called, as generated by the model.
#[serde(skip_serializing_if="Option::is_none")]
#[deprecated]
pubfunction_call:Option<FunctionCall>,
/// If the audio output modality is requested, this object contains data about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio).
/// 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.
pubname:String,
/// A description of what the function does, used by the model to choose when and how to call the function.
#[serde(skip_serializing_if="Option::is_none")]
pubdescription:Option<String>,
/// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/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.
/// 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.
pubname:String,
/// A description of what the function does, used by the model to choose when and how to call the function.
#[serde(skip_serializing_if="Option::is_none")]
pubdescription:Option<String>,
/// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/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.
#[serde(skip_serializing_if="Option::is_none")]
pubparameters:Option<serde_json::Value>,
/// 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).
/// A description of what the response format is for, used by the model to determine how to respond in the format.
#[serde(skip_serializing_if="Option::is_none")]
pubdescription:Option<String>,
/// 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.
pubname:String,
/// The schema for the response format, described as a JSON Schema object.
#[serde(skip_serializing_if="Option::is_none")]
pubschema:Option<serde_json::Value>,
/// 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).
/// Output types that you would like the model to generate for this request.
///
/// Most models are capable of generating text, which is the default: `["text"]`
///
/// The `gpt-4o-audio-preview` model can also be used to [generate
/// audio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]`
/// The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly.
/// The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes.
Text(String),
/// An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text inputs.
/// The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive).
pubvoice:ChatCompletionAudioVoice,
/// Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`.
/// A list of messages comprising the conversation so far. Depending on the [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are supported, like [text](https://platform.openai.com/docs/guides/text-generation), [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio).
/// See the [model endpoint compatibility](https://platform.openai.com/docs/models#model-endpoint-compatibility) table for details on which models work with the Chat API.
pubmodel:String,
/// Whether or not to store the output of this chat completion request
///
/// for use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or [evals](https://platform.openai.com/docs/guides/evals) products.
/// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
/// Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.
#[serde(skip_serializing_if="Option::is_none")]
publogprobs:Option<bool>,
/// An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.
#[serde(skip_serializing_if="Option::is_none")]
pubtop_logprobs:Option<u8>,
/// The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion.
///
/// This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
/// This value is now deprecated in favor of `max_completion_tokens`, and is
/// not compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning).
#[deprecated]
#[serde(skip_serializing_if="Option::is_none")]
pubmax_tokens:Option<u32>,
/// An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
#[serde(skip_serializing_if="Option::is_none")]
pubmax_completion_tokens:Option<u32>,
/// How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
/// Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs),which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content.
#[serde(skip_serializing_if="Option::is_none")]
pubprediction:Option<PredictionContent>,
/// Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio).
#[serde(skip_serializing_if="Option::is_none")]
pubaudio:Option<ChatCompletionAudio>,
/// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
/// An object specifying the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), [GPT-4o mini](https://platform.openai.com/docs/models/gpt-4o-mini), [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
///
/// Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which guarantees the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
///
/// Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.
///
/// **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
#[serde(skip_serializing_if="Option::is_none")]
pubresponse_format:Option<ResponseFormat>,
/// This feature is in Beta.
/// If specified, our system will make a best effort to sample deterministically, such that repeated requests
/// with the same `seed` and parameters should return the same result.
/// Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
#[serde(skip_serializing_if="Option::is_none")]
pubseed:Option<i64>,
/// Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:
/// - If set to 'auto', the system will utilize scale tier credits until they are exhausted.
/// - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.
/// - When not set, the default behavior is 'auto'.
///
/// When this parameter is set, the response body will include the `service_tier` utilized.
#[serde(skip_serializing_if="Option::is_none")]
pubservice_tier:Option<ServiceTier>,
/// Up to 4 sequences where the API will stop generating further tokens.
#[serde(skip_serializing_if="Option::is_none")]
pubstop:Option<Stop>,
/// If set, partial message deltas will be sent, like in ChatGPT.
/// Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
/// as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
/// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.
#[serde(skip_serializing_if="Option::is_none")]
pubparallel_tool_calls:Option<bool>,
/// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
#[serde(skip_serializing_if="Option::is_none")]
pubuser:Option<String>,
/// This tool searches the web for relevant results to use in a response.
/// Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
#[serde(skip_serializing_if="Option::is_none")]
pubweb_search_options:Option<WebSearchOptions>,
/// Deprecated in favor of `tool_choice`.
///
/// Controls which (if any) function is called by the model.
/// `none` means the model will not call a function and instead generates a message.
/// `auto` means the model can pick between generating a message or calling a function.
/// Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.
///
/// `none` is the default when no functions are present. `auto` is the default if functions are present.
/// If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
/// A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
/// The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.
publogprob:f32,
/// A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
pubbytes:Option<Vec<u8>>,
/// List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
/// Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
pubstructCreateChatCompletionStreamResponse{
/// A unique identifier for the chat completion. Each chunk has the same ID.
pubid:String,
/// A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the last chunk if you set `stream_options: {"include_usage": true}`.
pubchoices:Vec<ChatChoiceStream>,
/// The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
pubcreated:u32,
/// The model to generate the completion.
pubmodel:String,
/// The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request.
pubservice_tier:Option<ServiceTierResponse>,
/// This fingerprint represents the backend configuration that the model runs with.
/// Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
pubsystem_fingerprint:Option<String>,
/// The object type, which is always `chat.completion.chunk`.
pubobject:String,
/// An optional field that will only be present when you set `stream_options: {"include_usage": true}` in your request.
/// When present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.
/// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models/overview) for descriptions of them.
pubmodel:String,
/// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
///
/// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
pubprompt:Prompt,
/// The suffix that comes after a completion of inserted text.
///
/// This parameter is only supported for `gpt-3.5-turbo-instruct`.
#[serde(skip_serializing_if="Option::is_none")]
pubsuffix:Option<String>,// default: null
/// The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the completion.
///
/// The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
#[serde(skip_serializing_if="Option::is_none")]
pubmax_tokens:Option<u32>,
/// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
///
/// We generally recommend altering this or `top_p` but not both.
/// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
///
/// We generally recommend altering this or `temperature` but not both.
/// How many completions to generate for each prompt.
/// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
///
#[serde(skip_serializing_if="Option::is_none")]
pubn:Option<u8>,// min:1 max: 128, default: 1
/// Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
/// as they become available, with the stream terminated by a `data: [DONE]` message.
/// Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.
/// Echo back the prompt in addition to the completion
#[serde(skip_serializing_if="Option::is_none")]
pubecho:Option<bool>,
/// Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
#[serde(skip_serializing_if="Option::is_none")]
pubstop:Option<Stop>,
/// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
///
/// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)
/// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
///
/// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)
/// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.
///
/// When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.
///
/// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
/// Modify the likelihood of specified tokens appearing in the completion.
///
/// Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
///
/// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
#[serde(skip_serializing_if="Option::is_none")]
pubuser:Option<String>,
/// If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.
///
/// Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
/// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
pubinput:EmbeddingInput,
/// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/). Defaults to float
#[serde(skip_serializing_if="Option::is_none")]
pubencoding_format:Option<EncodingFormat>,
/// A unique identifier representing your end-user, which will help OpenAI
/// to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
#[serde(skip_serializing_if="Option::is_none")]
pubuser:Option<String>,
/// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.
#[serde(skip_serializing_if="Option::is_none")]
pubdimensions:Option<u32>,
}
/// Represents an embedding vector returned by embedding endpoint.
/// The File object (not file name) to be uploaded.
pubfile:FileInput,
/// The intended purpose of the uploaded file.
///
/// Use "assistants" for [Assistants](https://platform.openai.com/docs/api-reference/assistants) and [Message](https://platform.openai.com/docs/api-reference/messages) files, "vision" for Assistants image file inputs, "batch" for [Batch API](https://platform.openai.com/docs/guides/batch), and "fine-tune" for [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning).
/// The file identifier, which can be referenced in the API endpoints.
pubid:String,
/// The object type, which is always "file".
pubobject:String,
/// The size of the file in bytes.
pubbytes:u32,
/// The Unix timestamp (in seconds) for when the file was created.
pubcreated_at:u32,
/// The name of the file.
pubfilename:String,
/// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.
pubpurpose:OpenAIFilePurpose,
/// Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
#[deprecated]
pubstatus:Option<String>,
/// Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.
/// The ID of an uploaded file that contains training data.
///
/// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
///
/// Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.
///
/// The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.
///
/// See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning) for more details.
pubtraining_file:String,
/// The hyperparameters used for the fine-tuning job.
/// This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter.
#[deprecated]
pubhyperparameters:Option<Hyperparameters>,
/// A string of up to 64 characters that will be added to your fine-tuned model name.
///
/// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
/// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
/// If a seed is not specified, one will be generated for you.
/// The Unix timestamp (in seconds) for when the fine-tuning job was finished.
/// The value will be null if the fine-tuning job is still running.
pubfinished_at:Option<u32>,// nullable true
/// The hyperparameters used for the fine-tuning job.
/// See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.
pubhyperparameters:Hyperparameters,
/// The base model that is being fine-tuned.
pubmodel:String,
/// The object type, which is always "fine_tuning.job".
pubobject:String,
/// The organization that owns the fine-tuning job.
puborganization_id:String,
/// The compiled results file ID(s) for the fine-tuning job.
/// You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).
pubresult_files:Vec<String>,
/// The current status of the fine-tuning job, which can be either
/// `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.
pubstatus:FineTuningJobStatus,
/// The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
pubtrained_tokens:Option<u32>,
/// The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).
pubtraining_file:String,
/// The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).
pubvalidation_file:Option<String>,
/// A list of integrations to enable for this fine-tuning job.
/// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`
/// and 4000 characters for `dall-e-3`.
pubprompt:String,
/// The model to use for image generation.
#[serde(skip_serializing_if="Option::is_none")]
pubmodel:Option<ImageModel>,
/// The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
#[serde(skip_serializing_if="Option::is_none")]
pubn:Option<u8>,// min:1 max:10 default:1
/// The quality of the image that will be generated. `hd` creates images with finer details and greater
/// consistency across the image. This param is only supported for `dall-e-3`.
#[serde(skip_serializing_if="Option::is_none")]
pubquality:Option<ImageQuality>,
/// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.
#[serde(skip_serializing_if="Option::is_none")]
pubresponse_format:Option<ImageResponseFormat>,
/// The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
/// Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.
#[serde(skip_serializing_if="Option::is_none")]
pubsize:Option<ImageSize>,
/// The style of the generated images. Must be one of `vivid` or `natural`.
/// Vivid causes the model to lean towards generating hyper-real and dramatic images.
/// Natural causes the model to produce more natural, less hyper-real looking images.
/// This param is only supported for `dall-e-3`.
#[serde(skip_serializing_if="Option::is_none")]
pubstyle:Option<ImageStyle>,
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
#[serde(skip_serializing_if="Option::is_none")]
pubuser:Option<String>,
/// Control the content-moderation level for images generated by gpt-image-1.
/// Must be either `low` for less restrictive filtering or `auto` (default value).
/// The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
pubimage:ImageInput,
/// A text description of the desired image(s). The maximum length is 1000 characters.
pubprompt:String,
/// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.
pubmask:Option<ImageInput>,
/// The model to use for image generation. Only `dall-e-2` is supported at this time.
pubmodel:Option<ImageModel>,
/// The number of images to generate. Must be between 1 and 10.
pubn:Option<u8>,// min:1 max:10 default:1
/// The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
pubsize:Option<DallE2ImageSize>,
/// The format in which the generated images are returned. Must be one of `url` or `b64_json`.
pubresponse_format:Option<ImageResponseFormat>,
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
/// The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
pubimage:ImageInput,
/// The model to use for image generation. Only `dall-e-2` is supported at this time.
pubmodel:Option<ImageModel>,
/// The number of images to generate. Must be between 1 and 10.
pubn:Option<u8>,// min:1 max:10 default:1
/// The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
pubsize:Option<DallE2ImageSize>,
/// The format in which the generated images are returned. Must be one of `url` or `b64_json`.
pubresponse_format:Option<ImageResponseFormat>,
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
/// The Unix timestamp (in seconds) for when the message was completed.
pubcompleted_at:Option<u32>,
/// The Unix timestamp (in seconds) for when the message was marked as incomplete.
pubincomplete_at:Option<u32>,
/// The entity that produced the message. One of `user` or `assistant`.
pubrole:MessageRole,
/// The content of the message in array of text and/or images.
pubcontent:Vec<MessageContent>,
/// If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message.
pubassistant_id:Option<String>,
/// The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.
pubrun_id:Option<String>,
/// A list of files attached to the message, and the tools they were added to.
/// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "retrieval" tool to search files.
/// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
/// The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content.
pubfile_id:String,
/// Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.
pubdetail:Option<ImageDetail>,
}
/// References an image URL in the content of a message.
/// An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models/overview).
/// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
/// Content that expresses, incites, or promotes hate based on race, gender,
/// ethnicity, religion, nationality, sexual orientation, disability status, or
/// caste. Hateful content aimed at non-protected groups (e.g., chess players)
/// is harrassment.
pubhate:bool,
#[serde(rename="hate/threatening")]
/// Hateful content that also includes violence or serious harm towards the
/// targeted group based on race, gender, ethnicity, religion, nationality,
/// sexual orientation, disability status, or caste.
pubhate_threatening:bool,
/// Content that expresses, incites, or promotes harassing language towards any target.
pubharassment:bool,
/// Harassment content that also includes violence or serious harm towards any target.
#[serde(rename="harassment/threatening")]
pubharassment_threatening:bool,
/// Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, "how to shoplift" would fit this category.
pubillicit:bool,
/// Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon.
#[serde(rename="illicit/violent")]
pubillicit_violent:bool,
/// Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.
#[serde(rename="self-harm")]
pubself_harm:bool,
/// Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.
#[serde(rename="self-harm/intent")]
pubself_harm_intent:bool,
/// Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.
#[serde(rename="self-harm/instructions")]
pubself_harm_instructions:bool,
/// Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).
pubsexual:bool,
/// Sexual content that includes an individual who is under 18 years old.
#[serde(rename="sexual/minors")]
pubsexual_minors:bool,
/// Content that depicts death, violence, or physical injury.
pubviolence:bool,
/// Content that depicts death, violence, or physical injury in graphic detail.
#[serde(rename="violence/graphic")]
pubviolence_graphic:bool,
}
/// A list of the categories along with their scores as predicted by model.