Skip to main content
This package works with Deno, BunIt is unknown whether this package works with Cloudflare Workers, Node.js, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
64%
Published
3 weeks ago (0.0.4)

简体中文 | English

Pantheons

Pantheons.js is a unified conversational library built on top of the OpenAI Node.js SDK. It provides a seamless interface to interact with multiple large language models (LLMs) like OpenAI, Deepseek, DashScope, Gemini and more. Inspired by the mythological pantheon of gods—each representing unique powers and attributes—this library unifies various models under a single, intuitive interface.

Supported large models

Installation

Using npm:

npm install pantheons

Usages

Nodejs

import { Deepseek } from 'pantheons';

(async () => {
    const client = new Deepseek('Your key');
    const stream = await client.stream({
        model: 'deepseek-chat',
        stream: true,
        messages: [{ role: 'user', content: 'Hi!' }],
    });

    let result = '';
    for await (const chunk of stream) {
        result += chunk.choices[0].delta?.content;
    }

    console.log(result);
})()

Add Package

deno add jsr:@greywen/pantheons-test

Import symbol

import * as pantheons_test from "@greywen/pantheons-test";

---- OR ----

Import directly with a jsr specifier

import * as pantheons_test from "jsr:@greywen/pantheons-test";

Add Package

npx jsr add @greywen/pantheons-test

Import symbol

import * as pantheons_test from "@greywen/pantheons-test";

Add Package

yarn dlx jsr add @greywen/pantheons-test

Import symbol

import * as pantheons_test from "@greywen/pantheons-test";

Add Package

pnpm dlx jsr add @greywen/pantheons-test

Import symbol

import * as pantheons_test from "@greywen/pantheons-test";

Add Package

bunx jsr add @greywen/pantheons-test

Import symbol

import * as pantheons_test from "@greywen/pantheons-test";