Skip to main content

Class: InMemoryDocstore

docstore.InMemoryDocstore

Hierarchy

Constructors

constructor

new InMemoryDocstore(docs?)

Parameters

NameType
docs?Map<string, Document<Record<string, any>>>

Overrides

Docstore.constructor

Defined in

langchain/src/docstore/in_memory.ts:7

Properties

_docs

_docs: Map<string, Document<Record<string, any>>>

Defined in

langchain/src/docstore/in_memory.ts:5

Accessors

count

get count(): number

Method for getting count of documents in _docs

Returns

number

Defined in

langchain/src/docstore/in_memory.ts:13

Methods

add

add(texts): void

Parameters

NameType
textsRecord<string, Document<Record<string, any>>>

Returns

void

Overrides

Docstore.add

Defined in

langchain/src/docstore/in_memory.ts:21


search(search): string | Document<Record<string, any>>

Parameters

NameType
searchstring

Returns

string | Document<Record<string, any>>

Overrides

Docstore.search

Defined in

langchain/src/docstore/in_memory.ts:17