diff options
| author | polwex <polwex@sortug.com> | 2025-02-13 12:29:32 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-02-13 12:29:32 +0700 |
| commit | 4c6913644b362b28f15b125c2fbe48165f1e048c (patch) | |
| tree | 147f5e16f18e956fe55959ac3e03e5afb03b9b52 /src/types | |
init
Diffstat (limited to 'src/types')
| -rw-r--r-- | src/types/index.ts | 15 | ||||
| -rw-r--r-- | src/types/mtproto.ts | 0 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..97be443 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,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 }; diff --git a/src/types/mtproto.ts b/src/types/mtproto.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/types/mtproto.ts |
