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. |
cache_control |
AnthropicCacheControl | None
|
The cache control configuration. |
Source code in dynamiq/nodes/llms/anthropic.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
__init__(**kwargs)
Initialize the Anthropic LLM node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs |
Additional keyword arguments. |
{}
|
Source code in dynamiq/nodes/llms/anthropic.py
32 33 34 35 36 37 38 39 40 | |
get_messages(prompt, input_data)
Format messages and convert non-image files to Anthropic file content format.
Source code in dynamiq/nodes/llms/anthropic.py
70 71 72 73 74 75 | |
update_completion_params(params)
Attach Anthropic prompt caching configuration to completion params.
Source code in dynamiq/nodes/llms/anthropic.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
AnthropicCacheControl
Bases: BaseModel
Anthropic prompt caching configuration.
Source code in dynamiq/nodes/llms/anthropic.py
11 12 13 14 15 16 | |