Skip to main content

Providers

Providers in LangDB refer to the underlying providers available for large language models (LLMs) that power the database's natural language processing capabilities. These providers are configurable and reusable, allowing you to customize their parameters as needed when creating various models like competions and embeddings.

By defining providers, you can easily switch between different LLMs or fine-tune their settings to suit your specific requirements. LangDB supports various provider engines, such as OpenAI, AWS Bedrock, Gemini, Anthropic giving you flexibility in choosing the most suitable LLM for your application.

Creating a Provider

OpenAI

CREATE PROVIDER open_ai_provider
ENGINE = OpenAI(
api_key='sk-proj-xxx',
model_name = 'gpt-4o-mini'
);

AWS Bedrock

CREATE PROVIDER aws_provider
ENGINE = Bedrock(
access_key = 'xxxx',
access_secret = 'xxxx',
region = 'xxxx'
);

Using Providers

Once the providers are set, we can use them while creating models. More details can be found in the next sections.