@instructure/athena-api-client 2.0.3 → 2.0.4
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/README.md +1 -0
- package/dist/apis/ChatsApi.d.ts +2 -2
- package/dist/apis/ChatsApi.js +2 -2
- package/dist/esm/apis/ChatsApi.d.ts +2 -2
- package/dist/esm/apis/ChatsApi.js +2 -2
- package/dist/esm/models/ChatRequest.d.ts +7 -0
- package/dist/esm/models/ChatRequest.js +3 -0
- package/dist/esm/models/ChatRequestExternalFileUrl.d.ts +56 -0
- package/dist/esm/models/ChatRequestExternalFileUrl.js +62 -0
- package/dist/esm/models/MessageAttachment.d.ts +13 -1
- package/dist/esm/models/MessageAttachment.js +4 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/ChatRequest.d.ts +7 -0
- package/dist/models/ChatRequest.js +3 -0
- package/dist/models/ChatRequestExternalFileUrl.d.ts +56 -0
- package/dist/models/ChatRequestExternalFileUrl.js +70 -0
- package/dist/models/MessageAttachment.d.ts +13 -1
- package/dist/models/MessageAttachment.js +4 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -127,6 +127,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
127
127
|
- [ChatAnalysis](docs/ChatAnalysis.md)
|
|
128
128
|
- [ChatRequest](docs/ChatRequest.md)
|
|
129
129
|
- [ChatRequestAttachmentsInner](docs/ChatRequestAttachmentsInner.md)
|
|
130
|
+
- [ChatRequestExternalFileUrl](docs/ChatRequestExternalFileUrl.md)
|
|
130
131
|
- [ChatRequestQuizContext](docs/ChatRequestQuizContext.md)
|
|
131
132
|
- [ChatRequestQuizContextAnswerState](docs/ChatRequestQuizContextAnswerState.md)
|
|
132
133
|
- [ChatRequestQuizContextCurrentQuestion](docs/ChatRequestQuizContextCurrentQuestion.md)
|
package/dist/apis/ChatsApi.d.ts
CHANGED
|
@@ -100,12 +100,12 @@ export declare class ChatsApi extends runtime.BaseAPI {
|
|
|
100
100
|
*/
|
|
101
101
|
markChatAsViewed(requestParameters: MarkChatAsViewedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Chat>;
|
|
102
102
|
/**
|
|
103
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
103
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
104
104
|
* Send a message to a chat
|
|
105
105
|
*/
|
|
106
106
|
sendChatMessageRaw(requestParameters: SendChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
107
107
|
/**
|
|
108
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
108
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
109
109
|
* Send a message to a chat
|
|
110
110
|
*/
|
|
111
111
|
sendChatMessage(requestParameters: SendChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
package/dist/apis/ChatsApi.js
CHANGED
|
@@ -240,7 +240,7 @@ class ChatsApi extends runtime.BaseAPI {
|
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
243
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
244
244
|
* Send a message to a chat
|
|
245
245
|
*/
|
|
246
246
|
sendChatMessageRaw(requestParameters, initOverrides) {
|
|
@@ -286,7 +286,7 @@ class ChatsApi extends runtime.BaseAPI {
|
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
288
|
/**
|
|
289
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
289
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
290
290
|
* Send a message to a chat
|
|
291
291
|
*/
|
|
292
292
|
sendChatMessage(requestParameters, initOverrides) {
|
|
@@ -100,12 +100,12 @@ export declare class ChatsApi extends runtime.BaseAPI {
|
|
|
100
100
|
*/
|
|
101
101
|
markChatAsViewed(requestParameters: MarkChatAsViewedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Chat>;
|
|
102
102
|
/**
|
|
103
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
103
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
104
104
|
* Send a message to a chat
|
|
105
105
|
*/
|
|
106
106
|
sendChatMessageRaw(requestParameters: SendChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
107
107
|
/**
|
|
108
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
108
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
109
109
|
* Send a message to a chat
|
|
110
110
|
*/
|
|
111
111
|
sendChatMessage(requestParameters: SendChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
@@ -237,7 +237,7 @@ export class ChatsApi extends runtime.BaseAPI {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
240
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
241
241
|
* Send a message to a chat
|
|
242
242
|
*/
|
|
243
243
|
sendChatMessageRaw(requestParameters, initOverrides) {
|
|
@@ -283,7 +283,7 @@ export class ChatsApi extends runtime.BaseAPI {
|
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
|
-
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
286
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time. An optional externalFileUrl (url + mediaType) can be included to have the model read a file as part of its response.
|
|
287
287
|
* Send a message to a chat
|
|
288
288
|
*/
|
|
289
289
|
sendChatMessage(requestParameters, initOverrides) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ChatRequestExternalFileUrl } from './ChatRequestExternalFileUrl';
|
|
12
13
|
import type { ChatRequestAttachmentsInner } from './ChatRequestAttachmentsInner';
|
|
13
14
|
import type { ChatRequestQuizContext } from './ChatRequestQuizContext';
|
|
14
15
|
/**
|
|
@@ -41,6 +42,12 @@ export interface ChatRequest {
|
|
|
41
42
|
* @memberof ChatRequest
|
|
42
43
|
*/
|
|
43
44
|
attachments?: Array<ChatRequestAttachmentsInner>;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {ChatRequestExternalFileUrl}
|
|
48
|
+
* @memberof ChatRequest
|
|
49
|
+
*/
|
|
50
|
+
externalFileUrl?: ChatRequestExternalFileUrl;
|
|
44
51
|
/**
|
|
45
52
|
*
|
|
46
53
|
* @type {ChatRequestQuizContext}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ChatRequestExternalFileUrlFromJSON, ChatRequestExternalFileUrlToJSON, } from './ChatRequestExternalFileUrl';
|
|
14
15
|
import { ChatRequestAttachmentsInnerFromJSON, ChatRequestAttachmentsInnerToJSON, } from './ChatRequestAttachmentsInner';
|
|
15
16
|
import { ChatRequestQuizContextFromJSON, ChatRequestQuizContextToJSON, } from './ChatRequestQuizContext';
|
|
16
17
|
/**
|
|
@@ -35,6 +36,7 @@ export function ChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
36
|
'chatId': json['chatId'],
|
|
36
37
|
'chatType': json['chatType'] == null ? undefined : json['chatType'],
|
|
37
38
|
'attachments': json['attachments'] == null ? undefined : (json['attachments'].map(ChatRequestAttachmentsInnerFromJSON)),
|
|
39
|
+
'externalFileUrl': json['externalFileUrl'] == null ? undefined : ChatRequestExternalFileUrlFromJSON(json['externalFileUrl']),
|
|
38
40
|
'quizContext': json['quizContext'] == null ? undefined : ChatRequestQuizContextFromJSON(json['quizContext']),
|
|
39
41
|
};
|
|
40
42
|
}
|
|
@@ -50,6 +52,7 @@ export function ChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
50
52
|
'chatId': value['chatId'],
|
|
51
53
|
'chatType': value['chatType'],
|
|
52
54
|
'attachments': value['attachments'] == null ? undefined : (value['attachments'].map(ChatRequestAttachmentsInnerToJSON)),
|
|
55
|
+
'externalFileUrl': ChatRequestExternalFileUrlToJSON(value['externalFileUrl']),
|
|
53
56
|
'quizContext': ChatRequestQuizContextToJSON(value['quizContext']),
|
|
54
57
|
};
|
|
55
58
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Optional external file URL to pass directly to the AI in this message. The model will read the file content as part of its response.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChatRequestExternalFileUrl
|
|
16
|
+
*/
|
|
17
|
+
export interface ChatRequestExternalFileUrl {
|
|
18
|
+
/**
|
|
19
|
+
* Publicly accessible or pre-signed URL of the file
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChatRequestExternalFileUrl
|
|
22
|
+
*/
|
|
23
|
+
url: string;
|
|
24
|
+
/**
|
|
25
|
+
* MIME type of the file
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ChatRequestExternalFileUrl
|
|
28
|
+
*/
|
|
29
|
+
mediaType: ChatRequestExternalFileUrlMediaTypeEnum;
|
|
30
|
+
/**
|
|
31
|
+
* File size in bytes (max 20971520)
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ChatRequestExternalFileUrl
|
|
34
|
+
*/
|
|
35
|
+
size: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const ChatRequestExternalFileUrlMediaTypeEnum: {
|
|
41
|
+
readonly ImagePng: "image/png";
|
|
42
|
+
readonly ImageJpeg: "image/jpeg";
|
|
43
|
+
readonly ImageJpg: "image/jpg";
|
|
44
|
+
readonly ImageWebp: "image/webp";
|
|
45
|
+
readonly ImageGif: "image/gif";
|
|
46
|
+
readonly ApplicationPdf: "application/pdf";
|
|
47
|
+
};
|
|
48
|
+
export type ChatRequestExternalFileUrlMediaTypeEnum = typeof ChatRequestExternalFileUrlMediaTypeEnum[keyof typeof ChatRequestExternalFileUrlMediaTypeEnum];
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the ChatRequestExternalFileUrl interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfChatRequestExternalFileUrl(value: object): value is ChatRequestExternalFileUrl;
|
|
53
|
+
export declare function ChatRequestExternalFileUrlFromJSON(json: any): ChatRequestExternalFileUrl;
|
|
54
|
+
export declare function ChatRequestExternalFileUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatRequestExternalFileUrl;
|
|
55
|
+
export declare function ChatRequestExternalFileUrlToJSON(json: any): ChatRequestExternalFileUrl;
|
|
56
|
+
export declare function ChatRequestExternalFileUrlToJSONTyped(value?: ChatRequestExternalFileUrl | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const ChatRequestExternalFileUrlMediaTypeEnum = {
|
|
18
|
+
ImagePng: 'image/png',
|
|
19
|
+
ImageJpeg: 'image/jpeg',
|
|
20
|
+
ImageJpg: 'image/jpg',
|
|
21
|
+
ImageWebp: 'image/webp',
|
|
22
|
+
ImageGif: 'image/gif',
|
|
23
|
+
ApplicationPdf: 'application/pdf'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ChatRequestExternalFileUrl interface.
|
|
27
|
+
*/
|
|
28
|
+
export function instanceOfChatRequestExternalFileUrl(value) {
|
|
29
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('mediaType' in value) || value['mediaType'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('size' in value) || value['size'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
export function ChatRequestExternalFileUrlFromJSON(json) {
|
|
38
|
+
return ChatRequestExternalFileUrlFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function ChatRequestExternalFileUrlFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'url': json['url'],
|
|
46
|
+
'mediaType': json['mediaType'],
|
|
47
|
+
'size': json['size'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function ChatRequestExternalFileUrlToJSON(json) {
|
|
51
|
+
return ChatRequestExternalFileUrlToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
export function ChatRequestExternalFileUrlToJSONTyped(value, ignoreDiscriminator = false) {
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'url': value['url'],
|
|
59
|
+
'mediaType': value['mediaType'],
|
|
60
|
+
'size': value['size'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -34,11 +34,23 @@ export interface MessageAttachment {
|
|
|
34
34
|
*/
|
|
35
35
|
name: string;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* For S3 attachments: a fresh signed GET URL (expires in 30 minutes). For canvas-file attachments: the permanent Canvas file URL.
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof MessageAttachment
|
|
40
40
|
*/
|
|
41
41
|
url?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Attachment type identifier (e.g. 'canvas-file').
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof MessageAttachment
|
|
46
|
+
*/
|
|
47
|
+
type?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Canvas course name the file belongs to.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof MessageAttachment
|
|
52
|
+
*/
|
|
53
|
+
courseName?: string;
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
44
56
|
* @export
|
|
@@ -43,6 +43,8 @@ export function MessageAttachmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
43
|
'mimeType': json['mimeType'],
|
|
44
44
|
'name': json['name'],
|
|
45
45
|
'url': json['url'] == null ? undefined : json['url'],
|
|
46
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
47
|
+
'courseName': json['courseName'] == null ? undefined : json['courseName'],
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
50
|
export function MessageAttachmentToJSON(json) {
|
|
@@ -57,5 +59,7 @@ export function MessageAttachmentToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
57
59
|
'mimeType': value['mimeType'],
|
|
58
60
|
'name': value['name'],
|
|
59
61
|
'url': value['url'],
|
|
62
|
+
'type': value['type'],
|
|
63
|
+
'courseName': value['courseName'],
|
|
60
64
|
};
|
|
61
65
|
}
|
|
@@ -9,6 +9,7 @@ export * from './Chat';
|
|
|
9
9
|
export * from './ChatAnalysis';
|
|
10
10
|
export * from './ChatRequest';
|
|
11
11
|
export * from './ChatRequestAttachmentsInner';
|
|
12
|
+
export * from './ChatRequestExternalFileUrl';
|
|
12
13
|
export * from './ChatRequestQuizContext';
|
|
13
14
|
export * from './ChatRequestQuizContextAnswerState';
|
|
14
15
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export * from './Chat';
|
|
|
11
11
|
export * from './ChatAnalysis';
|
|
12
12
|
export * from './ChatRequest';
|
|
13
13
|
export * from './ChatRequestAttachmentsInner';
|
|
14
|
+
export * from './ChatRequestExternalFileUrl';
|
|
14
15
|
export * from './ChatRequestQuizContext';
|
|
15
16
|
export * from './ChatRequestQuizContextAnswerState';
|
|
16
17
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ChatRequestExternalFileUrl } from './ChatRequestExternalFileUrl';
|
|
12
13
|
import type { ChatRequestAttachmentsInner } from './ChatRequestAttachmentsInner';
|
|
13
14
|
import type { ChatRequestQuizContext } from './ChatRequestQuizContext';
|
|
14
15
|
/**
|
|
@@ -41,6 +42,12 @@ export interface ChatRequest {
|
|
|
41
42
|
* @memberof ChatRequest
|
|
42
43
|
*/
|
|
43
44
|
attachments?: Array<ChatRequestAttachmentsInner>;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {ChatRequestExternalFileUrl}
|
|
48
|
+
* @memberof ChatRequest
|
|
49
|
+
*/
|
|
50
|
+
externalFileUrl?: ChatRequestExternalFileUrl;
|
|
44
51
|
/**
|
|
45
52
|
*
|
|
46
53
|
* @type {ChatRequestQuizContext}
|
|
@@ -18,6 +18,7 @@ exports.ChatRequestFromJSON = ChatRequestFromJSON;
|
|
|
18
18
|
exports.ChatRequestFromJSONTyped = ChatRequestFromJSONTyped;
|
|
19
19
|
exports.ChatRequestToJSON = ChatRequestToJSON;
|
|
20
20
|
exports.ChatRequestToJSONTyped = ChatRequestToJSONTyped;
|
|
21
|
+
const ChatRequestExternalFileUrl_1 = require("./ChatRequestExternalFileUrl");
|
|
21
22
|
const ChatRequestAttachmentsInner_1 = require("./ChatRequestAttachmentsInner");
|
|
22
23
|
const ChatRequestQuizContext_1 = require("./ChatRequestQuizContext");
|
|
23
24
|
/**
|
|
@@ -42,6 +43,7 @@ function ChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
43
|
'chatId': json['chatId'],
|
|
43
44
|
'chatType': json['chatType'] == null ? undefined : json['chatType'],
|
|
44
45
|
'attachments': json['attachments'] == null ? undefined : (json['attachments'].map(ChatRequestAttachmentsInner_1.ChatRequestAttachmentsInnerFromJSON)),
|
|
46
|
+
'externalFileUrl': json['externalFileUrl'] == null ? undefined : (0, ChatRequestExternalFileUrl_1.ChatRequestExternalFileUrlFromJSON)(json['externalFileUrl']),
|
|
45
47
|
'quizContext': json['quizContext'] == null ? undefined : (0, ChatRequestQuizContext_1.ChatRequestQuizContextFromJSON)(json['quizContext']),
|
|
46
48
|
};
|
|
47
49
|
}
|
|
@@ -57,6 +59,7 @@ function ChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
57
59
|
'chatId': value['chatId'],
|
|
58
60
|
'chatType': value['chatType'],
|
|
59
61
|
'attachments': value['attachments'] == null ? undefined : (value['attachments'].map(ChatRequestAttachmentsInner_1.ChatRequestAttachmentsInnerToJSON)),
|
|
62
|
+
'externalFileUrl': (0, ChatRequestExternalFileUrl_1.ChatRequestExternalFileUrlToJSON)(value['externalFileUrl']),
|
|
60
63
|
'quizContext': (0, ChatRequestQuizContext_1.ChatRequestQuizContextToJSON)(value['quizContext']),
|
|
61
64
|
};
|
|
62
65
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Optional external file URL to pass directly to the AI in this message. The model will read the file content as part of its response.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChatRequestExternalFileUrl
|
|
16
|
+
*/
|
|
17
|
+
export interface ChatRequestExternalFileUrl {
|
|
18
|
+
/**
|
|
19
|
+
* Publicly accessible or pre-signed URL of the file
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChatRequestExternalFileUrl
|
|
22
|
+
*/
|
|
23
|
+
url: string;
|
|
24
|
+
/**
|
|
25
|
+
* MIME type of the file
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ChatRequestExternalFileUrl
|
|
28
|
+
*/
|
|
29
|
+
mediaType: ChatRequestExternalFileUrlMediaTypeEnum;
|
|
30
|
+
/**
|
|
31
|
+
* File size in bytes (max 20971520)
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ChatRequestExternalFileUrl
|
|
34
|
+
*/
|
|
35
|
+
size: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const ChatRequestExternalFileUrlMediaTypeEnum: {
|
|
41
|
+
readonly ImagePng: "image/png";
|
|
42
|
+
readonly ImageJpeg: "image/jpeg";
|
|
43
|
+
readonly ImageJpg: "image/jpg";
|
|
44
|
+
readonly ImageWebp: "image/webp";
|
|
45
|
+
readonly ImageGif: "image/gif";
|
|
46
|
+
readonly ApplicationPdf: "application/pdf";
|
|
47
|
+
};
|
|
48
|
+
export type ChatRequestExternalFileUrlMediaTypeEnum = typeof ChatRequestExternalFileUrlMediaTypeEnum[keyof typeof ChatRequestExternalFileUrlMediaTypeEnum];
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the ChatRequestExternalFileUrl interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfChatRequestExternalFileUrl(value: object): value is ChatRequestExternalFileUrl;
|
|
53
|
+
export declare function ChatRequestExternalFileUrlFromJSON(json: any): ChatRequestExternalFileUrl;
|
|
54
|
+
export declare function ChatRequestExternalFileUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatRequestExternalFileUrl;
|
|
55
|
+
export declare function ChatRequestExternalFileUrlToJSON(json: any): ChatRequestExternalFileUrl;
|
|
56
|
+
export declare function ChatRequestExternalFileUrlToJSONTyped(value?: ChatRequestExternalFileUrl | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ChatRequestExternalFileUrlMediaTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfChatRequestExternalFileUrl = instanceOfChatRequestExternalFileUrl;
|
|
18
|
+
exports.ChatRequestExternalFileUrlFromJSON = ChatRequestExternalFileUrlFromJSON;
|
|
19
|
+
exports.ChatRequestExternalFileUrlFromJSONTyped = ChatRequestExternalFileUrlFromJSONTyped;
|
|
20
|
+
exports.ChatRequestExternalFileUrlToJSON = ChatRequestExternalFileUrlToJSON;
|
|
21
|
+
exports.ChatRequestExternalFileUrlToJSONTyped = ChatRequestExternalFileUrlToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ChatRequestExternalFileUrlMediaTypeEnum = {
|
|
26
|
+
ImagePng: 'image/png',
|
|
27
|
+
ImageJpeg: 'image/jpeg',
|
|
28
|
+
ImageJpg: 'image/jpg',
|
|
29
|
+
ImageWebp: 'image/webp',
|
|
30
|
+
ImageGif: 'image/gif',
|
|
31
|
+
ApplicationPdf: 'application/pdf'
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the ChatRequestExternalFileUrl interface.
|
|
35
|
+
*/
|
|
36
|
+
function instanceOfChatRequestExternalFileUrl(value) {
|
|
37
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('mediaType' in value) || value['mediaType'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('size' in value) || value['size'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
function ChatRequestExternalFileUrlFromJSON(json) {
|
|
46
|
+
return ChatRequestExternalFileUrlFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function ChatRequestExternalFileUrlFromJSONTyped(json, ignoreDiscriminator) {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'url': json['url'],
|
|
54
|
+
'mediaType': json['mediaType'],
|
|
55
|
+
'size': json['size'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function ChatRequestExternalFileUrlToJSON(json) {
|
|
59
|
+
return ChatRequestExternalFileUrlToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
function ChatRequestExternalFileUrlToJSONTyped(value, ignoreDiscriminator = false) {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
'url': value['url'],
|
|
67
|
+
'mediaType': value['mediaType'],
|
|
68
|
+
'size': value['size'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -34,11 +34,23 @@ export interface MessageAttachment {
|
|
|
34
34
|
*/
|
|
35
35
|
name: string;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* For S3 attachments: a fresh signed GET URL (expires in 30 minutes). For canvas-file attachments: the permanent Canvas file URL.
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof MessageAttachment
|
|
40
40
|
*/
|
|
41
41
|
url?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Attachment type identifier (e.g. 'canvas-file').
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof MessageAttachment
|
|
46
|
+
*/
|
|
47
|
+
type?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Canvas course name the file belongs to.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof MessageAttachment
|
|
52
|
+
*/
|
|
53
|
+
courseName?: string;
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
44
56
|
* @export
|
|
@@ -51,6 +51,8 @@ function MessageAttachmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'mimeType': json['mimeType'],
|
|
52
52
|
'name': json['name'],
|
|
53
53
|
'url': json['url'] == null ? undefined : json['url'],
|
|
54
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
55
|
+
'courseName': json['courseName'] == null ? undefined : json['courseName'],
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
58
|
function MessageAttachmentToJSON(json) {
|
|
@@ -65,5 +67,7 @@ function MessageAttachmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
65
67
|
'mimeType': value['mimeType'],
|
|
66
68
|
'name': value['name'],
|
|
67
69
|
'url': value['url'],
|
|
70
|
+
'type': value['type'],
|
|
71
|
+
'courseName': value['courseName'],
|
|
68
72
|
};
|
|
69
73
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './Chat';
|
|
|
9
9
|
export * from './ChatAnalysis';
|
|
10
10
|
export * from './ChatRequest';
|
|
11
11
|
export * from './ChatRequestAttachmentsInner';
|
|
12
|
+
export * from './ChatRequestExternalFileUrl';
|
|
12
13
|
export * from './ChatRequestQuizContext';
|
|
13
14
|
export * from './ChatRequestQuizContextAnswerState';
|
|
14
15
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
package/dist/models/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./Chat"), exports);
|
|
|
27
27
|
__exportStar(require("./ChatAnalysis"), exports);
|
|
28
28
|
__exportStar(require("./ChatRequest"), exports);
|
|
29
29
|
__exportStar(require("./ChatRequestAttachmentsInner"), exports);
|
|
30
|
+
__exportStar(require("./ChatRequestExternalFileUrl"), exports);
|
|
30
31
|
__exportStar(require("./ChatRequestQuizContext"), exports);
|
|
31
32
|
__exportStar(require("./ChatRequestQuizContextAnswerState"), exports);
|
|
32
33
|
__exportStar(require("./ChatRequestQuizContextCurrentQuestion"), exports);
|