Skip to main content

Nuclia

@nuclia/core


@nuclia/core / Nuclia

Class: Nuclia

Defined in: libs/sdk-core/src/lib/core.ts:9

Implements​

Constructors​

Constructor​

new Nuclia(options): Nuclia

Defined in: libs/sdk-core/src/lib/core.ts:97

Depending on your use case, you might want to:

  • Use the Nuclia SDK to access and manage a Nuclia account. In this case you will need to provide the backend and account options, and you will use account authentication.
  • Use the Nuclia SDK to use a Nuclia Knowledge Box. In this case you will need to provide the backend, knowledgeBox and zone options. You will also either use knowledge box authentication, or no authentication if the Knowledge Box is public.

Example:

const nuclia = new Nuclia({
backend: 'https://accounts.progress.cloud/api',
knowledgeBox: '17815eb2-06a5-40ee-a5aa-b2f9dbc5da70',
zone: 'europe-1',
});

Parameters​

options​

NucliaOptions

Returns​

Nuclia

Properties​

auth​

auth: IAuthentication

Defined in: libs/sdk-core/src/lib/core.ts:13

Allows you to authenticate using username/password or using an API key.

Implementation of​

INuclia.auth


db​

db: IDb

Defined in: libs/sdk-core/src/lib/core.ts:17

Allows you to access and query the Nuclia database.

Implementation of​

INuclia.db


events​

events: Events

Defined in: libs/sdk-core/src/lib/core.ts:18

Implementation of​

INuclia.events


options​

options: NucliaOptions

Defined in: libs/sdk-core/src/lib/core.ts:11

Nuclia configuration options

Implementation of​

INuclia.options


rest​

rest: IRest

Defined in: libs/sdk-core/src/lib/core.ts:15

Allows you to make authenticated REST requests to the Nuclia backend.

Implementation of​

INuclia.rest

Accessors​

arag​

Get Signature​

get arag(): RetrievalAgent

Defined in: libs/sdk-core/src/lib/core.ts:54

Direct access to the current Retrieval Agent instance

Returns​

RetrievalAgent


asyncKnowledgeBox​

Get Signature​

get asyncKnowledgeBox(): PromiseMapper<KnowledgeBox>

Defined in: libs/sdk-core/src/lib/core.ts:68

Similar to knowledgeBox, but the returned object exposes Promises instead of RxJS Observables.

Returns​

PromiseMapper<KnowledgeBox>


backend​

Get Signature​

get backend(): string

Defined in: libs/sdk-core/src/lib/core.ts:23

The Nuclia global backend URL.

Returns​

string

Implementation of​

INuclia.backend


knowledgeBox​

Get Signature​

get knowledgeBox(): KnowledgeBox

Defined in: libs/sdk-core/src/lib/core.ts:38

Direct access to the current Knowledge Box instance (it returns a Knowledge Box in read mode, and does not work with account authentication).

Returns​

KnowledgeBox

Implementation of​

INuclia.knowledgeBox


regionalBackend​

Get Signature​

get regionalBackend(): string

Defined in: libs/sdk-core/src/lib/core.ts:28

The Nuclia regional backend URL.

Returns​

string

Implementation of​

INuclia.regionalBackend