Skip to main content

@nuclia/core / Exports / IKnowledgeBox

Interface: IKnowledgeBox

Hierarchy

Implemented by

Table of contents

Properties

Accessors

Methods

Properties

allowed_origins

Optional allowed_origins: null | string[]

Inherited from

IKnowledgeBoxCreation.allowed_origins

Defined in

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


description

Optional description: string

Inherited from

IKnowledgeBoxCreation.description

Defined in

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


external_index_provider

Optional external_index_provider: "pinecone"

Defined in

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


hidden_resources_enabled

Optional hidden_resources_enabled: boolean

Inherited from

IKnowledgeBoxCreation.hidden_resources_enabled

Defined in

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


hidden_resources_hide_on_creation

Optional hidden_resources_hide_on_creation: boolean

Inherited from

IKnowledgeBoxCreation.hidden_resources_hide_on_creation

Defined in

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


id

id: string

Inherited from

IKnowledgeBoxCreation.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

IKnowledgeBoxCreation.search_configs

Defined in

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


slug

slug: string

Inherited from

IKnowledgeBoxCreation.slug

Defined in

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


state

Optional state: KBStates

Inherited from

IKnowledgeBoxCreation.state

Defined in

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


title

title: string

Inherited from

IKnowledgeBoxCreation.title

Defined in

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


uuid

Optional uuid: string

Inherited from

IKnowledgeBoxCreation.uuid

Defined in

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


zone

zone: string

Inherited from

IKnowledgeBoxCreation.zone

Defined in

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

Accessors

fullpath

get fullpath(): string

Returns

string

Defined in

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


path

get path(): string

Returns

string

Defined in

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

Methods

ask

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

Parameters

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

Returns

Observable<IErrorResponse | Answer>

Defined in

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

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>

Defined in

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


catalog

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

Parameters

NameType
querystring
options?SearchOptions

Returns

Observable<Results | IErrorResponse>

Defined in

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


counters

counters(): Observable<Counters>

Returns

Observable<Counters>

Defined in

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


createAgenticRAGPipeline

createAgenticRAGPipeline(steps): Pipeline

Parameters

NameType
stepsSteps

Returns

Pipeline

Defined in

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


feedback

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

Parameters

NameType
answerIdstring
goodboolean
feedback?string
text_block_id?string

Returns

Observable<void>

Defined in

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


find

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

Parameters

NameType
querystring
features?Features[]
options?SearchOptions

Returns

Observable<FindResults | IErrorResponse>

Defined in

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


generate

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

Parameters

NameType
questionstring
contextstring[]

Returns

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

Defined in

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


generateJSON

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

Parameters

NameType
questionstring
json_schemaobject
contextstring[]

Returns

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

Defined in

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


generateRandomQuestionAboutResource

generateRandomQuestionAboutResource(resource): Observable<string>

Parameters

NameType
resourceResource

Returns

Observable<string>

Defined in

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


getConfiguration

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

Returns

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

Defined in

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


getEntities

getEntities(): Observable<Entities>

Returns

Observable<Entities>

Defined in

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


getEntitiesGroup

getEntitiesGroup(groupId): Observable<EntitiesGroup>

Parameters

NameType
groupIdstring

Returns

Observable<EntitiesGroup>

Defined in

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


getFullResource

getFullResource(uuid): Observable<IResource>

Parameters

NameType
uuidstring

Returns

Observable<IResource>

Defined in

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


getFullResourceBySlug

getFullResourceBySlug(slug): Observable<IResource>

Parameters

NameType
slugstring

Returns

Observable<IResource>

Defined in

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


getLabels

getLabels(): Observable<LabelSets>

Returns

Observable<LabelSets>

Defined in

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


getLearningSchema

getLearningSchema(): Observable<LearningConfigurations>

Returns

Observable<LearningConfigurations>

Defined in

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


getResource

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

Parameters

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

Returns

Observable<IResource>

Defined in

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


getResourceBySlug

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

Parameters

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

Returns

Observable<IResource>

Defined in

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


getSynonyms

getSynonyms(): Observable<Synonyms>

Returns

Observable<Synonyms>

Defined in

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


getTempToken

getTempToken(): Observable<string>

Returns

Observable<string>

Defined in

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


getUsers

getUsers(accountSlug): Observable<FullKbUser[]>

Parameters

NameType
accountSlugstring

Returns

Observable<FullKbUser[]>

Defined in

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


listResources

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

Parameters

NameType
page?number
size?number

Returns

Observable<ResourceList>

Defined in

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


listenToAllNotifications

listenToAllNotifications(): Observable<NotificationMessage[]>

Returns

Observable<NotificationMessage[]>

Defined in

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


listenToProcessingNotifications

listenToProcessingNotifications(): Observable<ResourceBaseNotification[]>

Returns

Observable<ResourceBaseNotification[]>

Defined in

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


listenToResourceOperationNotifications

listenToResourceOperationNotifications(): Observable<ResourceOperationNotification[]>

Returns

Observable<ResourceOperationNotification[]>

Defined in

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


processingStatus

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

Parameters

NameType
cursor?string
scheduled?boolean
limit?number

Returns

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

Defined in

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


rephrase

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

Parameters

NameType
questionstring
user_context?string[]
rephrase_prompt?string

Returns

Observable<string>

Defined in

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


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

Parameters

NameType
querystring
features?Features[]
options?SearchOptions

Returns

Observable<Results | IErrorResponse>

Defined in

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


stopListeningToNotifications

stopListeningToNotifications(): void

Returns

void

Defined in

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


suggest

suggest(query): Observable<Suggestions | IErrorResponse>

Parameters

NameType
querystring

Returns

Observable<Suggestions | IErrorResponse>

Defined in

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


summarize

summarize(ressourceIds): Observable<string>

Parameters

NameType
ressourceIdsstring[]

Returns

Observable<string>

Defined in

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


tokens

tokens(text): Observable<SentenceToken[]>

Parameters

NameType
textstring

Returns

Observable<SentenceToken[]>

Defined in

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