Skip to content

Commit

Permalink
docs: Update OpenAI endpoints descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz committed Dec 6, 2024
1 parent c33f2e0 commit 49b7005
Show file tree
Hide file tree
Showing 19 changed files with 2,391 additions and 502 deletions.
166 changes: 145 additions & 21 deletions packages/openai_dart/lib/src/generated/client.dart

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ class AssistantObject with _$AssistantObject {
/// The description of the assistant. The maximum length is 512 characters.
required String? description,

/// 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.
/// 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) for
/// descriptions of them.
required String model,

/// The system instructions that the assistant uses. The maximum length is 256,000 characters.
Expand Down Expand Up @@ -63,7 +65,7 @@ class AssistantObject with _$AssistantObject {
@JsonKey(name: 'top_p', includeIfNull: false) @Default(1.0) double? topP,

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down Expand Up @@ -189,7 +191,7 @@ enum AssistantResponseFormatMode {
// ==========================================

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ class AssistantToolsFileSearchFileSearch
/// and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.
///
/// Note that the file search tool may output fewer than `max_num_results` results. See the
/// [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings)
/// [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
/// for more information.
@JsonKey(name: 'max_num_results', includeIfNull: false) int? maxNumResults,

/// The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and
/// a score_threshold of 0.
///
/// See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings)
/// See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
/// for more information.
@JsonKey(name: 'ranking_options', includeIfNull: false)
FileSearchRankingOptions? rankingOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ class ChatCompletionMessageImageUrl with _$ChatCompletionMessageImageUrl {
/// Either a URL of the image or the base64 encoded image data.
required String url,

/// 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).
/// 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).
@Default(ChatCompletionMessageImageDetail.auto)
ChatCompletionMessageImageDetail detail,
}) = _ChatCompletionMessageImageUrl;
Expand Down Expand Up @@ -145,7 +146,8 @@ class ChatCompletionMessageImageUrl with _$ChatCompletionMessageImageUrl {
// ENUM: ChatCompletionMessageImageDetail
// ==========================================

/// 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).
/// 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).
enum ChatCompletionMessageImageDetail {
@JsonValue('auto')
auto,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class CreateAssistantRequest with _$CreateAssistantRequest {

/// Factory constructor for CreateAssistantRequest
const factory CreateAssistantRequest({
/// 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.
/// 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) for
/// descriptions of them.
@_AssistantModelConverter() required AssistantModel model,

/// The name of the assistant. The maximum length is 256 characters.
Expand Down Expand Up @@ -54,7 +56,7 @@ class CreateAssistantRequest with _$CreateAssistantRequest {
@JsonKey(name: 'top_p', includeIfNull: false) @Default(1.0) double? topP,

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down Expand Up @@ -219,7 +221,9 @@ enum AssistantModels {
// CLASS: AssistantModel
// ==========================================

/// 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.
/// 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) for
/// descriptions of them.
@freezed
sealed class AssistantModel with _$AssistantModel {
const AssistantModel._();
Expand Down Expand Up @@ -285,7 +289,7 @@ enum CreateAssistantResponseFormatMode {
// ==========================================

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class CreateBatchRequest with _$CreateBatchRequest {
///
/// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
///
/// Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 100 MB in size.
/// Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input),
/// and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.
@JsonKey(name: 'input_file_id') required String inputFileId,

/// The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ class CreateChatCompletionRequest with _$CreateChatCompletionRequest {
double? presencePenalty,

/// 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
/// [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 ensures the model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class CreateCompletionRequest with _$CreateCompletionRequest {

/// Factory constructor for CreateCompletionRequest
const factory CreateCompletionRequest({
/// 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.
/// 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) for
/// descriptions of them.
@_CompletionModelConverter() required CompletionModel model,

/// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
Expand Down Expand Up @@ -253,7 +255,9 @@ enum CompletionModels {
// CLASS: CompletionModel
// ==========================================

/// 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.
/// 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) for
/// descriptions of them.
@freezed
sealed class CompletionModel with _$CompletionModel {
const CompletionModel._();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class CreateEmbeddingRequest with _$CreateEmbeddingRequest {

/// Factory constructor for CreateEmbeddingRequest
const factory CreateEmbeddingRequest({
/// 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.
/// 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) for
/// descriptions of them.
@_EmbeddingModelConverter() required EmbeddingModel model,

/// 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.
Expand Down Expand Up @@ -87,7 +89,9 @@ enum EmbeddingModels {
// CLASS: EmbeddingModel
// ==========================================

/// 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.
/// 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) for
/// descriptions of them.
@freezed
sealed class EmbeddingModel with _$EmbeddingModel {
const EmbeddingModel._();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class CreateMessageRequest with _$CreateMessageRequest {
sealed class CreateMessageRequestContent with _$CreateMessageRequestContent {
const CreateMessageRequestContent._();

/// 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).
/// 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).
const factory CreateMessageRequestContent.parts(
List<MessageContent> value,
) = CreateMessageRequestContentListMessageContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CreateRunRequest with _$CreateRunRequest {
bool? parallelToolCalls,

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down Expand Up @@ -410,7 +410,7 @@ enum CreateRunRequestResponseFormatMode {
// ==========================================

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class CreateThreadAndRunRequest with _$CreateThreadAndRunRequest {
bool? parallelToolCalls,

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down Expand Up @@ -436,7 +436,7 @@ enum CreateThreadAndRunRequestResponseFormatMode {
// ==========================================

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ part of open_a_i_schema;
/// The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and
/// a score_threshold of 0.
///
/// See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings)
/// See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
/// for more information.
@freezed
class FileSearchRankingOptions with _$FileSearchRankingOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class ModifyAssistantRequest with _$ModifyAssistantRequest {

/// Factory constructor for ModifyAssistantRequest
const factory ModifyAssistantRequest({
/// 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.
/// 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) for
/// descriptions of them.
@JsonKey(includeIfNull: false) String? model,

/// The name of the assistant. The maximum length is 256 characters.
Expand Down Expand Up @@ -57,7 +59,7 @@ class ModifyAssistantRequest with _$ModifyAssistantRequest {
@JsonKey(name: 'top_p', includeIfNull: false) @Default(1.0) double? topP,

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down Expand Up @@ -169,7 +171,7 @@ enum ModifyAssistantResponseFormatMode {
// ==========================================

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ part of open_a_i_schema;
// ==========================================

/// 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
/// [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 ensures the model
Expand Down
4 changes: 2 additions & 2 deletions packages/openai_dart/lib/src/generated/schema/run_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class RunObject with _$RunObject {
@JsonKey(name: 'parallel_tool_calls') required bool? parallelToolCalls,

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down Expand Up @@ -461,7 +461,7 @@ enum RunObjectResponseFormatMode {
// ==========================================

/// Specifies the format that the model must output. Compatible with
/// [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
/// [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
/// [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models
/// since `gpt-3.5-turbo-1106`.
///
Expand Down
Loading

0 comments on commit 49b7005

Please sign in to comment.