KnowledgeSource

One document to admit into a knowledge base, as the framework hands it to KnowledgeProvider.ingest.

Fields

source_idstringrequired

The document's id, non-empty; it becomes the doc_id. For local_knowledge it is the file path.

media_typestringrequired

The content's media type, non-empty, such as text/markdown. The host guesses it from the file name and falls back to text/plain; local_knowledge accepts only text/* and application/json.

contentUint8Arrayrequired

The document's bytes.

locationstring

Where the document came from, such as its file path, kept for reference. Omitted when there is none.

bindingBindingrequired

Issued by the host; the provider stores it opaquely.

Edit on GitHub

On this page