chatgpt-optimized-official
Version:
ChatGPT Client using official OpenAI API
26 lines (22 loc) • 478 B
text/typescript
import MessageType from "../enums/message-type.js";
interface Message {
id: string;
type: MessageType;
content?: string | ContentBlock[];
date: number;
name?: string;
tool_call_id?: string;
tool_calls?: any[];
response_format?: {};
}
export default Message;
export type ContentBlock = {
type: "text",
text: string
} | {
type: "image_url",
image_url: {
url: string,
detail?: "low" | "high" | "auto"
}
};