mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-29 16:58:18 +00:00
Add the extra snippets to the source excerpts.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
1c9911a4ac
commit
c78c95ab42
@ -101,8 +101,17 @@ static QPair<QString, QList<SourceExcerpt>> cleanBraveResponse(const QByteArray&
|
||||
}
|
||||
}
|
||||
|
||||
QStringList textKeys = {"description", "extra_snippets"};
|
||||
QJsonObject textObj;
|
||||
for (const auto& key : textKeys) {
|
||||
if (resultObj.contains(key)) {
|
||||
textObj.insert(key, resultObj[key]);
|
||||
}
|
||||
}
|
||||
|
||||
QJsonDocument textObjDoc(textObj);
|
||||
info.date = resultObj["date"].toString();
|
||||
info.text = resultObj["description"].toString(); // fixme
|
||||
info.text = textObjDoc.toJson(QJsonDocument::Indented);
|
||||
info.url = resultObj["url"].toString();
|
||||
QJsonObject meta_url = resultObj["meta_url"].toObject();
|
||||
info.favicon = meta_url["favicon"].toString();
|
||||
|
Loading…
Reference in New Issue
Block a user