@nuclia/core / Exports / ActivityMonitor
Class: ActivityMonitor
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new ActivityMonitor(kb
, nuclia
)
Parameters
Name | Type |
---|---|
kb | WritableKnowledgeBox |
nuclia | INuclia |
Defined in
libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:16
Properties
kb
• kb: WritableKnowledgeBox
Defined in
libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:13
nuclia
• nuclia: INuclia
Defined in
libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:14
Methods
getFullContexts
▸ getFullContexts(eventId
): Observable
<RemiQueryResponseContextDetails
>
Get the RAG request (question and answer), the REMi scores and the full contexts list for a specific item coming from queryRemiScores
method.
Parameters
Name | Type | Description |
---|---|---|
eventId | number | Identifier of an item from queryRemiScores response. |
Returns
Observable
<RemiQueryResponseContextDetails
>
Defined in
libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:62
getRemiScores
▸ getRemiScores(from
, to?
, aggregation?
): Observable
<RemiScoresResponseItem
[]>
Get the evolution of REMi scores of a KB on the specified time range.
Parameters
Name | Type | Description |
---|---|---|
from | string | Timestamp of the moment from which we want the metrics. |
to? | string | Timestamp of the moment until which we want the metrics. When not provided, the metrics are returned "until now". |
aggregation? | UsageAggregation | Define how the metrics are aggregated. By default, the endpoint returns only one point aggregating all the data for the specified date range. But you can have one point by: - "hour" - "day" - "week" - "month" - "quarter" - "year" - "millennium" (used by default) |
Returns
Observable
<RemiScoresResponseItem
[]>
Defined in
libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:35
queryRemiScores
▸ queryRemiScores(criteria
): Observable
<RemiQueryResponseItem
[]>
Get a list of RAG requests and their scores (if any) that matches a REMi scores query or a status.
Parameters
Name | Type | Description |
---|---|---|
criteria | RemiQueryCriteria | Object representing the query to be done. It currently supports querying on context relevance or on answer status. |
Returns
Observable
<RemiQueryResponseItem
[]>