Skip to content

Commit

Permalink
Handle case of language level not being int in bot-options state event
Browse files Browse the repository at this point in the history
  • Loading branch information
ggurdin committed Sep 12, 2024
1 parent 489129f commit 4e8000e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/pangea/models/bot_options_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class BotOptionsModel {
//////////////////////////////////////////////////////////////////////////
// General Bot Options
//////////////////////////////////////////////////////////////////////////
languageLevel: json[ModelKey.languageLevel],
languageLevel: json[ModelKey.languageLevel] is int
? json[ModelKey.languageLevel]
: null,
safetyModeration: json[ModelKey.safetyModeration] ?? true,
mode: json[ModelKey.mode] ?? "discussion",

Expand Down

0 comments on commit 4e8000e

Please sign in to comment.