Skip to main content

Integrations: Chat Models

LangChainGo offers a number of Chat Models implementations that integrate with various model providers. These include:

OpenAI​

import "github.com/tmc/langchaingo/llms/openai"

llm, err := openai.New()

Anthropic​

import "github.com/tmc/langchaingo/llms/anthropic"

llm, err := anthropic.New()

Google AI (Gemini)​

import "github.com/tmc/langchaingo/llms/googleai"

llm, err := googleai.New(ctx)

Ollama (Local Models)​

import "github.com/tmc/langchaingo/llms/ollama"

llm, err := ollama.New()

For detailed configuration options for each provider, see the Configure LLM Providers guide.