mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-17 08:52:06 +00:00
Fix spacing issues with deepseek models: (#3470)
Signed-off-by: Adam Treat <treat.adam@gmail.com> Signed-off-by: AT <manyoso@users.noreply.github.com>
This commit is contained in:
parent
22ebd42c32
commit
5e7e4b3f78
@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
### Fixed
|
||||
- Fix several potential crashes ([#3465](https://github.com/nomic-ai/gpt4all/pull/3465))
|
||||
- Fix visual spacing issues with deepseek models ([#3470](https://github.com/nomic-ai/gpt4all/pull/3470))
|
||||
|
||||
## [3.9.0] - 2025-02-04
|
||||
|
||||
|
@ -198,6 +198,7 @@ GridLayout {
|
||||
isError: false
|
||||
isThinking: true
|
||||
thinkingTime: modelData.thinkingTime
|
||||
visible: modelData.content !== ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -976,7 +976,8 @@ public:
|
||||
{
|
||||
Q_UNUSED(bufferIdx)
|
||||
try {
|
||||
m_cllm->m_chatModel->setResponseValue(response);
|
||||
QString r = response;
|
||||
m_cllm->m_chatModel->setResponseValue(removeLeadingWhitespace(r));
|
||||
} catch (const std::exception &e) {
|
||||
// We have a try/catch here because the main thread might have removed the response from
|
||||
// the chatmodel by erasing the conversation during the response... the main thread sets
|
||||
@ -991,7 +992,7 @@ public:
|
||||
bool onRegularResponse() override
|
||||
{
|
||||
auto respStr = QString::fromUtf8(m_result->response);
|
||||
return onBufferResponse(removeLeadingWhitespace(respStr), 0);
|
||||
return onBufferResponse(respStr, 0);
|
||||
}
|
||||
|
||||
bool getStopGenerating() const override
|
||||
@ -1078,7 +1079,7 @@ auto ChatLLM::promptInternal(
|
||||
auto respStr = QString::fromUtf8(result.response);
|
||||
if (!respStr.isEmpty() && (std::as_const(respStr).back().isSpace() || finalBuffers.size() > 1)) {
|
||||
if (finalBuffers.size() > 1)
|
||||
m_chatModel->setResponseValue(finalBuffers.last());
|
||||
m_chatModel->setResponseValue(finalBuffers.last().trimmed());
|
||||
else
|
||||
m_chatModel->setResponseValue(respStr.trimmed());
|
||||
emit responseChanged();
|
||||
|
Loading…
Reference in New Issue
Block a user