blob: 97be44397295fd65dde2de5f4023f4afbf7e52f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import type OpenAI from "openai";
export type ChatMessage = {
author: string;
text: string;
sent: number;
reasoning?: string;
};
export type Result<T> = { ok: T } | { error: string };
export type AResult<T> = Promise<{ ok: T } | { error: string }>;
// openai
export type OChoice = OpenAI.Chat.Completions.ChatCompletion.Choice;
export type OChunk = OpenAI.Chat.Completions.ChatCompletionChunk.Choice;
export type OMessage = OpenAI.Chat.Completions.ChatCompletionMessageParam;
export type ContentType = { text: string } | { audio: Response };
|