@nuclia/core / Exports / IWritableKnowledgeBox
Interface: IWritableKnowledgeBox
Hierarchy
-
↳
IWritableKnowledgeBox
Implemented by
Table of contents
Properties
- activityMonitor
- admin
- allowed_origins
- contrib
- description
- external_index_provider
- hidden_resources_enabled
- hidden_resources_hide_on_creation
- id
- search_configs
- slug
- state
- taskManager
- title
- uuid
- zone
Accessors
Methods
- ask
- batchUpload
- catalog
- counters
- createAgenticRAGPipeline
- createKey
- createKeyForService
- createLinkResource
- createResource
- createServiceAccount
- delete
- deleteAllSynonyms
- deleteKey
- deleteLabelSet
- deleteServiceAccount
- feedback
- find
- generate
- generateJSON
- generateRandomQuestionAboutResource
- getConfiguration
- getEntities
- getEntitiesGroup
- getFullResource
- getFullResourceBySlug
- getLabels
- getLearningSchema
- getResource
- getResourceBySlug
- getServiceAccounts
- getSynonyms
- getTempToken
- getUsers
- inviteToKb
- listResources
- listenToAllNotifications
- listenToProcessingNotifications
- listenToResourceOperationNotifications
- modify
- processingStatus
- publish
- rephrase
- search
- setConfiguration
- setLabelSet
- setSynonyms
- stopListeningToNotifications
- suggest
- summarize
- tokens
- updateUsers
- upload
Properties
activityMonitor
• Optional
activityMonitor: ActivityMonitor
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:171
admin
• Optional
admin: boolean
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:169
allowed_origins
• Optional
allowed_origins: null
| string
[]
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:28
contrib
• Optional
contrib: boolean
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:170
description
• Optional
description: string
Inherited from
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:73
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:30
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:31
id
• id: string
Inherited from
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
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:29
slug
• slug: string
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:22
state
• Optional
state: KBStates
Inherited from
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:172
title
• title: string
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:23
uuid
• Optional
uuid: string
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:27
zone
• zone: string
Inherited from
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:77
path
• get
path(): string
Returns
string
Inherited from
IKnowledgeBox.path
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:75
Methods
ask
▸ ask(query
, context?
, features?
, options?
): Observable
<IErrorResponse
| Answer
>
Parameters
Name | Type |
---|---|
query | string |
context? | ContextEntry [] |
features? | Features [] |
options? | ChatOptions |
Returns
Observable
<IErrorResponse
| Answer
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:97
▸ ask(query
, context?
, features?
, options?
, callback?
): Observable
<IErrorResponse
| Answer
>
Parameters
Name | Type |
---|---|
query | string |
context? | ContextEntry [] |
features? | Features [] |
options? | ChatOptions |
callback? | (answer : IErrorResponse | Answer ) => void |
Returns
Observable
<IErrorResponse
| Answer
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:103
batchUpload
▸ batchUpload(files
): Observable
<UploadStatus
>
Parameters
Name | Type |
---|---|
files | FileList | File [] | FileWithMetadata [] |
Returns
Observable
<UploadStatus
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:211
catalog
▸ catalog(query
, options?
): Observable
<Results
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
options? | SearchOptions |
Returns
Observable
<Results
| IErrorResponse
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:139
counters
▸ counters(): Observable
<Counters
>
Returns
Observable
<Counters
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:145
createAgenticRAGPipeline
▸ createAgenticRAGPipeline(steps
): Pipeline
Parameters
Name | Type |
---|---|
steps | Steps |
Returns
Inherited from
IKnowledgeBox.createAgenticRAGPipeline
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:95
createKey
▸ createKey(serviceAccountId
, expires
): Observable
<{ token
: string
}>
Parameters
Name | Type |
---|---|
serviceAccountId | string |
expires | string |
Returns
Observable
<{ token
: string
}>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:221
createKeyForService
▸ createKeyForService(data
, expires
): Observable
<{ token
: string
}>
Parameters
Name | Type |
---|---|
data | ServiceAccountCreation |
expires | string |
Returns
Observable
<{ token
: string
}>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:219
createLinkResource
▸ createLinkResource(link
, metadata?
, synchronous?
, origin?
): Observable
<{ uuid
: string
}>
Parameters
Name | Type |
---|---|
link | LinkField |
metadata? | UserMetadata |
synchronous? | boolean |
origin? | Origin |
Returns
Observable
<{ uuid
: string
}>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:197
createResource
▸ createResource(resource
, synchronous
): Observable
<{ uuid
: string
}>
Parameters
Name | Type |
---|---|
resource | IResource |
synchronous | boolean |
Returns
Observable
<{ uuid
: string
}>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:195
createServiceAccount
▸ createServiceAccount(data
): Observable
<void
>
Parameters
Name | Type |
---|---|
data | ServiceAccountCreation |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:215
delete
▸ delete(): Observable
<void
>
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:178
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:193
deleteKey
▸ deleteKey(serviceAccountId
, serviceAccountKeyId
): Observable
<void
>
Parameters
Name | Type |
---|---|
serviceAccountId | string |
serviceAccountKeyId | string |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:223
deleteLabelSet
▸ deleteLabelSet(setId
): Observable
<void
>
Parameters
Name | Type |
---|---|
setId | string |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:182
deleteServiceAccount
▸ deleteServiceAccount(serviceAccountId
): Observable
<void
>
Parameters
Name | Type |
---|---|
serviceAccountId | string |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:217
feedback
▸ feedback(answerId
, good
, feedback?
, text_block_id?
): Observable
<void
>
Parameters
Name | Type |
---|---|
answerId | string |
good | boolean |
feedback? | string |
text_block_id? | string |
Returns
Observable
<void
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:143
find
▸ find(query
, features?
, options?
): Observable
<FindResults
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
features? | Features [] |
options? | SearchOptions |
Returns
Observable
<FindResults
| IErrorResponse
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:111
generate
▸ generate(question
, context
): Observable
<{ answer
: string
; cannotAnswer
: boolean
}>
Parameters
Name | Type |
---|---|
question | string |
context | string [] |
Returns
Observable
<{ answer
: string
; cannotAnswer
: boolean
}>
Inherited from
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
Name | Type |
---|---|
question | string |
json_schema | object |
context | string [] |
Returns
Observable
<{ answer
: object
; success
: boolean
}>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:129
generateRandomQuestionAboutResource
▸ generateRandomQuestionAboutResource(resource
): Observable
<string
>
Parameters
Name | Type |
---|---|
resource | Resource |
Returns
Observable
<string
>
Inherited from
IKnowledgeBox.generateRandomQuestionAboutResource
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:137
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:151
getEntities
▸ getEntities(): Observable
<Entities
>
Returns
Observable
<Entities
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:79
getEntitiesGroup
▸ getEntitiesGroup(groupId
): Observable
<EntitiesGroup
>
Parameters
Name | Type |
---|---|
groupId | string |
Returns
Observable
<EntitiesGroup
>
Inherited from
IKnowledgeBox.getEntitiesGroup
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:81
getFullResource
▸ getFullResource(uuid
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
uuid | string |
Returns
Observable
<IResource
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:89
getFullResourceBySlug
▸ getFullResourceBySlug(slug
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
slug | string |
Returns
Observable
<IResource
>
Inherited from
IKnowledgeBox.getFullResourceBySlug
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:93
getLabels
▸ getLabels(): Observable
<LabelSets
>
Returns
Observable
<LabelSets
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:85
getLearningSchema
▸ getLearningSchema(): Observable
<LearningConfigurations
>
Returns
Observable
<LearningConfigurations
>
Inherited from
IKnowledgeBox.getLearningSchema
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:152
getResource
▸ getResource(uuid
, show?
, extracted?
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
uuid | string |
show? | ResourceProperties [] |
extracted? | ExtractedDataTypes [] |
Returns
Observable
<IResource
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:87
getResourceBySlug
▸ getResourceBySlug(slug
, show?
, extracted?
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
slug | string |
show? | ResourceProperties [] |
extracted? | ExtractedDataTypes [] |
Returns
Observable
<IResource
>
Inherited from
IKnowledgeBox.getResourceBySlug
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:91
getServiceAccounts
▸ getServiceAccounts(): Observable
<ServiceAccount
[]>
Returns
Observable
<ServiceAccount
[]>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:213
getSynonyms
▸ getSynonyms(): Observable
<Synonyms
>
Returns
Observable
<Synonyms
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:83
getTempToken
▸ getTempToken(): Observable
<string
>
Returns
Observable
<string
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:149
getUsers
▸ getUsers(accountSlug
): Observable
<FullKbUser
[]>
Parameters
Name | Type |
---|---|
accountSlug | string |
Returns
Observable
<FullKbUser
[]>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:154
inviteToKb
▸ inviteToKb(data
): Observable
<void
>
Parameters
Name | Type |
---|---|
data | InviteKbData |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:229
listResources
▸ listResources(page?
, size?
): Observable
<ResourceList
>
Parameters
Name | Type |
---|---|
page? | number |
size? | number |
Returns
Observable
<ResourceList
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:147
listenToAllNotifications
▸ listenToAllNotifications(): Observable
<NotificationMessage
[]>
Returns
Observable
<NotificationMessage
[]>
Inherited from
IKnowledgeBox.listenToAllNotifications
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:156
listenToProcessingNotifications
▸ listenToProcessingNotifications(): Observable
<ResourceBaseNotification
[]>
Returns
Observable
<ResourceBaseNotification
[]>
Inherited from
IKnowledgeBox.listenToProcessingNotifications
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:157
listenToResourceOperationNotifications
▸ listenToResourceOperationNotifications(): Observable
<ResourceOperationNotification
[]>
Returns
Observable
<ResourceOperationNotification
[]>
Inherited from
IKnowledgeBox.listenToResourceOperationNotifications
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:158
modify
▸ modify(data
): Observable
<void
>
Parameters
Name | Type |
---|---|
data | Partial <IKnowledgeBox > |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:174
processingStatus
▸ processingStatus(cursor?
, scheduled?
, limit?
): Observable
<{ cursor
: string
; results
: ProcessingStatus
[] }>
Parameters
Name | Type |
---|---|
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:161
publish
▸ publish(published
): Observable
<void
>
Parameters
Name | Type |
---|---|
published | boolean |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:176
rephrase
▸ rephrase(question
, user_context?
, rephrase_prompt?
): Observable
<string
>
Parameters
Name | Type |
---|---|
question | string |
user_context? | string [] |
rephrase_prompt? | string |
Returns
Observable
<string
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:135
search
▸ search(query
, features?
, options?
): Observable
<Results
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
features? | Features [] |
options? | SearchOptions |
Returns
Observable
<Results
| IErrorResponse
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:117
setConfiguration
▸ setConfiguration(config
): Observable
<void
>
Parameters
Name | Type |
---|---|
config | Object |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:225
setLabelSet
▸ setLabelSet(setId
, labelSet
): Observable
<void
>
Parameters
Name | Type |
---|---|
setId | string |
labelSet | LabelSet |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:180
setSynonyms
▸ setSynonyms(synonyms
): Observable
<void
>
Parameters
Name | Type |
---|---|
synonyms | Synonyms |
Returns
Observable
<void
>
Deprecated
Will be removed in version 1.18.0
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:188
stopListeningToNotifications
▸ stopListeningToNotifications(): void
Returns
void
Inherited from
IKnowledgeBox.stopListeningToNotifications
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:159
suggest
▸ suggest(query
): Observable
<Suggestions
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
Returns
Observable
<Suggestions
| IErrorResponse
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:141
summarize
▸ summarize(ressourceIds
): Observable
<string
>
Parameters
Name | Type |
---|---|
ressourceIds | string [] |
Returns
Observable
<string
>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:123
tokens
▸ tokens(text
): Observable
<SentenceToken
[]>
Parameters
Name | Type |
---|---|
text | string |
Returns
Observable
<SentenceToken
[]>
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:125
updateUsers
▸ updateUsers(data
): Observable
<void
>
Parameters
Name | Type |
---|---|
data | KbUserPayload |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:227
upload
▸ upload(file
, TUS?
, metadata?
): Observable
<UploadResponse
>
Parameters
Name | Type |
---|---|
file | File | FileWithMetadata |
TUS? | boolean |
metadata? | FileMetadata |
Returns
Observable
<UploadResponse
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:204
▸ upload(buffer
, TUS?
, metadata?
): Observable
<UploadResponse
>
Parameters
Name | Type |
---|---|
buffer | ArrayBuffer |
TUS? | boolean |
metadata? | FileMetadata |
Returns
Observable
<UploadResponse
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:205
▸ upload(data
, TUS?
, metadata?
): Observable
<UploadResponse
>
Parameters
Name | Type |
---|---|
data | File | FileWithMetadata | ArrayBuffer |
TUS? | boolean |
metadata? | FileMetadata |
Returns
Observable
<UploadResponse
>