Use Anthropic

Using Anthropic with Foyle

What You’ll Learn

How to configure Foyle to use Anthropic Models

Prerequisites

  1. You need a Anthropic account

Setup Foyle To Use Anthropic Models

  1. Get an API Token from the Anthropic Console and save it to a file

  2. Configure Foyle to use this API key

foyle config set anthropic.apiKeyFile=/path/to/your/key/file
  1. Configure Foyle to use the desired Antrhopic Model
foyle config set  agent.model=claude-3-5-sonnet-20240620
foyle config set  agent.modelProvider=anthropic                

How It Works

Foyle uses 2 Models

  • A Chat model to generate completions
  • An embedding model to compute embeddings for RAG

Anthropic’s models.

Anthropic doesn’t provide embedding models so Foyle continues to use OpenAI for the embedding models. At some, we may add support for Voyage AI’s embedding models.


Last modified October 9, 2024: Redo documentation (#291) (4189fe5)