Nuclia
@nuclia/core • Docs
@nuclia/core / Nuclia
Class: Nuclia
Implements
Constructors
new Nuclia()
new Nuclia(
options
):Nuclia
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
andaccount
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
andzone
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://nuclia.cloud/api',
knowledgeBox: '17815eb2-06a5-40ee-a5aa-b2f9dbc5da70',
zone: 'europe-1',
});
Parameters
• options: NucliaOptions
Returns
Defined in
libs/sdk-core/src/lib/core.ts:98
Properties
auth
auth:
IAuthentication
Allows you to authenticate using username/password or using an API key.
Implementation of
Defined in
libs/sdk-core/src/lib/core.ts:11
db
db:
IDb
Allows you to access and query the Nuclia database.
Implementation of
Defined in
libs/sdk-core/src/lib/core.ts:15
events
events:
Events
Implementation of
Defined in
libs/sdk-core/src/lib/core.ts:16
options
options:
NucliaOptions
Implementation of
Defined in
libs/sdk-core/src/lib/core.ts:9
rest
rest:
IRest
Allows you to make authenticated REST requests to the Nuclia backend.
Implementation of
Defined in
libs/sdk-core/src/lib/core.ts:13
Accessors
arag
get
arag():RetrievalAgent
Direct access to the current Retrieval Agent instance
Returns
Defined in
libs/sdk-core/src/lib/core.ts:51
asyncKnowledgeBox
get
asyncKnowledgeBox():PromiseMapper
<KnowledgeBox
>
Similar to knowledgeBox
, but the returned object exposes Promises
instead of RxJS Observables
.
Returns
Defined in
libs/sdk-core/src/lib/core.ts:69
backend
get
backend():string
The Nuclia global backend URL.
Returns
string
Implementation of
Defined in
libs/sdk-core/src/lib/core.ts:21
knowledgeBox
get
knowledgeBox():KnowledgeBox
Direct access to the current Knowledge Box instance (it returns a Knowledge Box in read mode, and does not work with account authentication).
Returns
Implementation of
Defined in
libs/sdk-core/src/lib/core.ts:33
regionalBackend
get
regionalBackend():string
The Nuclia regional backend URL.
Returns
string