INNER CODE UNIT · Python

create_bedrock_llm

aws-samples/rag-using-langchain-amazon-bedrock-and-opensearch · ask-bedrock-with-rag.py:55

def create_bedrock_llm(bedrock_client, model_version_id):
    bedrock_llm = BedrockChat(
        model_id=model_version_id, 
        client=bedrock_client,
        model_kwargs={'temperature': 0}
        )
    return bedrock_llm
    

def main():
    logger.info("Starting...")
    args, _ = parse_args()
    region = args.region
    index_name = args.index
    bedrock_model_id = args.bedrock_model_id
    bedrock_embedding_model_id = args.bedrock_embedding_model_id
    question = args.ask
    tenant_id = args.tenant_id

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…