anthropic_factory
Module for creating an Anthropic factory.
AnthropicFactory
Bases: ClientFactory
An Anthropic factory.
Source code in spark_instructor/factory/anthropic_factory.py
format_completion(completion)
Format an Anthropic Message
as an OpenAI ChatCompletion
.
format_messages(messages, ignore_system=False)
Format messages so that images serialize properly.
Source code in spark_instructor/factory/anthropic_factory.py
from_config(mode=None, base_url=None, api_key=None, **kwargs)
classmethod
Get an anthropic client.