Skip to Content

Reference

Types

Every result the SDK returns, with its fields in Python and TypeScript.

Every SDK call returns a typed object. In Python, results are typed models with attribute access. In TypeScript, they're plain objects with exported types.

DockIngestResult

Returned by flush and flush_sync.

PythonTypeScriptTypeDescription
batch_idbatchIdstringThe ID of the batch. Quote it to support.
acceptedacceptednumberEvents stored.
rejectedrejectednumberEvents not stored.
errorserrorslistOne entry per rejected event, with index, error, and message.

KnowledgeResult

Returned by query and query_sync without stream.

PythonTypeScriptTypeDescription
answeranswerstringThe answer, written from your sources.
confidenceconfidencenumberHow well the sources support the answer, from 0 to 1.
citationscitationslist of CitationThe chunks the answer is based on.
engine_idengineIdstringThe engine that answered.

Citation

PythonTypeScriptTypeDescription
chunk_idchunkIdstringThe chunk the answer drew on.
page_numberpageNumbernumber or nullThe page in the source, when it has pages.

KnowledgeChunk

Returned by retrieve and retrieve_sync, best match first.

PythonTypeScriptTypeDescription
chunk_idchunkIdstringThe chunk's ID.
contentcontentstringThe chunk's text.
metadatametadataobjectThe metadata stored with the chunk.

MemoryRecord

Returned by recall and recall_sync, best match first.

PythonTypeScriptTypeDescription
memory_idmemoryIdstringThe memory's ID.
contentcontentstringThe remembered text.
memory_typememoryTypestringThe storage class. See Memory types.
confidenceconfidencenumberHow strongly the memory answers the query, from 0 to 1.

Option types in TypeScript

TypeDescribes
DockConfigThe options for new Dock(). See Configuration.
LynkConfigThe options for new Lynk(). See Configuration.

Next steps

You know every result. See what happens when a call fails next.

On this page