@sinequa/assistant 3.1.1 → 3.2.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/chat/chat-message/chat-message.component.d.ts +2 -0
- package/chat/chat-settings-v3/chat-settings-v3.component.d.ts +8 -3
- package/chat/chat.component.d.ts +164 -145
- package/chat/chat.service.d.ts +21 -914
- package/chat/prompt.component.d.ts +21 -0
- package/chat/public-api.d.ts +1 -0
- package/chat/rest-chat.service.d.ts +4 -2
- package/chat/saved-chats/saved-chats.component.d.ts +5 -3
- package/chat/styles/assistant.scss +21 -1
- package/chat/types.d.ts +284 -866
- package/chat/websocket-chat.service.d.ts +4 -2
- package/esm2020/chat/chat-message/chat-message.component.mjs +5 -3
- package/esm2020/chat/chat-reference/chat-reference.component.mjs +3 -3
- package/esm2020/chat/chat-settings-v3/chat-settings-v3.component.mjs +22 -24
- package/esm2020/chat/chat.component.mjs +88 -33
- package/esm2020/chat/chat.service.mjs +68 -24
- package/esm2020/chat/prompt.component.mjs +88 -0
- package/esm2020/chat/public-api.mjs +2 -1
- package/esm2020/chat/rest-chat.service.mjs +41 -18
- package/esm2020/chat/saved-chats/saved-chats.component.mjs +38 -7
- package/esm2020/chat/types.mjs +50 -54
- package/esm2020/chat/websocket-chat.service.mjs +46 -19
- package/fesm2015/sinequa-assistant-chat.mjs +428 -172
- package/fesm2015/sinequa-assistant-chat.mjs.map +1 -1
- package/fesm2020/sinequa-assistant-chat.mjs +429 -176
- package/fesm2020/sinequa-assistant-chat.mjs.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { UntypedFormControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import { PromptOptions, ModalRef, ModalButton } from "@sinequa/core/modal";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ChatPrompt implements OnInit, OnDestroy {
|
|
7
|
+
model: PromptOptions;
|
|
8
|
+
protected modalRef: ModalRef;
|
|
9
|
+
protected formBuilder: UntypedFormBuilder;
|
|
10
|
+
inputControl: UntypedFormControl;
|
|
11
|
+
form: UntypedFormGroup;
|
|
12
|
+
formChanges: Subscription;
|
|
13
|
+
defaultButtons: ModalButton[];
|
|
14
|
+
constructor(model: PromptOptions, modalRef: ModalRef, formBuilder: UntypedFormBuilder);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
get title(): string;
|
|
18
|
+
get buttons(): ModalButton[];
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatPrompt, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatPrompt, "sq-chat-prompt", never, {}, {}, never, never, true>;
|
|
21
|
+
}
|
package/chat/public-api.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ChatService } from './chat.service';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { ChatMessage, ChatResponse, GllmFunction, GllmModelDescription, SavedChatHistory } from './types';
|
|
3
|
+
import { ChatMessage, ChatResponse, GllmFunction, GllmModelDescription, SavedChat, SavedChatHistory } from './types';
|
|
4
4
|
import { JsonMethodPluginService } from '@sinequa/core/web-services';
|
|
5
|
+
import { Query } from "@sinequa/core/app-utils";
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class RestChatService extends ChatService {
|
|
7
8
|
jsonMethodWebService: JsonMethodPluginService;
|
|
@@ -19,9 +20,10 @@ export declare class RestChatService extends ChatService {
|
|
|
19
20
|
getRequestsUrl(): void;
|
|
20
21
|
listModels(): Observable<GllmModelDescription[] | undefined>;
|
|
21
22
|
listFunctions(): Observable<GllmFunction[] | undefined>;
|
|
22
|
-
fetch(messages: ChatMessage[], query
|
|
23
|
+
fetch(messages: ChatMessage[], query: Query): Observable<ChatResponse>;
|
|
23
24
|
listSavedChat(): void;
|
|
24
25
|
getSavedChat(id: string): Observable<SavedChatHistory | undefined>;
|
|
26
|
+
updateSavedChat(id: string, name: string): Observable<SavedChat>;
|
|
25
27
|
deleteSavedChat(ids: string[]): Observable<number>;
|
|
26
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<RestChatService, never>;
|
|
27
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<RestChatService>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
|
|
2
2
|
import { AuditWebService } from "@sinequa/core/web-services";
|
|
3
|
-
import { ChatService } from "../chat.service";
|
|
4
|
-
import { SavedChat } from "../types";
|
|
5
|
-
import { InstanceManagerService } from "../instance-manager.service";
|
|
6
3
|
import { Subscription, BehaviorSubject } from "rxjs";
|
|
7
4
|
import { LoginService } from "@sinequa/core/login";
|
|
8
5
|
import { ModalService } from "@sinequa/core/modal";
|
|
9
6
|
import { NotificationsService } from "@sinequa/core/notification";
|
|
7
|
+
import { ChatService } from "../chat.service";
|
|
8
|
+
import { SavedChat } from "../types";
|
|
9
|
+
import { InstanceManagerService } from "../instance-manager.service";
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare class SavedChatsComponent implements OnInit, OnDestroy {
|
|
12
12
|
/** Define the key based on it, the appropriate chatService instance will be returned from instanceManagerService */
|
|
@@ -24,11 +24,13 @@ export declare class SavedChatsComponent implements OnInit, OnDestroy {
|
|
|
24
24
|
auditService: AuditWebService;
|
|
25
25
|
modalService: ModalService;
|
|
26
26
|
notificationsService: NotificationsService;
|
|
27
|
+
currentChatId?: string;
|
|
27
28
|
ngOnInit(): void;
|
|
28
29
|
ngOnDestroy(): void;
|
|
29
30
|
instantiateChatService(): void;
|
|
30
31
|
onListSavedChat(): void;
|
|
31
32
|
onLoad(savedChat: SavedChat): void;
|
|
33
|
+
onRename(savedChat: SavedChat): void;
|
|
32
34
|
onDelete(savedChat: SavedChat): void;
|
|
33
35
|
private _groupSavedChatsByDate;
|
|
34
36
|
private _getTimeKey;
|
|
@@ -25,9 +25,10 @@ $ast-primary-bg: var(--ast-primary-bg, #f2f8fe);
|
|
|
25
25
|
$ast-primary-color: var(--ast-primary-color, #005DA7);
|
|
26
26
|
$ast-secondary-bg: var(--ast-secondary-bg, #FFF8F1);
|
|
27
27
|
$ast-secondary-color: var(--ast-secondary-color, #FF732E);
|
|
28
|
+
$ast-saved-chat-hover-background: var(--ast-saved-chat-hover-background, #FFF8F1);
|
|
28
29
|
$ast-input-bg: var(--ast-input-bg, #F8F8F8);
|
|
29
30
|
$ast-input-color: var(--ast-input-color, #B0B0B0);
|
|
30
|
-
$ast-muted-color: rgba(33, 37, 41, 0.75);
|
|
31
|
+
$ast-muted-color: var(--ast-muted-color, rgba(33, 37, 41, 0.75));
|
|
31
32
|
|
|
32
33
|
/****************************************************
|
|
33
34
|
classes
|
|
@@ -59,3 +60,22 @@ $ast-muted-color: rgba(33, 37, 41, 0.75);
|
|
|
59
60
|
display: flex;
|
|
60
61
|
align-items: center;
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
.dark {
|
|
65
|
+
--ast-primary-bg: #0d0701;
|
|
66
|
+
--ast-primary-color: #008cd1;
|
|
67
|
+
--ast-secondary-bg: #00070e;
|
|
68
|
+
--ast-secondary-color: #ffa258;
|
|
69
|
+
--ast-input-bg: #070707;
|
|
70
|
+
--ast-input-color: rgba(222, 218, 218, 0.75);
|
|
71
|
+
--ast-muted-color: rgba(222, 218, 218, 0.75);
|
|
72
|
+
--ast-saved-chat-hover-background: #262421;
|
|
73
|
+
--ast-message-table-border-color: #333333;
|
|
74
|
+
--ast-message-table-tr-bg: #070707;
|
|
75
|
+
--ast-message-table-tr-border-color: #222222;
|
|
76
|
+
--ast-reference-icon-color: white;
|
|
77
|
+
--ast-reference-icon-active-color: black;
|
|
78
|
+
--ast-reference-passages-color: white;
|
|
79
|
+
--ast-reference-expanded-hover-bg: #262421;
|
|
80
|
+
--ast-message-reference-color: black;
|
|
81
|
+
}
|