-
-
Notifications
You must be signed in to change notification settings - Fork 66
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 different content types in Assistants API and o…
…ther fixes (#412)
- Loading branch information
1 parent
326212c
commit 97acab4
Showing
26 changed files
with
2,714 additions
and
820 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
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
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
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
19 changes: 19 additions & 0 deletions
19
packages/openai_dart/lib/src/generated/schema/message_content_image_detail.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,19 @@ | ||
// 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; | ||
|
||
// ========================================== | ||
// ENUM: MessageContentImageDetail | ||
// ========================================== | ||
|
||
/// 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`. | ||
enum MessageContentImageDetail { | ||
@JsonValue('auto') | ||
auto, | ||
@JsonValue('low') | ||
low, | ||
@JsonValue('high') | ||
high, | ||
} |
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
44 changes: 44 additions & 0 deletions
44
packages/openai_dart/lib/src/generated/schema/message_content_image_url.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,44 @@ | ||
// 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: MessageContentImageUrl | ||
// ========================================== | ||
|
||
/// The image URL part of a message. | ||
@freezed | ||
class MessageContentImageUrl with _$MessageContentImageUrl { | ||
const MessageContentImageUrl._(); | ||
|
||
/// Factory constructor for MessageContentImageUrl | ||
const factory MessageContentImageUrl({ | ||
/// The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. | ||
required String url, | ||
|
||
/// 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`. | ||
@Default(MessageContentImageDetail.auto) MessageContentImageDetail detail, | ||
}) = _MessageContentImageUrl; | ||
|
||
/// Object construction from a JSON representation | ||
factory MessageContentImageUrl.fromJson(Map<String, dynamic> json) => | ||
_$MessageContentImageUrlFromJson(json); | ||
|
||
/// List of all property names of schema | ||
static const List<String> propertyNames = ['url', 'detail']; | ||
|
||
/// Perform validations on the schema property values | ||
String? validateSchema() { | ||
return null; | ||
} | ||
|
||
/// Map representation of object (not serialized) | ||
Map<String, dynamic> toMap() { | ||
return { | ||
'url': url, | ||
'detail': detail, | ||
}; | ||
} | ||
} |
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
51 changes: 51 additions & 0 deletions
51
packages/openai_dart/lib/src/generated/schema/message_delta_content_image_url_object.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,51 @@ | ||
// 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: MessageDeltaContentImageUrlObject | ||
// ========================================== | ||
|
||
/// References an image URL in the content of a message. | ||
@freezed | ||
class MessageDeltaContentImageUrlObject | ||
with _$MessageDeltaContentImageUrlObject { | ||
const MessageDeltaContentImageUrlObject._(); | ||
|
||
/// Factory constructor for MessageDeltaContentImageUrlObject | ||
const factory MessageDeltaContentImageUrlObject({ | ||
/// The index of the content part in the message. | ||
@JsonKey(includeIfNull: false) int? index, | ||
|
||
/// Always `image_url`. | ||
@JsonKey(includeIfNull: false) String? type, | ||
|
||
/// The image URL part of a message. | ||
@JsonKey(name: 'image_url', includeIfNull: false) | ||
MessageContentImageUrl? imageUrl, | ||
}) = _MessageDeltaContentImageUrlObject; | ||
|
||
/// Object construction from a JSON representation | ||
factory MessageDeltaContentImageUrlObject.fromJson( | ||
Map<String, dynamic> json) => | ||
_$MessageDeltaContentImageUrlObjectFromJson(json); | ||
|
||
/// List of all property names of schema | ||
static const List<String> propertyNames = ['index', 'type', 'image_url']; | ||
|
||
/// Perform validations on the schema property values | ||
String? validateSchema() { | ||
return null; | ||
} | ||
|
||
/// Map representation of object (not serialized) | ||
Map<String, dynamic> toMap() { | ||
return { | ||
'index': index, | ||
'type': type, | ||
'image_url': imageUrl, | ||
}; | ||
} | ||
} |
Oops, something went wrong.