Working with Bedrock in Pixeltable

Pixeltable's Bedrock integration enables you to access AWS Bedrock foundation models directly from your tables.

Providers · Notebook · Updated

Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.

What it uses

Install
terminal
pip install pixeltable
Environment variables it names
BEDROCK_API_KEY
Pixeltable calls
bedrock.converse()pxt.create_table()add_computed_column()insert()

A look at the code

working-with-bedrock.ipynb
from pixeltable.functions import bedrock
# Create a table in Pixeltable and add a computed column that calls Bedrock
t = pxt.create_table('bedrock_demo/chat', {'input': pxt.String})
t.add_computed_column(
output=bedrock.converse(
model_id='amazon.nova-pro-v1:0',
messages=[{'role': 'user', 'content': [{'text': t.input}]}],
)
)

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103