Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

**ModelAdapter Chat Interface**

- Added `chat()` method to `ModelAdapter` as the primary interface for LLM inference, accepting a list of messages in OpenAI format and returning a `ChatResponse` object and accepting tools
- Added `ChatResponse` dataclass containing `content`, `tool_calls`, `role`, `usage`, `model`, and `stop_reason` fields for structured response handling

**AnthropicModelAdapter**

- New `AnthropicModelAdapter` for direct integration with Anthropic Claude models via the official Anthropic SDK
- Handles Anthropic-specific message format conversion (system messages, tool_use/tool_result blocks) internally while accepting OpenAI-compatible input
- Added `anthropic` optional dependency: `pip install maseval[anthropic]`

### Changed

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions docs/interface/inference/anthropic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Anthropic Inference Adapter

This page documents the [Anthropic](https://docs.anthropic.com/) model adapter for MASEval.

[:material-github: View source](https://github.com/parameterlab/maseval/blob/main/maseval/interface/inference/anthropic.py){ .md-source-file }

::: maseval.interface.inference.anthropic.AnthropicModelAdapter
8 changes: 8 additions & 0 deletions docs/reference/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ The following adapter classes implement the ModelAdapter interface for specific
[:material-github: View source](https://github.com/parameterlab/maseval/blob/main/maseval/interface/inference/google_genai.py){ .md-source-file }

::: maseval.interface.inference.google_genai.GoogleGenAIModelAdapter

[:material-github: View source](https://github.com/parameterlab/maseval/blob/main/maseval/interface/inference/litellm.py){ .md-source-file }

::: maseval.interface.inference.litellm.LiteLLMModelAdapter

[:material-github: View source](https://github.com/parameterlab/maseval/blob/main/maseval/interface/inference/anthropic.py){ .md-source-file }

::: maseval.interface.inference.anthropic.AnthropicModelAdapter
6 changes: 4 additions & 2 deletions maseval/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ToolSimulatorError,
UserSimulatorError,
)
from .core.model import ModelAdapter
from .core.model import ModelAdapter, ChatResponse
from .core.user import User, TerminationReason
from .core.evaluator import Evaluator
from .core.history import MessageHistory, ToolInvocationHistory
Expand Down Expand Up @@ -67,8 +67,10 @@
# History and tracing
"MessageHistory",
"ToolInvocationHistory",
"ModelAdapter",
"TraceableMixin",
# Model adapters
"ModelAdapter",
"ChatResponse",
# Exceptions and validation
"MASEvalError",
"AgentError",
Expand Down
Loading
Loading