chat
This commit is contained in:
34
listify-client/src/app/assistant/assistant.models.ts
Normal file
34
listify-client/src/app/assistant/assistant.models.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { UserList } from '../lists/lists.models';
|
||||
|
||||
export type AssistantMessageRole = 'user' | 'assistant';
|
||||
|
||||
export interface AssistantChatMessage {
|
||||
role: AssistantMessageRole;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export type AssistantAction =
|
||||
| {
|
||||
type: 'list.created';
|
||||
listId: string;
|
||||
list: UserList;
|
||||
}
|
||||
| {
|
||||
type: 'list.item_added';
|
||||
listId: string;
|
||||
itemTitle: string;
|
||||
list: UserList;
|
||||
};
|
||||
|
||||
export interface AssistantChatRequest {
|
||||
messages: AssistantChatMessage[];
|
||||
}
|
||||
|
||||
export interface AssistantChatResponse {
|
||||
message: AssistantChatMessage;
|
||||
actions: AssistantAction[];
|
||||
}
|
||||
|
||||
export interface AssistantConversationMessage extends AssistantChatMessage {
|
||||
actions?: AssistantAction[];
|
||||
}
|
||||
Reference in New Issue
Block a user