Merge pull request 'Handle streaming edge cases' (#35) from bugfix/handle-streaming-edge-case into master

Reviewed-on: https://192.168.8.63/git/darthrubik/drharness/pulls/35
This commit was merged in pull request #35.
This commit is contained in:
2026-07-06 11:16:00 -05:00
+4
View File
@@ -132,6 +132,10 @@ std::expected<Message, std::string> OllamaClient::chat(const std::vector<Message
std::string new_packet = sum.substr(0,sum.find("\n\n"));
sum = sum.substr(sum.find("\n\n")+2);
if (!new_packet.starts_with("data: ")){
continue;
}
//std::cerr << new_packet << std::endl;
auto j = parse_json_safely(new_packet.substr(6));
if (j.is_discarded())