Skip to content

bedrock-knowledge-base

Knowledge Bases for Amazon Bedrock.

Create a Knowledge Bases for Bedrock instance

Refer to this document: Create a knowledge base

Model Configuration

{
  "region": "<your-region>",
  "summaryModel": "claude-3-sonnet",
  "knowledgeBaseId": "<your-kb-id>"
}
  • knowledgeBaseId: the knowledge base id.
  • summaryModel: support claude-3-sonnet, claude-3-haiku or claude-3-opus

API Calls

You can use normal api invoke, the Bedrock connector will pop last message to chat with the knowledge base.

POST /v1/chat/completions
Content-Type: application/json
Authorization: Bearer br_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

{
  "model": "your-custom-model-name",
  "messages": [
    {
      "role": "user",
      "content": "how to protect s3 data?"
    }
  ]
}

Use BRClient

kb ui