Method ClearDocuments
ClearDocuments()
Removes all loaded documents and resets the conversation.
public void ClearDocuments()
Examples
using var chat = new PdfChat(chatModel, embeddingModel);
await chat.LoadDocumentAsync("report.pdf");
await chat.SubmitAsync("What is this about?");
// Remove all documents and start fresh
chat.ClearDocuments();
await chat.LoadDocumentAsync("new-report.pdf");
Remarks
After calling this method, new documents can be loaded and a fresh conversation can be started.
Exceptions
- ObjectDisposedException
Thrown if this instance has been disposed.