Skip to main content

@nuclia/core / Exports / IWritableKnowledgeBox

Interface: IWritableKnowledgeBox

Hierarchy

Implemented by

Table of contents

Properties

Accessors

Methods

Properties

activityMonitor

Optional activityMonitor: ActivityMonitor

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:182


admin

Optional admin: boolean

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:180


allowed_origins

Optional allowed_origins: null | string[]

Inherited from

IKnowledgeBox.allowed_origins

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:27


contrib

Optional contrib: boolean

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:181


description

Optional description: string

Inherited from

IKnowledgeBox.description

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:25


external_index_provider

Optional external_index_provider: "pinecone"

Inherited from

IKnowledgeBox.external_index_provider

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:84


hidden_resources_enabled

Optional hidden_resources_enabled: boolean

Inherited from

IKnowledgeBox.hidden_resources_enabled

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:29


hidden_resources_hide_on_creation

Optional hidden_resources_hide_on_creation: boolean

Inherited from

IKnowledgeBox.hidden_resources_hide_on_creation

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:30


id

id: string

Inherited from

IKnowledgeBox.id

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:21


search_configs

Optional search_configs: Object

Index signature

▪ [key: string]: any

Inherited from

IKnowledgeBox.search_configs

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:28


slug

slug: string

Inherited from

IKnowledgeBox.slug

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:22


state

Optional state: KBStates

Inherited from

IKnowledgeBox.state

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:24


taskManager

taskManager: TaskManager

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:183


title

title: string

Inherited from

IKnowledgeBox.title

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:23


zone

zone: string

Inherited from

IKnowledgeBox.zone

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:26

Accessors

fullpath

get fullpath(): string

Returns

string

Inherited from

IKnowledgeBox.fullpath

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:88


path

get path(): string

Returns

string

Inherited from

IKnowledgeBox.path

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:86

Methods

ask

ask(query, context?, features?, options?): Observable<IErrorResponse | Answer>

Parameters

NameType
querystring
context?ContextEntry[]
features?Features[]
options?ChatOptions

Returns

Observable<IErrorResponse | Answer>

Inherited from

IKnowledgeBox.ask

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:108

ask(query, context?, features?, options?, callback?): Observable<IErrorResponse | Answer>

Parameters

NameType
querystring
context?ContextEntry[]
features?Features[]
options?ChatOptions
callback?(answer: IErrorResponse | Answer) => void

Returns

Observable<IErrorResponse | Answer>

Inherited from

IKnowledgeBox.ask

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:114


batchUpload

batchUpload(files): Observable<UploadStatus>

Parameters

NameType
filesFileList | File[] | FileWithMetadata[]

Returns

Observable<UploadStatus>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:222


catalog

catalog(query, options?): Observable<Results | IErrorResponse>

Parameters

NameType
querystring
options?SearchOptions

Returns

Observable<Results | IErrorResponse>

Inherited from

IKnowledgeBox.catalog

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:150


counters

counters(): Observable<Counters>

Returns

Observable<Counters>

Inherited from

IKnowledgeBox.counters

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:156


createAgenticRAGPipeline

createAgenticRAGPipeline(steps): Pipeline

Parameters

NameType
stepsSteps

Returns

Pipeline

Inherited from

IKnowledgeBox.createAgenticRAGPipeline

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:106


createKey

createKey(serviceAccountId, expires): Observable<{ token: string }>

Parameters

NameType
serviceAccountIdstring
expiresstring

Returns

Observable<{ token: string }>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:232


createKeyForService

createKeyForService(data, expires): Observable<{ token: string }>

Parameters

NameType
dataServiceAccountCreation
expiresstring

Returns

Observable<{ token: string }>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:230


createLinkResource

createLinkResource(link, metadata?, synchronous?, origin?): Observable<{ uuid: string }>

Parameters

NameType
linkLinkField
metadata?UserMetadata
synchronous?boolean
origin?Origin

Returns

Observable<{ uuid: string }>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:208


createResource

createResource(resource, synchronous): Observable<{ uuid: string }>

Parameters

NameType
resourceIResource
synchronousboolean

Returns

Observable<{ uuid: string }>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:206


createServiceAccount

createServiceAccount(data): Observable<void>

Parameters

NameType
dataServiceAccountCreation

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:226


delete

delete(): Observable<void>

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:189


deleteAllSynonyms

deleteAllSynonyms(): Observable<void>

Returns

Observable<void>

Deprecated

Will be removed in version 1.18.0

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:204


deleteKey

deleteKey(serviceAccountId, serviceAccountKeyId): Observable<void>

Parameters

NameType
serviceAccountIdstring
serviceAccountKeyIdstring

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:234


deleteLabelSet

deleteLabelSet(setId): Observable<void>

Parameters

NameType
setIdstring

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:193


deleteServiceAccount

deleteServiceAccount(serviceAccountId): Observable<void>

Parameters

NameType
serviceAccountIdstring

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:228


feedback

feedback(answerId, good, feedback?, text_block_id?): Observable<void>

Parameters

NameType
answerIdstring
goodboolean
feedback?string
text_block_id?string

Returns

Observable<void>

Inherited from

IKnowledgeBox.feedback

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:154


find

find(query, features?, options?): Observable<FindResults | IErrorResponse>

Parameters

NameType
querystring
features?Features[]
options?SearchOptions

Returns

Observable<FindResults | IErrorResponse>

Inherited from

IKnowledgeBox.find

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:122


generate

generate(question, context): Observable<{ answer: string ; cannotAnswer: boolean }>

Parameters

NameType
questionstring
contextstring[]

Returns

Observable<{ answer: string ; cannotAnswer: boolean }>

Inherited from

IKnowledgeBox.generate

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:138


generateJSON

generateJSON(question, json_schema, context): Observable<{ answer: object ; success: boolean }>

Parameters

NameType
questionstring
json_schemaobject
contextstring[]

Returns

Observable<{ answer: object ; success: boolean }>

Inherited from

IKnowledgeBox.generateJSON

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:140


generateRandomQuestionAboutResource

generateRandomQuestionAboutResource(resource): Observable<string>

Parameters

NameType
resourceResource

Returns

Observable<string>

Inherited from

IKnowledgeBox.generateRandomQuestionAboutResource

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:148


getConfiguration

getConfiguration(): Observable<{ [id: string]: any; }>

Returns

Observable<{ [id: string]: any; }>

Inherited from

IKnowledgeBox.getConfiguration

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:162


getEntities

getEntities(): Observable<Entities>

Returns

Observable<Entities>

Inherited from

IKnowledgeBox.getEntities

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:90


getEntitiesGroup

getEntitiesGroup(groupId): Observable<EntitiesGroup>

Parameters

NameType
groupIdstring

Returns

Observable<EntitiesGroup>

Inherited from

IKnowledgeBox.getEntitiesGroup

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:92


getFullResource

getFullResource(uuid): Observable<IResource>

Parameters

NameType
uuidstring

Returns

Observable<IResource>

Inherited from

IKnowledgeBox.getFullResource

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:100


getFullResourceBySlug

getFullResourceBySlug(slug): Observable<IResource>

Parameters

NameType
slugstring

Returns

Observable<IResource>

Inherited from

IKnowledgeBox.getFullResourceBySlug

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:104


getLabels

getLabels(): Observable<LabelSets>

Returns

Observable<LabelSets>

Inherited from

IKnowledgeBox.getLabels

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:96


getLearningSchema

getLearningSchema(): Observable<LearningConfigurations>

Returns

Observable<LearningConfigurations>

Inherited from

IKnowledgeBox.getLearningSchema

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:163


getResource

getResource(uuid, show?, extracted?): Observable<IResource>

Parameters

NameType
uuidstring
show?ResourceProperties[]
extracted?ExtractedDataTypes[]

Returns

Observable<IResource>

Inherited from

IKnowledgeBox.getResource

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:98


getResourceBySlug

getResourceBySlug(slug, show?, extracted?): Observable<IResource>

Parameters

NameType
slugstring
show?ResourceProperties[]
extracted?ExtractedDataTypes[]

Returns

Observable<IResource>

Inherited from

IKnowledgeBox.getResourceBySlug

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:102


getServiceAccounts

getServiceAccounts(): Observable<ServiceAccount[]>

Returns

Observable<ServiceAccount[]>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:224


getSynonyms

getSynonyms(): Observable<Synonyms>

Returns

Observable<Synonyms>

Inherited from

IKnowledgeBox.getSynonyms

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:94


getTempToken

getTempToken(): Observable<string>

Returns

Observable<string>

Inherited from

IKnowledgeBox.getTempToken

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:160


getUsers

getUsers(accountSlug): Observable<FullKbUser[]>

Parameters

NameType
accountSlugstring

Returns

Observable<FullKbUser[]>

Inherited from

IKnowledgeBox.getUsers

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:165


inviteToKb

inviteToKb(data): Observable<void>

Parameters

NameType
dataInviteKbData

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:240


listResources

listResources(page?, size?): Observable<ResourceList>

Parameters

NameType
page?number
size?number

Returns

Observable<ResourceList>

Inherited from

IKnowledgeBox.listResources

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:158


listenToAllNotifications

listenToAllNotifications(): Observable<NotificationMessage[]>

Returns

Observable<NotificationMessage[]>

Inherited from

IKnowledgeBox.listenToAllNotifications

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:167


listenToProcessingNotifications

listenToProcessingNotifications(): Observable<ResourceBaseNotification[]>

Returns

Observable<ResourceBaseNotification[]>

Inherited from

IKnowledgeBox.listenToProcessingNotifications

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:168


listenToResourceOperationNotifications

listenToResourceOperationNotifications(): Observable<ResourceOperationNotification[]>

Returns

Observable<ResourceOperationNotification[]>

Inherited from

IKnowledgeBox.listenToResourceOperationNotifications

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:169


modify

modify(data): Observable<void>

Parameters

NameType
dataPartial<IKnowledgeBox>

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:185


processingStatus

processingStatus(cursor?, scheduled?, limit?): Observable<{ cursor: string ; results: ProcessingStatus[] }>

Parameters

NameType
cursor?string
scheduled?boolean
limit?number

Returns

Observable<{ cursor: string ; results: ProcessingStatus[] }>

Inherited from

IKnowledgeBox.processingStatus

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:172


publish

publish(published): Observable<void>

Parameters

NameType
publishedboolean

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:187


rephrase

rephrase(question, user_context?, rephrase_prompt?): Observable<string>

Parameters

NameType
questionstring
user_context?string[]
rephrase_prompt?string

Returns

Observable<string>

Inherited from

IKnowledgeBox.rephrase

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:146


search(query, features?, options?): Observable<Results | IErrorResponse>

Parameters

NameType
querystring
features?Features[]
options?SearchOptions

Returns

Observable<Results | IErrorResponse>

Inherited from

IKnowledgeBox.search

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:128


setConfiguration

setConfiguration(config): Observable<void>

Parameters

NameType
configObject

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:236


setLabelSet

setLabelSet(setId, labelSet): Observable<void>

Parameters

NameType
setIdstring
labelSetLabelSet

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:191


setSynonyms

setSynonyms(synonyms): Observable<void>

Parameters

NameType
synonymsSynonyms

Returns

Observable<void>

Deprecated

Will be removed in version 1.18.0

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:199


stopListeningToNotifications

stopListeningToNotifications(): void

Returns

void

Inherited from

IKnowledgeBox.stopListeningToNotifications

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:170


suggest

suggest(query): Observable<Suggestions | IErrorResponse>

Parameters

NameType
querystring

Returns

Observable<Suggestions | IErrorResponse>

Inherited from

IKnowledgeBox.suggest

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:152


summarize

summarize(ressourceIds): Observable<string>

Parameters

NameType
ressourceIdsstring[]

Returns

Observable<string>

Inherited from

IKnowledgeBox.summarize

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:134


tokens

tokens(text): Observable<SentenceToken[]>

Parameters

NameType
textstring

Returns

Observable<SentenceToken[]>

Inherited from

IKnowledgeBox.tokens

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:136


updateUsers

updateUsers(data): Observable<void>

Parameters

NameType
dataKbUserPayload

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:238


upload

upload(file, TUS?, metadata?): Observable<UploadResponse>

Parameters

NameType
fileFile | FileWithMetadata
TUS?boolean
metadata?FileMetadata

Returns

Observable<UploadResponse>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:215

upload(buffer, TUS?, metadata?): Observable<UploadResponse>

Parameters

NameType
bufferArrayBuffer
TUS?boolean
metadata?FileMetadata

Returns

Observable<UploadResponse>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:216

upload(data, TUS?, metadata?): Observable<UploadResponse>

Parameters

NameType
dataFile | FileWithMetadata | ArrayBuffer
TUS?boolean
metadata?FileMetadata

Returns

Observable<UploadResponse>

Defined in

libs/sdk-core/src/lib/db/kb/kb.models.ts:217