Commit Graph

13 Commits (6ffa0acf32772c38d7725a6448d247d8094fa79e)

Author SHA1 Message Date
Bagatur baa3c975cb
anthropic[patch]: allow tool call mutation (#22130)
If tool_use blocks and tool_calls with overlapping IDs are present,
prefer the values of the tool_calls. Allows for mutating AIMessages just
via tool_calls.
4 months ago
ccurme fbfed65fb1
core, partners: add token usage attribute to AIMessage (#21944)
```python
class UsageMetadata(TypedDict):
    """Usage metadata for a message, such as token counts.

    Attributes:
        input_tokens: (int) count of input (or prompt) tokens
        output_tokens: (int) count of output (or completion) tokens
        total_tokens: (int) total token count
    """

    input_tokens: int
    output_tokens: int
    total_tokens: int
```
```python
class AIMessage(BaseMessage):
    ...
    usage_metadata: Optional[UsageMetadata] = None
    """If provided, token usage information associated with the message."""
    ...
```
4 months ago
Bagatur 6416d16d39
anthropic[patch]: Release 0.1.13, tool_choice support (#21773) 4 months ago
aditya thomas b868c78a12
partners[anthropic]: update unit test for key passed in from the environment (#21290)
**Description:** Update unit test for ChatAnthropic
**Issue:** Test for key passed in from the environment should not have
the key initialized in the constructor
**Dependencies:** None
5 months ago
aditya thomas 8b59bddc03
anthropic[patch]: add tests for secret_str for api key (#20986)
**Description:** Add tests to check API keys are masked
**Issue:** Resolves
https://github.com/langchain-ai/langchain/issues/12165 for Anthropic
models
**Dependencies:** None
5 months ago
Bagatur 54e9271504
anthropic[patch]: fix msg mutation (#20572) 5 months ago
Bagatur 96d8769eae
anthropic[patch]: release 0.1.9, use tool calls if content is empty (#20535) 5 months ago
Bagatur a27d88f12a
anthropic[patch]: standardize init args (#20161)
Related to #20085
6 months ago
Bagatur 209de0a561
anthropic[minor]: tool use (#20016) 6 months ago
Bagatur b15c7fdde6
anthropic[patch]: fix response metadata type (#19683) 6 months ago
Erick Friis 3b5bdbfee8
anthropic[minor]: package move (#17974) 7 months ago
Bagatur 5c2538b9f7
anthropic[patch]: allow pop by field name (#16544)
allow `ChatAnthropicMessages(model=...)`
8 months ago
Erick Friis 8a3360edf6
anthropic: beta messages integration (#14928) 9 months ago