pip install anthropic and configure your Anthropic credentials, as described in the Working with Anthropic tutorial.
View source on GitHub
Functions
invoke_tools()
Converts an Anthropic response dict to Pixeltable tool invocation format and calls tools._invoke().
Signature:
UDFs
messages() udf
Create a Message.
Equivalent to the Anthropic messages API endpoint. For additional details, see: https://docs.anthropic.com/en/api/messages
Request throttling: Uses the rate limit-related headers returned by the API to throttle requests adaptively, based on available request and token capacity. No configuration is necessary.
Requirements:
pip install anthropic
messages(Json): Input messages.model(String): The model that will complete your prompt.model_kwargs(Optional[Json]): Additional keyword args for the AnthropicmessagesAPI. For details on the available parameters, see: https://docs.anthropic.com/en/api/messagestools(Optional[Json]): An optional list of Pixeltable tools to use for the request.tool_choice(Optional[Json]): An optional tool choice configuration.
- Json: A dictionary containing the response and other metadata.
claude-3-5-sonnet-20241022 to an existing Pixeltable column tbl.prompt of the table tbl: