Add the attached filename to the model's context. (#3028)

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
AT 2024-10-07 12:53:27 -04:00 committed by GitHub
parent ec4e1e4812
commit f686770ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Added ### Added
- Add bm25 hybrid search to localdocs ([#2969](https://github.com/nomic-ai/gpt4all/pull/2969)) - Add bm25 hybrid search to localdocs ([#2969](https://github.com/nomic-ai/gpt4all/pull/2969))
- LocalDocs support for .docx files ([#2986](https://github.com/nomic-ai/gpt4all/pull/2986)) - LocalDocs support for .docx files ([#2986](https://github.com/nomic-ai/gpt4all/pull/2986))
- Add support for attaching Excel spreadsheet to chat ([#3007](https://github.com/nomic-ai/gpt4all/pull/3007)) - Add support for attaching Excel spreadsheet to chat ([#3007](https://github.com/nomic-ai/gpt4all/pull/3007), [#3028](https://github.com/nomic-ai/gpt4all/pull/3028))
### Changed ### Changed
- Rebase llama.cpp on latest upstream as of September 26th ([#2998](https://github.com/nomic-ai/gpt4all/pull/2998)) - Rebase llama.cpp on latest upstream as of September 26th ([#2998](https://github.com/nomic-ai/gpt4all/pull/2998))

View File

@ -45,7 +45,7 @@ public:
buffer.open(QIODevice::ReadOnly); buffer.open(QIODevice::ReadOnly);
const QString md = XLSXToMD::toMarkdown(&buffer); const QString md = XLSXToMD::toMarkdown(&buffer);
buffer.close(); buffer.close();
return md; return u"## Attached: %1\n\n%2"_s.arg(file(), md);
} }
bool operator==(const PromptAttachment &other) const { return url == other.url; } bool operator==(const PromptAttachment &other) const { return url == other.url; }

View File

@ -124,7 +124,7 @@ QString XLSXToMD::toMarkdown(QIODevice *xlsxDevice)
continue; continue;
} }
markdown += u"## %1\n\n"_s.arg(sheetName); markdown += u"### %1\n\n"_s.arg(sheetName);
// Determine the used range // Determine the used range
QXlsx::CellRange range = sheet->dimension(); QXlsx::CellRange range = sheet->dimension();