Skip to content

Commit 91de571

Browse files
committed
cleaned up docstrings for model adapters
1 parent ad5e67e commit 91de571

3 files changed

Lines changed: 7 additions & 40 deletions

File tree

maseval/interface/inference/anthropic.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,14 @@ class AnthropicModelAdapter(ModelAdapter):
5858
"""Adapter for Anthropic Claude models.
5959
6060
Works with Claude models through the official Anthropic Python SDK.
61-
62-
Supported models include:
63-
- claude-sonnet-4-5-20250514 (Claude Sonnet 4.5)
64-
- claude-opus-4-5-20251101 (Claude Opus 4.5)
65-
- claude-3-5-sonnet-20241022
66-
- claude-3-opus-20240229
67-
- And other Claude model variants
61+
Pass any model ID supported by the Anthropic API.
6862
6963
The adapter accepts OpenAI-style messages and converts them to Anthropic's
7064
format internally. Key differences handled automatically:
71-
- System messages are passed separately (not in messages array)
72-
- Tool definitions are converted to Anthropic format
73-
- Tool responses are converted to tool_result content blocks
7465
75-
API keys can be set via ANTHROPIC_API_KEY environment variable or
76-
passed to the Anthropic client directly.
66+
- System messages are passed separately (not in messages array)
67+
- Tool definitions are converted to Anthropic format
68+
- Tool responses are converted to tool_result content blocks
7769
"""
7870

7971
def __init__(

maseval/interface/inference/google_genai.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ class GoogleGenAIModelAdapter(ModelAdapter):
5353
"""Adapter for Google Generative AI (Gemini models).
5454
5555
Works with Google's Gemini models through the google-genai SDK.
56-
57-
Supported models include:
58-
- gemini-2.0-flash
59-
- gemini-1.5-pro
60-
- gemini-1.5-flash
61-
- And other Gemini model variants
56+
Pass any model ID supported by the Google GenAI API.
6257
6358
The adapter converts OpenAI-style messages to Google's format internally,
6459
so you can use the same message format across all adapters.
@@ -119,24 +114,10 @@ def _chat_impl(
119114
system_instruction, contents = self._convert_messages(messages)
120115

121116
# Build config
122-
config_params = {}
117+
config_params = dict(params)
123118
if system_instruction:
124119
config_params["system_instruction"] = system_instruction
125120

126-
# Map common parameter names
127-
if "max_tokens" in params:
128-
config_params["max_output_tokens"] = params.pop("max_tokens")
129-
if "max_output_tokens" in params:
130-
config_params["max_output_tokens"] = params.pop("max_output_tokens")
131-
if "temperature" in params:
132-
config_params["temperature"] = params.pop("temperature")
133-
if "top_p" in params:
134-
config_params["top_p"] = params.pop("top_p")
135-
if "top_k" in params:
136-
config_params["top_k"] = params.pop("top_k")
137-
if "stop_sequences" in params:
138-
config_params["stop_sequences"] = params.pop("stop_sequences")
139-
140121
# Convert tools to Google format
141122
if tools:
142123
config_params["tools"] = self._convert_tools(tools)

maseval/interface/inference/litellm.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,7 @@ class LiteLLMModelAdapter(ModelAdapter):
5353
(OpenAI, Anthropic, Cohere, Azure, AWS Bedrock, Google, etc.) using
5454
OpenAI-compatible syntax.
5555
56-
Supported providers include:
57-
- OpenAI: "gpt-4", "gpt-3.5-turbo"
58-
- Anthropic: "claude-3-opus-20240229", "claude-3-sonnet-20240229"
59-
- Azure: "azure/gpt-4", "azure/gpt-35-turbo"
60-
- AWS Bedrock: "bedrock/anthropic.claude-v2"
61-
- Google: "gemini/gemini-pro"
62-
- And many more (see https://docs.litellm.ai/docs/providers)
56+
For supported providers see https://docs.litellm.ai/docs/providers.
6357
6458
API keys are read from environment variables by default:
6559
- OPENAI_API_KEY for OpenAI

0 commit comments

Comments
 (0)