@nuclia/core / Exports / IKnowledgeBox
Interface: IKnowledgeBox
Hierarchy
-
↳
IKnowledgeBox
↳↳
KnowledgeBox
Implemented by
Table of contents
Properties
- allowed_origins
- description
- external_index_provider
- hidden_resources_enabled
- hidden_resources_hide_on_creation
- id
- search_configs
- slug
- state
- title
- zone
Accessors
Methods
- ask
- catalog
- counters
- createAgenticRAGPipeline
- feedback
- find
- generate
- generateJSON
- generateRandomQuestionAboutResource
- getConfiguration
- getEntities
- getEntitiesGroup
- getFullResource
- getFullResourceBySlug
- getLabels
- getLearningSchema
- getResource
- getResourceBySlug
- getSynonyms
- getTempToken
- getUsers
- listResources
- listenToAllNotifications
- listenToProcessingNotifications
- listenToResourceOperationNotifications
- processingStatus
- rephrase
- search
- stopListeningToNotifications
- suggest
- summarize
- tokens
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:27
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:84
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:29
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:30
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
IKnowledgeBoxCreation.search_configs
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:28
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
title
• title: string
Inherited from
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:23
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
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:88
path
• get
path(): string
Returns
string
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:86
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
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:108
▸ 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
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:114
catalog
▸ catalog(query
, options?
): Observable
<Results
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
options? | SearchOptions |
Returns
Observable
<Results
| IErrorResponse
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:150
counters
▸ counters(): Observable
<Counters
>
Returns
Observable
<Counters
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:156
createAgenticRAGPipeline
▸ createAgenticRAGPipeline(steps
): Pipeline
Parameters
Name | Type |
---|---|
steps | Steps |
Returns
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:106
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
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:154
find
▸ find(query
, features?
, options?
): Observable
<FindResults
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
features? | Features [] |
options? | SearchOptions |
Returns
Observable
<FindResults
| IErrorResponse
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:122
generate
▸ generate(question
, context
): Observable
<{ answer
: string
; cannotAnswer
: boolean
}>
Parameters
Name | Type |
---|---|
question | string |
context | string [] |
Returns
Observable
<{ answer
: string
; cannotAnswer
: boolean
}>
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
Name | Type |
---|---|
question | string |
json_schema | object |
context | string [] |
Returns
Observable
<{ answer
: object
; success
: boolean
}>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:140
generateRandomQuestionAboutResource
▸ generateRandomQuestionAboutResource(resource
): Observable
<string
>
Parameters
Name | Type |
---|---|
resource | Resource |
Returns
Observable
<string
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:148
getConfiguration
▸ getConfiguration(): Observable
<{ [id: string]
: any
; }>
Returns
Observable
<{ [id: string]
: any
; }>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:162
getEntities
▸ getEntities(): Observable
<Entities
>
Returns
Observable
<Entities
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:90
getEntitiesGroup
▸ getEntitiesGroup(groupId
): Observable
<EntitiesGroup
>
Parameters
Name | Type |
---|---|
groupId | string |
Returns
Observable
<EntitiesGroup
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:92
getFullResource
▸ getFullResource(uuid
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
uuid | string |
Returns
Observable
<IResource
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:100
getFullResourceBySlug
▸ getFullResourceBySlug(slug
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
slug | string |
Returns
Observable
<IResource
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:104
getLabels
▸ getLabels(): Observable
<LabelSets
>
Returns
Observable
<LabelSets
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:96
getLearningSchema
▸ getLearningSchema(): Observable
<LearningConfigurations
>
Returns
Observable
<LearningConfigurations
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:163
getResource
▸ getResource(uuid
, show?
, extracted?
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
uuid | string |
show? | ResourceProperties [] |
extracted? | ExtractedDataTypes [] |
Returns
Observable
<IResource
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:98
getResourceBySlug
▸ getResourceBySlug(slug
, show?
, extracted?
): Observable
<IResource
>
Parameters
Name | Type |
---|---|
slug | string |
show? | ResourceProperties [] |
extracted? | ExtractedDataTypes [] |
Returns
Observable
<IResource
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:102
getSynonyms
▸ getSynonyms(): Observable
<Synonyms
>
Returns
Observable
<Synonyms
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:94
getTempToken
▸ getTempToken(): Observable
<string
>
Returns
Observable
<string
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:160
getUsers
▸ getUsers(accountSlug
): Observable
<FullKbUser
[]>
Parameters
Name | Type |
---|---|
accountSlug | string |
Returns
Observable
<FullKbUser
[]>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:165
listResources
▸ listResources(page?
, size?
): Observable
<ResourceList
>
Parameters
Name | Type |
---|---|
page? | number |
size? | number |
Returns
Observable
<ResourceList
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:158
listenToAllNotifications
▸ listenToAllNotifications(): Observable
<NotificationMessage
[]>
Returns
Observable
<NotificationMessage
[]>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:167
listenToProcessingNotifications
▸ listenToProcessingNotifications(): Observable
<ResourceBaseNotification
[]>
Returns
Observable
<ResourceBaseNotification
[]>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:168
listenToResourceOperationNotifications
▸ listenToResourceOperationNotifications(): Observable
<ResourceOperationNotification
[]>
Returns
Observable
<ResourceOperationNotification
[]>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:169
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
[] }>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:172
rephrase
▸ rephrase(question
, user_context?
, rephrase_prompt?
): Observable
<string
>
Parameters
Name | Type |
---|---|
question | string |
user_context? | string [] |
rephrase_prompt? | string |
Returns
Observable
<string
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:146
search
▸ search(query
, features?
, options?
): Observable
<Results
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
features? | Features [] |
options? | SearchOptions |
Returns
Observable
<Results
| IErrorResponse
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:128
stopListeningToNotifications
▸ stopListeningToNotifications(): void
Returns
void
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:170
suggest
▸ suggest(query
): Observable
<Suggestions
| IErrorResponse
>
Parameters
Name | Type |
---|---|
query | string |
Returns
Observable
<Suggestions
| IErrorResponse
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:152
summarize
▸ summarize(ressourceIds
): Observable
<string
>
Parameters
Name | Type |
---|---|
ressourceIds | string [] |
Returns
Observable
<string
>
Defined in
libs/sdk-core/src/lib/db/kb/kb.models.ts:134
tokens
▸ tokens(text
): Observable
<SentenceToken
[]>
Parameters
Name | Type |
---|---|
text | string |
Returns
Observable
<SentenceToken
[]>