Anthropic
Before you start
- Obtain an Anthropic API key here (opens in a new tab).
- Make sure the
ANTHROPIC_API_KEY
environment variable is set.
Usage
import { UniLLM } from 'unillm';
/*
#SETUP#
*/
// Setup UniLLM
const unillm = new UniLLM();
// Use any LLM provider and model
const response = await unillm.createChatCompletion("#MODEL#", {
temperature: 0,
messages: [
{
role: "user",
content: "How are you?"
}
]
})