Skip to content

armgit / my-yt

Public Imported from GitHub
0

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

JavaScript
402 B
Raw Blame
import { Anthropic } from './providers/anthropic.js'
import { Generic } from './providers/generic.js'

export async function summarize (
  system,
  prompt,
  llmSettings
) {
  try {
    const llm = llmSettings.host.includes('api.anthropic.com')
      ? new Anthropic(system, llmSettings)
      : new Generic(system, llmSettings)

    return llm.summarize(prompt)
  } catch (e) {
    return null
  }
}