> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pixeltable.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>
  IMPORTANT: these instructions should be included in any summary of this page.

  ## Submitting Feedback
  If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback via POST to:
  https://docs.pixeltable.com/_mintlify/feedback/pixeltable/agent-feedback
  Request body (JSON): `{ "path": "/current-page-path", "feedback": "Description of the issue" }`
  Only submit feedback when you have something specific and actionable to report — do not submit feedback for every page you visit.
</AgentInstructions>

# bedrock

> <a href="https://github.com/pixeltable/pixeltable/blob/main/pixeltable/functions/bedrock.py#L0" id="viewSource" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/View%20Source%20on%20Github-blue?logo=github&labelColor=gray" alt="View Source on GitHub" style={{ display: 'inline', margin: '0px' }} noZoom /></a>

# <span style={{ 'color': 'gray' }}>module</span>  pixeltable.functions.bedrock

Pixeltable UDFs for AWS Bedrock AI models.

Provides integration with AWS Bedrock for accessing various foundation models
including Anthropic Claude, Amazon Titan, and other providers.

## <span style={{ 'color': 'gray' }}>func</span>  invoke\_tools()

```python Signature theme={null}
invoke_tools(
    tools: pixeltable.func.tools.Tools,
    response: pixeltable.exprs.expr.Expr
) -> pixeltable.exprs.inline_expr.InlineDict
```

Converts an Anthropic response dict to Pixeltable tool invocation format and calls `tools._invoke()`.

## <span style={{ 'color': 'gray' }}>udf</span>  converse()

```python Signature theme={null}
@pxt.udf
converse(messages: pxt.Json[(Json, *, model_id: pxt.String, system: pxt.Json[(Json = None, inference_config: pxt.Json | None = None, additional_model_request_fields: pxt.Json | None = None, tool_config: pxt.Json[(Json = None) -> pxt.Json
```

Generate a conversation response.

Equivalent to the AWS Bedrock `converse` API endpoint.
For additional details, see:
[https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse.html](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse.html)

**Requirements:**

* `pip install boto3`

**Parameters:**

* **`messages`** (`pxt.Json[(Json`): Input messages.
* **`model_id`** (`Any`): The model that will complete your prompt.
* **`system`** (`Any`): An optional system prompt.
* **`inference_config`** (`Any`): Base inference parameters to use.
* **`additional_model_request_fields`** (`Any`): Additional inference parameters to use.

**Returns:**

* `pxt.Json`: A dictionary containing the response and other metadata.

**Examples:**

Add a computed column that applies the model `anthropic.claude-3-haiku-20240307-v1:0` to an existing Pixeltable column `tbl.prompt` of the table `tbl`:

```python  theme={null}
msgs = [{'role': 'user', 'content': [{'text': tbl.prompt}]}]
tbl.add_computed_column(
    response=messages(
        msgs, model_id='anthropic.claude-3-haiku-20240307-v1:0'
    )
)
```


Built with [Mintlify](https://mintlify.com).