Documentation Index
Fetch the complete documentation index at: https://docs.adaptive-ml.com/llms.txt
Use this file to discover all available pages before exploring further.
Connect external models or use Adaptive with LangChain.
External Models
Connect proprietary models (OpenAI, Azure, Google, Anthropic, NVIDIA NIM) to use them through the Adaptive API with interaction and feedback logging.
OpenAI (Direct)
external_model = adaptive.models.add_external(
provider="open_ai",
external_model_id="GPT4O",
name="GPT-4o",
api_key="OPENAI_API_KEY"
)
Supported model IDs: GPT4O, GPT4O_MINI, GPT4, GPT4_TURBO, GPT3_5_TURBO
Azure OpenAI
external_model = adaptive.models.add_external(
provider="azure",
external_model_id="DEPLOYMENT_NAME",
name="Azure GPT-4o",
api_key="AZURE_API_KEY",
endpoint="https://aoairesource.openai.azure.com"
)
The external_model_id is your deployment name, and endpoint is your Azure OpenAI subscription endpoint.
Google
external_model = adaptive.models.add_external(
provider="google",
external_model_id="gemini-1.5-pro",
name="Gemini 1.5 Pro",
api_key="GOOGLE_API_KEY"
)
Supported models: Gemini model variations (excluding embeddings).
Anthropic
external_model = adaptive.models.add_external(
provider="anthropic",
external_model_id="claude-sonnet-4-5-20250929",
name="Claude Sonnet 4.5",
api_key="ANTHROPIC_API_KEY"
)
Use the model ID from Anthropic’s API documentation as the external_model_id.
Once connected, attach the model to a use case and make inference requests like any other model.
LangChain
Adaptive is compatible with LangChain chat model classes.
ChatOpenAI
from langchain_openai import ChatOpenAI
import os
os.environ["OPENAI_API_KEY"] = "ADAPTIVE_API_KEY"
llm = ChatOpenAI(
model="use_case_key/model_key", # model_key is optional
base_url="ADAPTIVE_URL/api/v1",
)
messages = [
("system", "You are a helpful assistant that translates English to French."),
("human", "I love programming."),
]
response = llm.invoke(messages)
ChatGoogleGenerativeAI
from langchain_google_genai import ChatGoogleGenerativeAI
import os
os.environ["GOOGLE_API_KEY"] = "ADAPTIVE_API_KEY"
llm = ChatGoogleGenerativeAI(
model="use_case_key",
client_options={"api_endpoint": "ADAPTIVE_URL/api/v1/google"},
transport="rest",
)
messages = [
("system", "You are a helpful assistant that translates English to French."),
("human", "I love programming."),
]
response = llm.invoke(messages)