pip install anthropic and configure your Anthropic credentials, as described in the Working with Anthropic tutorial.
View source on GitHub
func invoke_tools()
tools._invoke().
udf messages()
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(Json | None): Additional keyword args for the AnthropicmessagesAPI. For details on the available parameters, see: https://docs.anthropic.com/en/api/messagestools(Json | None): An optional list of Pixeltable tools to use for the request.tool_choice(Json | None): 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: