Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 618 Bytes

vendors.md

File metadata and controls

41 lines (29 loc) · 618 Bytes

Vendors Initialization Examples

Ollama

For installation see: https://ollama.com/

from langchain_community.chat_models import ChatOllama

llm = ChatOllama(model='llava')

OpenAI

export OPENAI_API_KEY="sk-..."
from langchain_openai.chat_models import ChatOpenAI

llm = ChatOpenAI(
    model="gpt-4o",
)

AWS Bedrock

export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_SESSION_TOKEN="..."
from langchain_aws.chat_models import ChatBedrock

llm = ChatBedrock(
    model="anthropic.claude-3-opus-20240229-v1:0",
)