@jupyter/chat 0.25.0-alpha.2 → 0.25.0-alpha.3
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/lib/model.d.ts +9 -0
- package/lib/model.js +3 -0
- package/package.json +1 -1
- package/src/model.ts +13 -0
package/lib/model.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ import { IChatHistory, IConfig, IMessage, IMessageContent, INewMessage, IUser }
|
|
|
12
12
|
* The chat model interface.
|
|
13
13
|
*/
|
|
14
14
|
export interface IChatModel extends IDisposable {
|
|
15
|
+
/**
|
|
16
|
+
* The unique id of the chat, when known. Implemented by `AbstractChatModel`.
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
15
19
|
/**
|
|
16
20
|
* The chat model name.
|
|
17
21
|
*/
|
|
@@ -518,6 +522,10 @@ export declare namespace IChatModel {
|
|
|
518
522
|
* exposing the method that can modify it.
|
|
519
523
|
*/
|
|
520
524
|
export interface IChatContext {
|
|
525
|
+
/**
|
|
526
|
+
* The unique id of the chat, when known.
|
|
527
|
+
*/
|
|
528
|
+
readonly id?: string;
|
|
521
529
|
/**
|
|
522
530
|
* The name of the chat.
|
|
523
531
|
*/
|
|
@@ -548,6 +556,7 @@ export declare abstract class AbstractChatContext implements IChatContext {
|
|
|
548
556
|
constructor(options: {
|
|
549
557
|
model: IChatModel;
|
|
550
558
|
});
|
|
559
|
+
get id(): string | undefined;
|
|
551
560
|
get name(): string;
|
|
552
561
|
get messages(): IMessageContent[];
|
|
553
562
|
get user(): IUser | undefined;
|
package/lib/model.js
CHANGED
package/package.json
CHANGED
package/src/model.ts
CHANGED
|
@@ -33,6 +33,11 @@ import {
|
|
|
33
33
|
* The chat model interface.
|
|
34
34
|
*/
|
|
35
35
|
export interface IChatModel extends IDisposable {
|
|
36
|
+
/**
|
|
37
|
+
* The unique id of the chat, when known. Implemented by `AbstractChatModel`.
|
|
38
|
+
*/
|
|
39
|
+
id?: string;
|
|
40
|
+
|
|
36
41
|
/**
|
|
37
42
|
* The chat model name.
|
|
38
43
|
*/
|
|
@@ -999,6 +1004,10 @@ export namespace IChatModel {
|
|
|
999
1004
|
* exposing the method that can modify it.
|
|
1000
1005
|
*/
|
|
1001
1006
|
export interface IChatContext {
|
|
1007
|
+
/**
|
|
1008
|
+
* The unique id of the chat, when known.
|
|
1009
|
+
*/
|
|
1010
|
+
readonly id?: string;
|
|
1002
1011
|
/**
|
|
1003
1012
|
* The name of the chat.
|
|
1004
1013
|
*/
|
|
@@ -1031,6 +1040,10 @@ export abstract class AbstractChatContext implements IChatContext {
|
|
|
1031
1040
|
this._model = options.model;
|
|
1032
1041
|
}
|
|
1033
1042
|
|
|
1043
|
+
get id(): string | undefined {
|
|
1044
|
+
return this._model.id;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1034
1047
|
get name(): string {
|
|
1035
1048
|
return this._model.name;
|
|
1036
1049
|
}
|