Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

refactor: llm/providers

Christian Fei230e029b81f4
diff --git a/lib/llm/index.js b/lib/llm/index.js
index 7e2d623..85777fa 100644
--- a/lib/llm/index.js
+++ b/lib/llm/index.js
@@ -1,5 +1,5 @@
-import { Anthropic } from "../drivers/anthropic.js"
-import { Openai } from "../drivers/openai.js"
+import { Anthropic } from "./providers/anthropic.js"
+import { Openai } from "./providers/openai.js"
export async function summarize(
system,
@@ -8,7 +8,7 @@ export async function summarize(
) {
try {
let llm
- if (llmSettings.model.includes('claude')) {
+ if (llmSettings.host.includes('api.anthropic.com')) {
llm = new Anthropic(system, llmSettings)
} else {
llm = new Openai(system, llmSettings)
diff --git a/lib/drivers/anthropic.js b/lib/llm/providers/anthropic.js
similarity index 100%
rename from lib/drivers/anthropic.js
rename to lib/llm/providers/anthropic.js
diff --git a/lib/drivers/openai.js b/lib/llm/providers/openai.js
similarity index 100%
rename from lib/drivers/openai.js
rename to lib/llm/providers/openai.js