Message utilities for anthropic ai model integration and logging utilities.
Name | Type | Description |
---|---|---|
_logger | Logger | The Maxim logger instance for tracking interactions. |
Name | Type | Description |
---|---|---|
client | Anthropic | The Anthropic client instance. |
logger | Logger | The Maxim logger instance for tracking and |
Name | Description |
---|---|
*args | Variable length argument list passed to the parent create method. |
**kwargs | Arbitrary keyword arguments passed to the parent create method. |
Name | Description |
---|---|
Any | The response from the Anthropic API create method. |
Name | Description |
---|---|
*args | Variable length argument list passed to the parent stream method. |
**kwargs | Arbitrary keyword arguments passed to the parent stream method. |
Name | Description |
---|---|
[StreamWrapper](/sdk/python/references/logger/anthropic/stream_manager) | A wrapped stream manager that processes chunks and |
Name | Type | Description | |||
---|---|---|---|---|---|
max_tokens | int | The maximum number of tokens to generate. | |||
messages | Iterable[MessageParam] | The conversation messages. | |||
model | str | The model to use for generation. | |||
metadata | _MetadataParam | NotGiven_ | Additional metadata for the request. | ||
stop_sequences | _List[str] | NotGiven_ | Sequences that will stop generation. | ||
system | _Union[str, Iterable[TextBlockParam]] | NotGiven_ | System message. | ||
temperature | _float | NotGiven_ | Sampling temperature (0-1). | ||
tool_choice | _dict | NotGiven_ | How the model should use tools. | ||
tools | _Iterable[ToolParam] | NotGiven_ | Available tools for the model. | ||
top_k | _int | NotGiven_ | Top-k sampling parameter. | ||
top_p | _float | NotGiven_ | Top-p (nucleus) sampling parameter. | ||
extra_headers | _Headers | None_ | Additional HTTP headers. | ||
extra_query | _Query | None_ | Additional query parameters. | ||
extra_body | _Body | None_ | Additional request body data. | ||
timeout | _float | httpx.Timeout | None | NotGiven_ | Request timeout. |
**kwargs | Additional arguments, including ‘stream’ for streaming mode. |
Name | Description |
---|---|
Any | Either a direct message response or a StreamWrapper for streaming. |
Name | Description |
---|---|
*args | Variable length argument list passed to create_stream. |
**kwargs | Arbitrary keyword arguments passed to create_stream. |
Name | Description |
---|---|
[StreamWrapper](/sdk/python/references/logger/anthropic/stream_manager) | A wrapped stream manager with logging capabilities. |