.ipynb
.pdf
Bedrock
 Contents 
Using in a conversation chain
Bedrock#
Amazon Bedrock is a fully managed service that makes FMs from leading AI startups and Amazon available via an API, so you can choose from a wide range of FMs to find the model that is best suited for your use case
%pip install boto3
from langchain.llms.bedrock import Bedrock
llm = Bedrock(credentials_profile_name="bedrock-admin", model_id="amazon.titan-tg1-large")
Using in a conversation chain#
from langchain.chains import ConversationChain
from langchain.memory import ConversationBufferMemory
conversation = ConversationChain(
    llm=llm,
    verbose=True,
    memory=ConversationBufferMemory()
)
conversation.predict(input="Hi there!")
previous
Beam
next
CerebriumAI
 Contents
  
Using in a conversation chain
By Harrison Chase
    
      © Copyright 2023, Harrison Chase.
      
  Last updated on Jun 16, 2023.
rtdocs_stable/api.python.langchain.com/en/stable/modules/models/llms/integrations/bedrock.html