MCPcopy Create free account
hub / github.com/SecureAI-Tools/SecureAI-Tools / createDocuments

Function createDocuments

apps/web/lib/fe/components/new-chat.tsx:253–262  ·  view source on GitHub ↗
(
  documentCollectionId: Id<DocumentCollectionCreateRequest>,
  selectedDocuments: SelectedDocument[],
)

Source from the content-addressed store, hash-verified

251}
252
253const createDocuments = async (
254 documentCollectionId: Id<DocumentCollectionCreateRequest>,
255 selectedDocuments: SelectedDocument[],
256): Promise<DocumentResponse[]> => {
257 const promises = selectedDocuments.map((sd) => {
258 return createDocument(documentCollectionId, sd, IndexingMode.ONLINE);
259 });
260
261 return await Promise.all(promises);
262};

Callers 1

handleSubmitFunction · 0.70

Calls 1

createDocumentFunction · 0.90

Tested by

no test coverage detected