Use different language for prompt size too large. (#3004)

Signed-off-by: Adam Treat <treat.adam@gmail.com>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Co-authored-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
AT
2024-09-27 12:29:22 -04:00
committed by GitHub
parent f9d6be8afb
commit ea1ade8668
4 changed files with 8 additions and 1 deletions

View File

@@ -706,6 +706,9 @@ bool ChatLLM::handleResponse(int32_t token, const std::string &response)
#endif
// check for error
// FIXME (Adam) The error messages should not be treated as a model response or part of the
// normal conversation. They should be serialized along with the conversation, but the strings
// are separate and we should preserve info that these are error messages and not actual model responses.
if (token < 0) {
m_response.append(response);
m_trimmedResponse = remove_leading_whitespace(m_response);