Skip to content

Commit 1bbeba7

Browse files
authored
LLM integration guide (#47)
* inital llm integration guide * fix link
1 parent b6cce7d commit 1bbeba7

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

llm-docs.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Embabel LLM Integration Guide
2+
3+
This guide describes how to integrate Embabel with different LLM providers; by default Embabel runs with OpenAI
4+
but you can configure other providers.
5+
6+
Embabel uses Spring AI and you can find detailed documentation [here](https://docs.spring.io/spring-ai/reference/api/index.html).
7+
8+
# Amazon Bedrock
9+
10+
To run this project with Amazon Bedrock, you need to configure the following:
11+
12+
## Prerequisites
13+
14+
- AWS account with appropriate permissions
15+
- AWS CLI installed and configured with your credentials
16+
17+
## 1. Amazon Bedrock Console Setup
18+
19+
1. Go to AWS Console -> Amazon Bedrock Console
20+
2. Navigate to **Configure and Learn****Model Access**
21+
3. Click **Modify Model Access**
22+
4. Enable **Claude 3.5 Sonnet**
23+
24+
## 2. Add Dependency
25+
26+
Add the following dependency to your `pom.xml`:
27+
28+
```xml
29+
<dependency>
30+
<groupId>com.embabel.agent</groupId>
31+
<artifactId>embabel-agent-starter-bedrock</artifactId>
32+
<version>${embabel-agent.version}</version>
33+
</dependency>
34+
```
35+
36+
## 3. Environment Variables
37+
38+
Set these environment variables to any value:
39+
40+
```bash
41+
export ANTHROPIC_API_KEY=null
42+
export OPENAI_API_KEY=null
43+
```
44+
45+
## 4. Application Configuration
46+
47+
Add the following to your `application.properties`:
48+
49+
```properties
50+
embabel.models.default-llm=us.anthropic.claude-3-5-sonnet-20240620-v1:0
51+
embabel.agent.platform.ranking.llm=us.anthropic.claude-3-5-sonnet-20240620-v1:0
52+
spring.ai.bedrock.anthropic.chat.inference-profile-id=us.anthropic.claude-3-5-sonnet-20240620-v1:0
53+
spring.profiles.active=starwars,bedrock
54+
```
55+
56+
## 5. Run the Project
57+
58+
After configuration, run the project using:
59+
60+
```bash
61+
./scripts/shell.sh
62+
```
63+
64+
## Additional Links
65+
66+
Spring AI and Amazon Bedrock [documentation]([https://docs.spring.io/spring-ai/reference/api/bedrock.html])
67+

0 commit comments

Comments
 (0)