Introduction

Advanced Config

Set Up Your Preferred LLM

After installing Sublayer, you can choose between any of the available LLM providers we support.

OpenAI (Default)

Set your OPENAI_API_KEY environment variable. (Visit OpenAI to get an API key.)

Usage:

Sublayer.configuration.ai_provider = Sublayer::Providers::OpenAI
Sublayer.configuration.ai_model = "gpt-4-turbo-preview"

Anthropic

Supported Models: Claude 3 Opus, Claude 3 Haiku, Claude 3 Sonnet

Set your ANTHROPIC_API_KEY environment variable. (Visit Anthropic to get an API key.)

Usage:

Sublayer.configuration.ai_provider = Sublayer::Providers::Claude
Sublayer.configuration.ai_model ="claude-3-opus-20240229"

Google

Set your GOOGLE_API_KEY environment variable. (Visit Google AI Studio to get an API key.)

Usage:

Sublayer.configuration.ai_provider = Sublayer::Providers::Gemini
Sublayer.configuration.ai_model = "gemini-pro"

Groq

Set your GROQ_API_KEY environment variable. (Visit Groq to get an API key.)

Usage:

Sublayer.configuration.ai_provider = Sublayer::Providers::Groq
Sublayer.configuration.ai_model = "mixtral-8x7b-32768"

Nous Research (Running locally):

Follow our local model set up instructions

Usage:

Sublayer.configuration.ai_provider = Sublayer::Providers::Local
Sublayer.configuration.ai_model = "LLaMA_CPP"
Previous
Quick Start