diff --git a/README.md b/README.md index defaa3ce..feb74454 100644 --- a/README.md +++ b/README.md @@ -423,11 +423,11 @@ final chat = await OpenAI.instance.chat.create( final message = chat.choices.first.message; -// Wether the message has a tool call. +// Whether the message has a tool call. if (message.haveToolCalls) { final call = message.toolCalls!.first; - // Wether the tool call is the one we sent. + // Whether the tool call is the one we sent. if (call.function.name == "sumOfTwoNumbers") { // decode the arguments from the tool call. final decodedArgs = jsonDecode(call.function.arguments); diff --git a/example/lib/simple_tools_demo.dart b/example/lib/simple_tools_demo.dart index f86ff48e..8dc6d88b 100644 --- a/example/lib/simple_tools_demo.dart +++ b/example/lib/simple_tools_demo.dart @@ -50,11 +50,11 @@ void main() async { final message = chat.choices.first.message; -// Wether the message has a tool call. +// Whether the message has a tool call. if (message.haveToolCalls) { final call = message.toolCalls!.first; - // Wether the tool call is the one we sent. + // Whether the tool call is the one we sent. if (call.function.name == "sumOfTwoNumbers") { // decode the arguments from the tool call. final decodedArgs = jsonDecode(call.function.arguments); diff --git a/lib/src/core/models/chat/stream/chat.dart b/lib/src/core/models/chat/stream/chat.dart index 2c33cce5..293d8c2f 100644 --- a/lib/src/core/models/chat/stream/chat.dart +++ b/lib/src/core/models/chat/stream/chat.dart @@ -21,10 +21,10 @@ final class OpenAIStreamChatCompletionModel { /// This fingerprint represents the backend configuration that the model runs with. final String? systemFingerprint; - /// Wether the chat completion have at least one choice in [choices]. + /// Whether the chat completion have at least one choice in [choices]. bool get haveChoices => choices.isNotEmpty; - /// Wether the chat completion have a [systemFingerprint] or not. + /// Whether the chat completion have a [systemFingerprint] or not. bool get haveSystemFingerprint => systemFingerprint != null; @override diff --git a/lib/src/core/utils/logger.dart b/lib/src/core/utils/logger.dart index 6cae16f8..40361a4b 100644 --- a/lib/src/core/utils/logger.dart +++ b/lib/src/core/utils/logger.dart @@ -13,12 +13,12 @@ abstract final class OpenAILogger { static const int _kValidApiKeyLength = 10; /// {@template openai_logger_is_active} - /// Wether the to show operations flow logger is active or not. + /// Whether the to show operations flow logger is active or not. /// {@endtemplate} static bool _isActive = true; /// {@template openai_logger_show_responses_logs} - /// Wether to show operations response bodies in logs or not. + /// Whether to show operations response bodies in logs or not. /// {@endtemplate} static bool _showResponsesLogs = false; diff --git a/lib/src/instance/openai.dart b/lib/src/instance/openai.dart index b66d6cbd..83b41f9c 100644 --- a/lib/src/instance/openai.dart +++ b/lib/src/instance/openai.dart @@ -154,7 +154,7 @@ final class OpenAI extends OpenAIClientBase { OpenAILogger.showResponsesLogs = showResponsesLogs; } - // /// Wether the package is running on the web or not, example of this is the use of Flutter web. + // /// Whether the package is running on the web or not, example of this is the use of Flutter web. // /// // /// By default it is set to [false]. // ///