microsoft / kernel-memory

RAG architecture: index and query any data using LLM and natural language, track sources, show citations, asynchronous memory patterns.

Home Page:https://microsoft.github.io/kernel-memory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Document - load string content

KSemenenko opened this issue · comments

Context / Scenario

Is some cases I do't have acutal file to upload, so I think option to create Document with just text will be good.

The problem

Upload some realtime data in Memory

Proposed solution

Add some methods like

Document.FromString(string content);

Importance

nice to have

@KSemenenko I think ImportTextAsync does what you're looking for:

    public Task<string> ImportTextAsync(
        string text,
        string? documentId = null,
        TagCollection? tags = null,
        string? index = null,
        IEnumerable<string>? steps = null,
        CancellationToken cancellationToken = default);