UNPKG

@aichatkit/types

Version:

Shared TypeScript types for Hypermode ChatKit

79 lines (67 loc) 1.19 kB
/** * Core message type definitions for the chat application */ /** * Represents a single chat message */ export interface Message { /** * Unique identifier for the message */ id: string | number /** * Content of the message */ content: string /** * Role of the message sender */ role: 'user' | 'assistant' /** * Optional timestamp of when the message was sent */ timestamp?: string } /** * Represents a conversation consisting of multiple messages */ export interface Conversation { /** * Unique identifier for the conversation */ id: string /** * Title of the conversation */ title: string /** * Messages in the conversation */ messages: Message[] } /** * Response from the chat API */ export interface ChatResponse { /** * The message text returned by the assistant */ message: string /** * JSON string representation of the conversation history */ history: string } /** * Simple message structure to handle chat history */ export interface ChatMessage { /** * Role of the message sender */ role: string /** * Content of the message */ content: string }