Skip to content

[FEATURE] Add AWS Bedrock LLM Support #1162

@djakish

Description

@djakish

What is the use case?
The ability to use the Bedrock for LLM parsing.
Describe the solution you'd like
Something like this

cocoindex.LlmSpec(
    api_type=cocoindex.LlmApiType.BEDROCK,
    model="us.anthropic.claude-3-5-haiku-20241022-v1:0",
)

Additional context
Bedrock now has API keys, maybe it can work like Anthropic code does.
https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys
From the article:

curl -X POST "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-haiku-20241022-v1:0/converse" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -d '{
    "messages": [
        {
            "role": "user",
            "content": [{"text": "Hello"}]
        }
    ]
  }'

❤️ Contributors, please refer to 📙Contributing Guide.
Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it or Can I work on this issue? to avoid duplicating work. Our Discord server is always open and friendly.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions