Skip to content

Commit

Permalink
fix: Default store field to null in openai_dart to support Azure and …
Browse files Browse the repository at this point in the history
…Groq APIs (#608)
  • Loading branch information
davidmigloz authored Nov 29, 2024
1 parent 7cfc4dd commit 2133296
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CreateChatCompletionRequest with _$CreateChatCompletionRequest {
/// 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.
@JsonKey(includeIfNull: false) @Default(false) bool? store,
@JsonKey(includeIfNull: false) bool? store,

/// Developer-defined tags and values used for filtering completions
/// in the [dashboard](https://platform.openai.com/chat-completions).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4313,7 +4313,7 @@ class _$CreateChatCompletionRequestImpl extends _CreateChatCompletionRequest {
const _$CreateChatCompletionRequestImpl(
{@_ChatCompletionModelConverter() required this.model,
required final List<ChatCompletionMessage> messages,
@JsonKey(includeIfNull: false) this.store = false,
@JsonKey(includeIfNull: false) this.store,
@JsonKey(includeIfNull: false) final Map<String, String>? metadata,
@JsonKey(name: 'frequency_penalty', includeIfNull: false)
this.frequencyPenalty = 0.0,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/openai_dart/oas/openapi_curated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,6 @@ components:
$ref: "#/components/schemas/ChatCompletionMessage"
store:
type: boolean
default: false
nullable: true
description: |
Whether or not to store the output of this chat completion request for use in our
Expand Down

0 comments on commit 2133296

Please sign in to comment.