We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 47f02d6 + e279506 commit 95e1d08Copy full SHA for 95e1d08
src/OllamaSharp/MicrosoftAi/AbstractionMapper.cs
@@ -358,8 +358,8 @@ public static ChatResponseUpdate ToChatResponseUpdate(ChatResponseStream? respon
358
ModelId = done.Model
359
};
360
}
361
-
362
- return new ChatResponseUpdate(ToAbstractionRole(response?.Message.Role), contents)
+
+ return new ChatResponseUpdate(ToAbstractionRole(response?.Message?.Role), contents)
363
{
364
// no need to set "Contents" as we set the text
365
CreatedAt = response?.CreatedAt,
@@ -536,4 +536,4 @@ public static GeneratedEmbeddings<Embedding<float>> ToGeneratedEmbeddings(EmbedR
536
537
538
539
-}
+}
0 commit comments