GenkitG
Genkitโ€ข9mo agoโ€ข
3 replies
dry-scarlet

Question:

Question:

This is a code snippet from my RAG server. I'm trying to prevent duplicate documents from being added during the indexing process.
Is there a way to avoid adding the same document more than once when calling Index?
doc := ai.DocumentFromText(string(b), nil)
err = ai.Index(ctx, winHistoryIndexer,
    ai.WithDocs(doc),
)
Was this page helpful?