Commit Graph

8 Commits (e08879147b17e45fc3ecaf1387a3c43b2534b173)

Author SHA1 Message Date
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
ccurme 01a3228d8e
standard tests: add test for few-shot examples (#21019) 4 months ago
ccurme 2d77e5e3a1
(standard tests): add test for basic conversation sequence (#21213) 5 months ago
Erick Friis ddc2274aea
standard-tests: split tool calling test (#20803)
just making it a bit easier to grok
5 months ago
ccurme 2238490069
mistral, openai: allow anthropic-style messages in message histories (#20565) 5 months ago
ccurme a892f985d3
standardized-tests[patch]: test tool call messages (#20519)
Co-authored-by: Bagatur <baskaryan@gmail.com>
5 months ago
Erick Friis 77eba10f47
standard-tests: fix default fixtures (#20520) 5 months ago
Erick Friis 855ba46f80
standard-tests: a standard unit and integration test set (#20182)
just chat models for now
6 months ago