-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for maxCompletionTokens and reasoningTokens in open…
…ai_dart (#556)
- Loading branch information
1 parent
9ceb5ff
commit 37d75b6
Showing
19 changed files
with
853 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packages/openai_dart/lib/src/generated/schema/completion_tokens_details.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
// ignore_for_file: type=lint | ||
// ignore_for_file: invalid_annotation_target | ||
part of open_a_i_schema; | ||
|
||
// ========================================== | ||
// CLASS: CompletionTokensDetails | ||
// ========================================== | ||
|
||
/// Breakdown of tokens used in a completion. | ||
@freezed | ||
class CompletionTokensDetails with _$CompletionTokensDetails { | ||
const CompletionTokensDetails._(); | ||
|
||
/// Factory constructor for CompletionTokensDetails | ||
const factory CompletionTokensDetails({ | ||
/// Tokens generated by the model for reasoning. | ||
@JsonKey(name: 'reasoning_tokens', includeIfNull: false) | ||
int? reasoningTokens, | ||
}) = _CompletionTokensDetails; | ||
|
||
/// Object construction from a JSON representation | ||
factory CompletionTokensDetails.fromJson(Map<String, dynamic> json) => | ||
_$CompletionTokensDetailsFromJson(json); | ||
|
||
/// List of all property names of schema | ||
static const List<String> propertyNames = ['reasoning_tokens']; | ||
|
||
/// Perform validations on the schema property values | ||
String? validateSchema() { | ||
return null; | ||
} | ||
|
||
/// Map representation of object (not serialized) | ||
Map<String, dynamic> toMap() { | ||
return { | ||
'reasoning_tokens': reasoningTokens, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.