diff options
author | polwex <polwex@sortug.com> | 2025-08-17 02:20:42 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-08-17 02:20:42 +0700 |
commit | 9be51e192fca8901d47328875d9e0c690d4b2b99 (patch) | |
tree | 926151e075c539019c5eb65e2140678acb383c5f /src/lib/services/llm.ts | |
parent | c505750ab36f8164256a91830fc83a807a9d6984 (diff) |
Diffstat (limited to 'src/lib/services/llm.ts')
-rw-r--r-- | src/lib/services/llm.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/services/llm.ts b/src/lib/services/llm.ts new file mode 100644 index 0000000..508423f --- /dev/null +++ b/src/lib/services/llm.ts @@ -0,0 +1,16 @@ +import AIModelAPI, { type LLMChoice } from "sortug-ai"; +import type { AsyncRes } from "@/lib/types"; + +export class LLM { + private api; + constructor(model: LLMChoice) { + const api = AIModelAPI(model); + this.api = api; + } + + async chat(text: string): AsyncRes<string> { + const res = await this.api.send(text); + console.log({ res }); + return res; + } +} |