How to open a .txt file? #384
Unanswered
fernandomiletto
asked this question in
Q&A
Replies: 1 comment
-
var vectorCollection = await vectorDatabase.AddDocumentsFromAsync<FileLoader>(
embeddingModel, // Used to convert text to embeddings
dimensions: 1536, // Should be 1536 for TextEmbeddingV3SmallModel
dataSource: DataSource.FromPath(PdfPath), or var loader = new FileLoader();
var documents = loader.Load(DataSource.FromPath(PdfPath)); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote this code to open a PDF file:
using var fileStream = new FileStream(PdfPath, FileMode.Open, FileAccess.Read);
IReadOnlyCollection documents = await PdfPigPdfSource.FromStreamAsync(fileStream, token);
How can I open a txt file with the format IReadOnlyCollection?
Beta Was this translation helpful? Give feedback.
All reactions