Skip to content

Commit

Permalink
[ Edit ] fixed the analyzer issues
Browse files Browse the repository at this point in the history
  • Loading branch information
anasfik committed Nov 17, 2023
1 parent 362c5a8 commit 45bb0be
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
File renamed without changes.
20 changes: 10 additions & 10 deletions lib/src/core/base/images/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ extension StyleToStingExtension on OpenAIImageStyle {
return name;

// ! pretty sure this will be needed in the future in case of adding more styles that can't be got from the `name` field.
switch (this) {
case OpenAIImageStyle.vivid:
return "vivid";
case OpenAIImageStyle.natural:
return "natural";
}
// switch (this) {
// case OpenAIImageStyle.vivid:
// return "vivid";
// case OpenAIImageStyle.natural:
// return "natural";
// }
}
}

Expand All @@ -48,10 +48,10 @@ extension QualityToStingExtension on OpenAIImageQuality {
return name;

// ! pretty sure this will be needed in the future in case of adding more qualities that can't be got from the `name` field.
switch (this) {
case OpenAIImageQuality.hd:
return "hd";
}
// switch (this) {
// case OpenAIImageQuality.hd:
// return "hd";
// }
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/models/chat/sub_models/choices/choices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'sub_models/message.dart';
/// {@endtemplate}
final class OpenAIChatCompletionChoiceModel {
/// The [index] of the choice.
final dynamic index;
final index;

/// The [message] of the choice.
final OpenAIChatCompletionChoiceMessageModel message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class OpenAIChatCompletionChoiceMessageModel {
final OpenAIChatMessageRole role;

//! TODO: add the possibility to include images in the message content, see docs and do a non-breaking change.

/// The [content] of the message.
final List<OpenAIChatCompletionChoiceMessageContentItemModel>? content;

Expand Down Expand Up @@ -99,7 +100,7 @@ final class OpenAIChatCompletionChoiceMessageModel {

static List<OpenAIChatCompletionChoiceMessageContentItemModel>
dynamicContentFromField(
dynamic fieldData,
fieldData,
) {
if (fieldData is String) {
return [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
class OpenAIResponseFunction {
final String? name;
final dynamic arguments;
final arguments;

OpenAIResponseFunction({
required this.name,
Expand Down

0 comments on commit 45bb0be

Please sign in to comment.