Skip to content

Commit e3d5ae5

Browse files
Add Amazon bedrock doc (#116)
Co-authored-by: Mendon Kissling <[email protected]>
1 parent 285f860 commit e3d5ae5

File tree

17 files changed

+232
-55
lines changed

17 files changed

+232
-55
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
* [OpenAI](configuration-resources/large-language-models-llms/open-ai-configuration.md)
5959
* [Hugging Face](configuration-resources/large-language-models-llms/hugging-face-configuration.md)
6060
* [Google Vertex AI](configuration-resources/large-language-models-llms/vertex-configuration.md)
61+
* [Amazon Bedrock](configuration-resources/large-language-models-llms/bedrock-configuration.md)
6162
* [Data storage](configuration-resources/data-storage/README.md)
6263
* [Astra](configuration-resources/data-storage/astra.md)
6364
* [Cassandra](configuration-resources/data-storage/cassandra.md)

building-applications/build-a-sample-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pipeline:
9898
completion-field: "value"
9999
messages:
100100
- role: user
101-
content: "What can you tell me about {{% value}} ?"
101+
content: "What can you tell me about {{ value}} ?"
102102
```
103103
104104
{% hint style="info" %}
@@ -196,7 +196,7 @@ application:
196196
configuration:
197197
completion-field: "value"
198198
messages:
199-
- content: "What can you tell me about {{% value}} ?"
199+
- content: "What can you tell me about {{ value}} ?"
200200
role: "user"
201201
model: "gpt-35-turbo"
202202
resources:

building-applications/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pipeline:
2626
configuration:
2727
model: "text-embedding-ada-002"
2828
embeddings-field: "value.question_embeddings"
29-
text: "{{% value.question }}"
29+
text: "{{ value.question }}"
3030
```
3131

3232
Source agents do not have configurable error handling.

building-applications/pipelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pipeline:
2121
completion-field: "value"
2222
messages:
2323
- role: user
24-
content: "What can you tell me about {{% value}} ?"
24+
content: "What can you tell me about {{ value}} ?"
2525
```
2626
2727
## Pipeline configuration

configuration-resources/large-language-models-llms/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ layout:
1414

1515
# Large Language Models (LLMs)
1616

17-
<table data-view="cards"><thead><tr><th></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>open-ai-configuration</td><td></td><td></td><td><a href="open-ai-configuration.md">open-ai-configuration.md</a></td></tr><tr><td>hugging-face-configuration</td><td></td><td></td><td><a href="hugging-face-configuration.md">hugging-face-configuration.md</a></td></tr><tr><td>vertex-configuration</td><td></td><td></td><td><a href="vertex-configuration.md">vertex-configuration.md</a></td></tr></tbody></table>
17+
* [OpenAI](open-ai-configuration.md)
18+
* [Hugging Face](hugging-face-configuration.md)
19+
* [Google Vertex AI](vertex-configuration.md)
20+
* [Amazon Bedrock](bedrock-configuration.md)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# open-ai-configuration
2+
3+
The resource `bedrock-configuration` configures access to the Amazon Bedrock models for embeddings and completions.
4+
5+
`configuration.yaml`
6+
```yaml
7+
configuration:
8+
resources:
9+
- type: "bedrock-configuration"
10+
name: "Bedrock"
11+
configuration:
12+
access-key: "${secrets.bedrock.access-key}"
13+
secret-key: "${secrets.bedrock.secret-key}"
14+
region: "${secrets.bedrock.region}"
15+
```
16+
17+
`secrets.yaml`
18+
```yaml
19+
secrets:
20+
- id: bedrock
21+
data:
22+
access-key: "${BEDROCK_ACCESS_KEY}"
23+
secret-key: "${BEDROCK_SECRET_KEY}"
24+
region: "${BEDROCK_REGION}"
25+
```
26+
27+
28+
## Configuration
29+
30+
Check out the full configuration properties in the [API Reference page](../../building-applications/api-reference/resources.md#bedrock-configuration).

configuration-resources/large-language-models-llms/hugging-face-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ secrets:
2020
data:
2121
access-key: "${HF_ACCESS_KEY}"
2222
```
23-
### API Reference
23+
## Configuration
2424

25-
<table><thead><tr><th width="158.33333333333331">Label</th><th width="139">Type</th><th>Description</th></tr></thead><tbody><tr><td>access-key</td><td><br></td><td><p>Your hugging face token. </p></td></tr><tr><td>inference-url</td><td><br></td><td><p>Hugging face inference url.</p><p></p><p>Default value is <code>https://api-inference.huggingface.co</code></p></td></tr></tbody></table>
25+
Check out the full configuration properties in the [API Reference page](../../building-applications/api-reference/resources.md#hugging-face-configuration).

configuration-resources/large-language-models-llms/open-ai-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ secrets:
4545
access-key: "${AZURE_ACCESS_KEY}"
4646
```
4747

48+
## Configuration
4849

49-
## API reference
50-
<table><thead><tr><th width="158.33333333333331">Labele</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td>url</td><td>string</td><td><p><b>Only for Azure OpenAI provider</b>Base url for the OpenAI api. </p><p></p><p>Example: https://COMPANY.openai.azure.com</p></td></tr><tr><td>access-key</td><td>string</td><td><p>Your OpenAI key</p><p></p></td></tr><tr><td>provider</td><td>string</td><td><p>OpenAI provider type. Supported values are:</p><ul><li>“openai” (default)</li><li>“azure”</li></ul></td></tr></tbody></table>
50+
Check out the full configuration properties in the [API Reference page](../../building-applications/api-reference/resources.md#open-ai-configuration).

configuration-resources/large-language-models-llms/vertex-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ secrets:
3333
For authenticating it's suggested to use the service account JSON since tokens are normally generated with a short TTL.
3434

3535

36-
## API Reference
36+
## Configuration
3737

38-
<table><thead><tr><th width="229.33333333333331">Label</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td>url</td><td><br>String</td><td><p>URL connection for the Vertex API.</p></td></tr><tr><td>serviceAccountJson</td><td><br>String</td><td><p>Specify a custom service account. Refer to the <a href="https://cloud.google.com/iam/docs/keys-create-delete">GCP documentation</a> on how to download it</p></td></tr><tr><td>token</td><td><br>String</td><td><p>Access key for the Vertex API. You can generate a short-life token with <code>gcloud auth print-access-token</code>.</p></td></tr><tr><td>region</td><td>String<br></td><td><p>GCP region for the Vertex API. </p></td></tr><tr><td>project</td><td>String<br></td><td>GCP project name for the Vertex API.</td></tr></tbody></table>
38+
Check out the full configuration properties in the [API Reference page](../../building-applications/api-reference/resources.md#vertex-configuration).

patterns/rag-pattern.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pipeline:
3636
configuration:
3737
model: "${secrets.open-ai.embeddings-model}" # This needs to match the name of the model deployment, not the base model
3838
embeddings-field: "value.question_embeddings"
39-
text: "{{% value.question }}"
39+
text: "{{ value.question }}"
4040
flush-interval: 0
4141
- name: "lookup-related-documents"
4242
type: "query-vector-db"
@@ -90,11 +90,11 @@ pipeline:
9090
Do not provide information that is not related to the LangStream project.
9191
9292
Documents:
93-
{{%# value.related_documents}}
94-
{{% text}}
95-
{{%/ value.related_documents}}
93+
{{# value.related_documents}}
94+
{{ text}}
95+
{{/ value.related_documents}}
9696
- role: user
97-
content: "{{% value.question}}"
97+
content: "{{ value.question}}"
9898
```
9999
100100
### What’s next?

0 commit comments

Comments
 (0)