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
3 changed files with 3 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ public:
buffer.open(QIODevice::ReadOnly);
const QString md = XLSXToMD::toMarkdown(&buffer);
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; }

View File

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