@swiss-ai-hub/web 0.296.4 → 0.297.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Event/Display/MetaQuestionDetectedEvent.vue +29 -0
- package/composables/event/useEventComponent.ts +2 -0
- package/i18n/locales/de.yaml +5 -0
- package/i18n/locales/en.yaml +5 -0
- package/i18n/locales/fr.yaml +5 -0
- package/i18n/locales/it.yaml +5 -0
- package/package.json +1 -1
- package/sdk/client/index.ts +3 -0
- package/sdk/client/schemas.gen.ts +148 -0
- package/sdk/client/types.gen.ts +116 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mdi:help-circle-outline"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-2">
|
|
8
|
+
<Tag
|
|
9
|
+
:value="t(`event.metaQuestionDetected.category.${event.event.category}`)"
|
|
10
|
+
severity="info"
|
|
11
|
+
class="self-start"
|
|
12
|
+
/>
|
|
13
|
+
<span class="text-sm text-surface-600 dark:text-surface-400">
|
|
14
|
+
{{ event.event.reasoning }}
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
</EventDisplayBase>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import type { MetaQuestionDetectedEvent, ThreadDto, ContextualizedAgentEvent } from '@core/sdk/client'
|
|
22
|
+
|
|
23
|
+
defineProps<{
|
|
24
|
+
event: ContextualizedAgentEvent & { event: MetaQuestionDetectedEvent }
|
|
25
|
+
thread: ThreadDto
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const { t } = useI18n()
|
|
29
|
+
</script>
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
EventDisplayBaseRetrieveMemoryEvent,
|
|
30
30
|
EventDisplayBaseStoreMemoryEvent,
|
|
31
31
|
EventDisplayAddMemoryToChatHistoryEvent,
|
|
32
|
+
EventDisplayMetaQuestionDetectedEvent,
|
|
32
33
|
} from '#components'
|
|
33
34
|
|
|
34
35
|
export const useEventComponent = () => {
|
|
@@ -69,6 +70,7 @@ export const useEventComponent = () => {
|
|
|
69
70
|
BaseRetrieveMemoryEvent: EventDisplayBaseRetrieveMemoryEvent,
|
|
70
71
|
BaseStoreMemoryEvent: EventDisplayBaseStoreMemoryEvent,
|
|
71
72
|
AddMemoryToChatHistoryEvent: EventDisplayAddMemoryToChatHistoryEvent,
|
|
73
|
+
MetaQuestionDetectedEvent: EventDisplayMetaQuestionDetectedEvent,
|
|
72
74
|
}
|
|
73
75
|
const exact_match = mapping[event.event._event_name]
|
|
74
76
|
if (exact_match) {
|
package/i18n/locales/de.yaml
CHANGED
|
@@ -267,6 +267,11 @@ event:
|
|
|
267
267
|
noChunksFound: Keine Abschnitte gefunden
|
|
268
268
|
noChunksFoundDescription: Die Abrufsuche hat keine relevanten Inhaltsabschnitte
|
|
269
269
|
gefunden.
|
|
270
|
+
metaQuestionDetected:
|
|
271
|
+
category:
|
|
272
|
+
identity: Identität
|
|
273
|
+
capabilities: Fähigkeiten
|
|
274
|
+
behavior: Verhalten
|
|
270
275
|
standaloneQuestionCondenser:
|
|
271
276
|
summary: Frage verfeinert und verdichtet
|
|
272
277
|
condensedQuestion: Verdichtete Frage
|
package/i18n/locales/en.yaml
CHANGED
|
@@ -264,6 +264,11 @@ event:
|
|
|
264
264
|
noChunksFound: No chunks found
|
|
265
265
|
noChunksFoundDescription: The retrieval search didn't find any relevant content
|
|
266
266
|
chunks.
|
|
267
|
+
metaQuestionDetected:
|
|
268
|
+
category:
|
|
269
|
+
identity: Identity
|
|
270
|
+
capabilities: Capabilities
|
|
271
|
+
behavior: Behaviour
|
|
267
272
|
standaloneQuestionCondenser:
|
|
268
273
|
summary: Question refined and condensed
|
|
269
274
|
condensedQuestion: Condensed Question
|
package/i18n/locales/fr.yaml
CHANGED
|
@@ -265,6 +265,11 @@ event:
|
|
|
265
265
|
assistant: Assistant
|
|
266
266
|
system: Système
|
|
267
267
|
user: Utilisateur
|
|
268
|
+
metaQuestionDetected:
|
|
269
|
+
category:
|
|
270
|
+
identity: Identité
|
|
271
|
+
capabilities: Capacités
|
|
272
|
+
behavior: Comportement
|
|
268
273
|
standaloneQuestionCondenser:
|
|
269
274
|
summary: Question affinée et condensée
|
|
270
275
|
condensedQuestion: Question Condensée
|
package/i18n/locales/it.yaml
CHANGED
|
@@ -265,6 +265,11 @@ event:
|
|
|
265
265
|
assistant: Assistente
|
|
266
266
|
system: Sistema
|
|
267
267
|
user: Utente
|
|
268
|
+
metaQuestionDetected:
|
|
269
|
+
category:
|
|
270
|
+
identity: Identità
|
|
271
|
+
capabilities: Capacità
|
|
272
|
+
behavior: Comportamento
|
|
268
273
|
standaloneQuestionCondenser:
|
|
269
274
|
summary: Domanda rifinita e condensata
|
|
270
275
|
condensedQuestion: Domanda Condensata
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"author": "bbv Software Services AG (https://www.bbv.ch)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.297.0",
|
|
7
7
|
"description": "Swiss AI Hub - Admin & Management UI (Nuxt 3 layer)",
|
|
8
8
|
"main": "./nuxt.config.ts",
|
|
9
9
|
"repository": {
|
package/sdk/client/index.ts
CHANGED
|
@@ -716,6 +716,9 @@ export {
|
|
|
716
716
|
type MessageWritable,
|
|
717
717
|
type Metadata,
|
|
718
718
|
type MetadataFilterPair,
|
|
719
|
+
MetaQuestionCategory,
|
|
720
|
+
type MetaQuestionDetectedEvent,
|
|
721
|
+
type MetaQuestionDetectedEventWritable,
|
|
719
722
|
type MinimalAgentInstanceDto,
|
|
720
723
|
type MinimalAgentInstanceDtoWritable,
|
|
721
724
|
type MinimalDataset,
|
|
@@ -5323,6 +5323,9 @@ export const ContextualizedAgentEventSchema = {
|
|
|
5323
5323
|
{
|
|
5324
5324
|
$ref: "#/components/schemas/LLMStopEvent",
|
|
5325
5325
|
},
|
|
5326
|
+
{
|
|
5327
|
+
$ref: "#/components/schemas/MetaQuestionDetectedEvent",
|
|
5328
|
+
},
|
|
5326
5329
|
{
|
|
5327
5330
|
$ref: "#/components/schemas/RerankerEvent",
|
|
5328
5331
|
},
|
|
@@ -13591,6 +13594,91 @@ export const MessageRoleSchema = {
|
|
|
13591
13594
|
description: "Message role.",
|
|
13592
13595
|
} as const;
|
|
13593
13596
|
|
|
13597
|
+
export const MetaQuestionCategorySchema = {
|
|
13598
|
+
type: "string",
|
|
13599
|
+
enum: ["identity", "capabilities", "behavior"],
|
|
13600
|
+
} as const;
|
|
13601
|
+
|
|
13602
|
+
export const MetaQuestionDetectedEventSchema = {
|
|
13603
|
+
properties: {
|
|
13604
|
+
event_id: {
|
|
13605
|
+
type: "string",
|
|
13606
|
+
title: "Event Id",
|
|
13607
|
+
},
|
|
13608
|
+
created_at: {
|
|
13609
|
+
type: "integer",
|
|
13610
|
+
title: "Created At",
|
|
13611
|
+
description:
|
|
13612
|
+
"The time (in ns since epoch) the event was stored in the event store",
|
|
13613
|
+
},
|
|
13614
|
+
display_name: {
|
|
13615
|
+
anyOf: [
|
|
13616
|
+
{
|
|
13617
|
+
$ref: "#/components/schemas/LocaleString",
|
|
13618
|
+
},
|
|
13619
|
+
{
|
|
13620
|
+
type: "null",
|
|
13621
|
+
},
|
|
13622
|
+
],
|
|
13623
|
+
description: "Display name for the event",
|
|
13624
|
+
},
|
|
13625
|
+
display_description: {
|
|
13626
|
+
anyOf: [
|
|
13627
|
+
{
|
|
13628
|
+
$ref: "#/components/schemas/LocaleString",
|
|
13629
|
+
},
|
|
13630
|
+
{
|
|
13631
|
+
type: "null",
|
|
13632
|
+
},
|
|
13633
|
+
],
|
|
13634
|
+
description: "Display description for the event",
|
|
13635
|
+
},
|
|
13636
|
+
user_query: {
|
|
13637
|
+
type: "string",
|
|
13638
|
+
title: "User Query",
|
|
13639
|
+
description: "The user message classified as a meta question.",
|
|
13640
|
+
},
|
|
13641
|
+
category: {
|
|
13642
|
+
$ref: "#/components/schemas/MetaQuestionCategory",
|
|
13643
|
+
description: "Which aspect of the agent the question is about.",
|
|
13644
|
+
},
|
|
13645
|
+
reasoning: {
|
|
13646
|
+
type: "string",
|
|
13647
|
+
title: "Reasoning",
|
|
13648
|
+
description: "Why the message was classified as a meta question.",
|
|
13649
|
+
},
|
|
13650
|
+
_event_name: {
|
|
13651
|
+
type: "string",
|
|
13652
|
+
title: "Event Name",
|
|
13653
|
+
description:
|
|
13654
|
+
"The event type name, usually the class name. If unknown, uses _unknown_event_name.\nUsed during deserialization to decide which subclass to instantiate.",
|
|
13655
|
+
readOnly: true,
|
|
13656
|
+
},
|
|
13657
|
+
_parent_event_names: {
|
|
13658
|
+
items: {
|
|
13659
|
+
type: "string",
|
|
13660
|
+
},
|
|
13661
|
+
type: "array",
|
|
13662
|
+
title: "Parent Event Names",
|
|
13663
|
+
description:
|
|
13664
|
+
"Contains the names of all parent classes up until BaseEvent, ordered from deepest to least deep inheritance.",
|
|
13665
|
+
readOnly: true,
|
|
13666
|
+
},
|
|
13667
|
+
},
|
|
13668
|
+
additionalProperties: true,
|
|
13669
|
+
type: "object",
|
|
13670
|
+
required: [
|
|
13671
|
+
"user_query",
|
|
13672
|
+
"category",
|
|
13673
|
+
"reasoning",
|
|
13674
|
+
"_event_name",
|
|
13675
|
+
"_parent_event_names",
|
|
13676
|
+
],
|
|
13677
|
+
title: "MetaQuestionDetectedEvent",
|
|
13678
|
+
description:
|
|
13679
|
+
"Emitted when the user's message is a meta question about the agent itself —\nits identity, its capabilities, or why it behaved a certain way — rather than a\ntask for the agent to perform. Routes the run to the self-awareness answer step\ninstead of the agent's normal workflow.",
|
|
13680
|
+
} as const;
|
|
13681
|
+
|
|
13594
13682
|
export const MetadataSchema = {
|
|
13595
13683
|
properties: {
|
|
13596
13684
|
thread_id: {
|
|
@@ -25384,6 +25472,9 @@ export const ContextualizedAgentEventWritableSchema = {
|
|
|
25384
25472
|
{
|
|
25385
25473
|
$ref: "#/components/schemas/LLMStopEventWritable",
|
|
25386
25474
|
},
|
|
25475
|
+
{
|
|
25476
|
+
$ref: "#/components/schemas/MetaQuestionDetectedEventWritable",
|
|
25477
|
+
},
|
|
25387
25478
|
{
|
|
25388
25479
|
$ref: "#/components/schemas/RerankerEventWritable",
|
|
25389
25480
|
},
|
|
@@ -30198,6 +30289,63 @@ export const MessageWritableSchema = {
|
|
|
30198
30289
|
title: "Message",
|
|
30199
30290
|
} as const;
|
|
30200
30291
|
|
|
30292
|
+
export const MetaQuestionDetectedEventWritableSchema = {
|
|
30293
|
+
properties: {
|
|
30294
|
+
event_id: {
|
|
30295
|
+
type: "string",
|
|
30296
|
+
title: "Event Id",
|
|
30297
|
+
},
|
|
30298
|
+
created_at: {
|
|
30299
|
+
type: "integer",
|
|
30300
|
+
title: "Created At",
|
|
30301
|
+
description:
|
|
30302
|
+
"The time (in ns since epoch) the event was stored in the event store",
|
|
30303
|
+
},
|
|
30304
|
+
display_name: {
|
|
30305
|
+
anyOf: [
|
|
30306
|
+
{
|
|
30307
|
+
$ref: "#/components/schemas/LocaleString",
|
|
30308
|
+
},
|
|
30309
|
+
{
|
|
30310
|
+
type: "null",
|
|
30311
|
+
},
|
|
30312
|
+
],
|
|
30313
|
+
description: "Display name for the event",
|
|
30314
|
+
},
|
|
30315
|
+
display_description: {
|
|
30316
|
+
anyOf: [
|
|
30317
|
+
{
|
|
30318
|
+
$ref: "#/components/schemas/LocaleString",
|
|
30319
|
+
},
|
|
30320
|
+
{
|
|
30321
|
+
type: "null",
|
|
30322
|
+
},
|
|
30323
|
+
],
|
|
30324
|
+
description: "Display description for the event",
|
|
30325
|
+
},
|
|
30326
|
+
user_query: {
|
|
30327
|
+
type: "string",
|
|
30328
|
+
title: "User Query",
|
|
30329
|
+
description: "The user message classified as a meta question.",
|
|
30330
|
+
},
|
|
30331
|
+
category: {
|
|
30332
|
+
$ref: "#/components/schemas/MetaQuestionCategory",
|
|
30333
|
+
description: "Which aspect of the agent the question is about.",
|
|
30334
|
+
},
|
|
30335
|
+
reasoning: {
|
|
30336
|
+
type: "string",
|
|
30337
|
+
title: "Reasoning",
|
|
30338
|
+
description: "Why the message was classified as a meta question.",
|
|
30339
|
+
},
|
|
30340
|
+
},
|
|
30341
|
+
additionalProperties: true,
|
|
30342
|
+
type: "object",
|
|
30343
|
+
required: ["user_query", "category", "reasoning"],
|
|
30344
|
+
title: "MetaQuestionDetectedEvent",
|
|
30345
|
+
description:
|
|
30346
|
+
"Emitted when the user's message is a meta question about the agent itself —\nits identity, its capabilities, or why it behaved a certain way — rather than a\ntask for the agent to perform. Routes the run to the self-awareness answer step\ninstead of the agent's normal workflow.",
|
|
30347
|
+
} as const;
|
|
30348
|
+
|
|
30201
30349
|
export const MinimalAgentInstanceDTOWritableSchema = {
|
|
30202
30350
|
properties: {
|
|
30203
30351
|
agent_class: {
|
package/sdk/client/types.gen.ts
CHANGED
|
@@ -3634,6 +3634,7 @@ export type ContextualizedAgentEvent = {
|
|
|
3634
3634
|
| EmbeddingEvent
|
|
3635
3635
|
| LlmEvent
|
|
3636
3636
|
| LlmStopEvent
|
|
3637
|
+
| MetaQuestionDetectedEvent
|
|
3637
3638
|
| RerankerEvent
|
|
3638
3639
|
| RetrieverEvent
|
|
3639
3640
|
| ToolEvent
|
|
@@ -9138,6 +9139,74 @@ export const MessageRole = {
|
|
|
9138
9139
|
*/
|
|
9139
9140
|
export type MessageRole = (typeof MessageRole)[keyof typeof MessageRole];
|
|
9140
9141
|
|
|
9142
|
+
export const MetaQuestionCategory = {
|
|
9143
|
+
IDENTITY: "identity",
|
|
9144
|
+
CAPABILITIES: "capabilities",
|
|
9145
|
+
BEHAVIOR: "behavior",
|
|
9146
|
+
} as const;
|
|
9147
|
+
|
|
9148
|
+
export type MetaQuestionCategory =
|
|
9149
|
+
(typeof MetaQuestionCategory)[keyof typeof MetaQuestionCategory];
|
|
9150
|
+
|
|
9151
|
+
/**
|
|
9152
|
+
* MetaQuestionDetectedEvent
|
|
9153
|
+
*
|
|
9154
|
+
* Emitted when the user's message is a meta question about the agent itself —
|
|
9155
|
+
* its identity, its capabilities, or why it behaved a certain way — rather than a
|
|
9156
|
+
* task for the agent to perform. Routes the run to the self-awareness answer step
|
|
9157
|
+
* instead of the agent's normal workflow.
|
|
9158
|
+
*/
|
|
9159
|
+
export type MetaQuestionDetectedEvent = {
|
|
9160
|
+
/**
|
|
9161
|
+
* Event Id
|
|
9162
|
+
*/
|
|
9163
|
+
event_id?: string;
|
|
9164
|
+
/**
|
|
9165
|
+
* Created At
|
|
9166
|
+
*
|
|
9167
|
+
* The time (in ns since epoch) the event was stored in the event store
|
|
9168
|
+
*/
|
|
9169
|
+
created_at?: number;
|
|
9170
|
+
/**
|
|
9171
|
+
* Display name for the event
|
|
9172
|
+
*/
|
|
9173
|
+
display_name?: LocaleString | null;
|
|
9174
|
+
/**
|
|
9175
|
+
* Display description for the event
|
|
9176
|
+
*/
|
|
9177
|
+
display_description?: LocaleString | null;
|
|
9178
|
+
/**
|
|
9179
|
+
* User Query
|
|
9180
|
+
*
|
|
9181
|
+
* The user message classified as a meta question.
|
|
9182
|
+
*/
|
|
9183
|
+
user_query: string;
|
|
9184
|
+
/**
|
|
9185
|
+
* Which aspect of the agent the question is about.
|
|
9186
|
+
*/
|
|
9187
|
+
category: MetaQuestionCategory;
|
|
9188
|
+
/**
|
|
9189
|
+
* Reasoning
|
|
9190
|
+
*
|
|
9191
|
+
* Why the message was classified as a meta question.
|
|
9192
|
+
*/
|
|
9193
|
+
reasoning: string;
|
|
9194
|
+
/**
|
|
9195
|
+
* Event Name
|
|
9196
|
+
*
|
|
9197
|
+
* The event type name, usually the class name. If unknown, uses _unknown_event_name.
|
|
9198
|
+
* Used during deserialization to decide which subclass to instantiate.
|
|
9199
|
+
*/
|
|
9200
|
+
readonly _event_name: string;
|
|
9201
|
+
/**
|
|
9202
|
+
* Parent Event Names
|
|
9203
|
+
*
|
|
9204
|
+
* Contains the names of all parent classes up until BaseEvent, ordered from deepest to least deep inheritance.
|
|
9205
|
+
*/
|
|
9206
|
+
readonly _parent_event_names: Array<string>;
|
|
9207
|
+
[key: string]: unknown;
|
|
9208
|
+
};
|
|
9209
|
+
|
|
9141
9210
|
/**
|
|
9142
9211
|
* Metadata
|
|
9143
9212
|
*/
|
|
@@ -17243,6 +17312,7 @@ export type ContextualizedAgentEventWritable = {
|
|
|
17243
17312
|
| EmbeddingEventWritable
|
|
17244
17313
|
| LlmEventWritable
|
|
17245
17314
|
| LlmStopEventWritable
|
|
17315
|
+
| MetaQuestionDetectedEventWritable
|
|
17246
17316
|
| RerankerEventWritable
|
|
17247
17317
|
| RetrieverEventWritable
|
|
17248
17318
|
| ToolEventWritable
|
|
@@ -20240,6 +20310,52 @@ export type MessageWritable = {
|
|
|
20240
20310
|
contents?: Array<TextContent | ImageContent | AudioContent> | null;
|
|
20241
20311
|
};
|
|
20242
20312
|
|
|
20313
|
+
/**
|
|
20314
|
+
* MetaQuestionDetectedEvent
|
|
20315
|
+
*
|
|
20316
|
+
* Emitted when the user's message is a meta question about the agent itself —
|
|
20317
|
+
* its identity, its capabilities, or why it behaved a certain way — rather than a
|
|
20318
|
+
* task for the agent to perform. Routes the run to the self-awareness answer step
|
|
20319
|
+
* instead of the agent's normal workflow.
|
|
20320
|
+
*/
|
|
20321
|
+
export type MetaQuestionDetectedEventWritable = {
|
|
20322
|
+
/**
|
|
20323
|
+
* Event Id
|
|
20324
|
+
*/
|
|
20325
|
+
event_id?: string;
|
|
20326
|
+
/**
|
|
20327
|
+
* Created At
|
|
20328
|
+
*
|
|
20329
|
+
* The time (in ns since epoch) the event was stored in the event store
|
|
20330
|
+
*/
|
|
20331
|
+
created_at?: number;
|
|
20332
|
+
/**
|
|
20333
|
+
* Display name for the event
|
|
20334
|
+
*/
|
|
20335
|
+
display_name?: LocaleString | null;
|
|
20336
|
+
/**
|
|
20337
|
+
* Display description for the event
|
|
20338
|
+
*/
|
|
20339
|
+
display_description?: LocaleString | null;
|
|
20340
|
+
/**
|
|
20341
|
+
* User Query
|
|
20342
|
+
*
|
|
20343
|
+
* The user message classified as a meta question.
|
|
20344
|
+
*/
|
|
20345
|
+
user_query: string;
|
|
20346
|
+
/**
|
|
20347
|
+
* Which aspect of the agent the question is about.
|
|
20348
|
+
*/
|
|
20349
|
+
category: MetaQuestionCategory;
|
|
20350
|
+
/**
|
|
20351
|
+
* Reasoning
|
|
20352
|
+
*
|
|
20353
|
+
* Why the message was classified as a meta question.
|
|
20354
|
+
*/
|
|
20355
|
+
reasoning: string;
|
|
20356
|
+
[key: string]: unknown;
|
|
20357
|
+
};
|
|
20358
|
+
|
|
20243
20359
|
/**
|
|
20244
20360
|
* MinimalAgentInstanceDTO
|
|
20245
20361
|
*
|