LangChain Chat Models
Overview
Scrap Web supports various LangChain chat models. Here’s how to configure and use the most popular ones. The full list is available in the LangChain documentation.
Model Recommendations
We have yet to test performance across all models. Currently, we recommend using GPT-4o. It achieves 89% accuracy on WebVoyager Dataset.
Supported Models
All LangChain chat models are supported. We will document the most popular ones here.
OpenAI
OpenAI’s GPT-4o models are recommended for best performance.
Copy
from langchain_openai import ChatOpenAI
from swift_web import Agent
# Initialize the model
llm = ChatOpenAI(
model="gpt-4o",
temperature=0.0,
)
# Create agent with the model
agent = Agent(
task="Your task here",
llm=llm
)Required environment variables:
.envCopy
Anthropic
Claude models provide excellent performance and can handle complex tasks well.
Copy
And add the variable:
.envCopy
Azure OpenAI
If you’re using Azure OpenAI services, you can configure the model like this:
Copy
Required environment variables:
.envCopy
Coming soon
(Sorry, we are working on it)
Gemini
Groq
DeepSeek
Github
Ollama
QWen
Last updated