Skip to content

Allow passing in openai/anthropic/etc clients #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alecf opened this issue Feb 11, 2025 · 0 comments
Open

Allow passing in openai/anthropic/etc clients #149

alecf opened this issue Feb 11, 2025 · 0 comments

Comments

@alecf
Copy link

alecf commented Feb 11, 2025

There are a number of 3rd party services that record + eval your prompts, and they usually act as drop-in replacements for the various OpenAI/Anthropic/etc clients. It would be nice if token.js allowed you to pass in the client to replace the default import

i.e.

import { OpenAI } from '@libretto/openai'

const librettoOpenAI = new OpenAI({...});
const tokenjs = new TokenJS({ openai: librettoOpenAI });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant