mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 05:02:41 +00:00
Add timestamp to messages
This commit is contained in:
parent
ef09efaac9
commit
55dc0b6e08
24 changed files with 388 additions and 220 deletions
|
|
@ -100,7 +100,10 @@ export function createExtractDocumentTool(): AgentTool<typeof extractDocumentSch
|
|||
|
||||
// Extract filename from URL
|
||||
const urlParts = url.split("/");
|
||||
const fileName = urlParts[urlParts.length - 1]?.split("?")[0] || "document";
|
||||
let fileName = urlParts[urlParts.length - 1]?.split("?")[0] || "document";
|
||||
if (url.startsWith("https://arxiv.org/")) {
|
||||
fileName = fileName + ".pdf";
|
||||
}
|
||||
|
||||
// Use loadAttachment to process the document
|
||||
const attachment = await loadAttachment(arrayBuffer, fileName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue