Skip to content

Anthropic

Anthropic

Bases: BaseLLM

Anthropic LLM node.

This class provides an implementation for the Anthropic Language Model node.

Attributes:

Name Type Description
connection Anthropic | None

The connection to use for the Anthropic LLM.

Source code in dynamiq/nodes/llms/anthropic.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Anthropic(BaseLLM):
    """Anthropic LLM node.

    This class provides an implementation for the Anthropic Language Model node.

    Attributes:
        connection (AnthropicConnection | None): The connection to use for the Anthropic LLM.
    """
    connection: AnthropicConnection | None = None

    def __init__(self, **kwargs):
        """Initialize the Anthropic LLM node.

        Args:
            **kwargs: Additional keyword arguments.
        """
        if kwargs.get("client") is None and kwargs.get("connection") is None:
            kwargs["connection"] = AnthropicConnection()
        super().__init__(**kwargs)

__init__(**kwargs)

Initialize the Anthropic LLM node.

Parameters:

Name Type Description Default
**kwargs

Additional keyword arguments.

{}
Source code in dynamiq/nodes/llms/anthropic.py
15
16
17
18
19
20
21
22
23
def __init__(self, **kwargs):
    """Initialize the Anthropic LLM node.

    Args:
        **kwargs: Additional keyword arguments.
    """
    if kwargs.get("client") is None and kwargs.get("connection") is None:
        kwargs["connection"] = AnthropicConnection()
    super().__init__(**kwargs)