mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-08 07:10:32 +00:00
Remove newlines too.
This commit is contained in:
parent
f8b962d50a
commit
fdf7f20d90
2
llm.cpp
2
llm.cpp
@ -82,7 +82,7 @@ void LLMObject::resetContext()
|
|||||||
|
|
||||||
std::string remove_leading_whitespace(const std::string& input) {
|
std::string remove_leading_whitespace(const std::string& input) {
|
||||||
auto first_non_whitespace = std::find_if(input.begin(), input.end(), [](unsigned char c) {
|
auto first_non_whitespace = std::find_if(input.begin(), input.end(), [](unsigned char c) {
|
||||||
return !std::isspace(c) || c == '\n';
|
return !std::isspace(c);
|
||||||
});
|
});
|
||||||
|
|
||||||
return std::string(first_non_whitespace, input.end());
|
return std::string(first_non_whitespace, input.end());
|
||||||
|
Loading…
Reference in New Issue
Block a user