File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 99import anthropic
1010import openai
1111from huggingface_hub import InferenceClient
12- from openai import AzureOpenAI , OpenAI
12+ from openai import NOT_GIVEN , AzureOpenAI , OpenAI
1313
1414import agentlab .llm .tracking as tracking
1515from agentlab .llm .base_api import AbstractChatModel , BaseModelArgs
@@ -348,6 +348,8 @@ def __init__(
348348 min_retry_wait_time = 60 ,
349349 log_probs = False ,
350350 ):
351+ if max_tokens is None :
352+ max_tokens = NOT_GIVEN
351353 super ().__init__ (
352354 model_name = model_name ,
353355 api_key = api_key ,
@@ -482,13 +484,11 @@ def __init__(
482484 temperature = 0.5 ,
483485 max_tokens = 100 ,
484486 max_retry = 4 ,
485- log_probs = False ,
486487 ):
487488 self .model_name = model_name
488489 self .temperature = temperature
489490 self .max_tokens = max_tokens
490491 self .max_retry = max_retry
491- self .log_probs = log_probs
492492
493493 api_key = api_key or os .getenv ("ANTHROPIC_API_KEY" )
494494 self .client = anthropic .Anthropic (api_key = api_key )
@@ -544,5 +544,4 @@ def make_model(self):
544544 model_name = self .model_name ,
545545 temperature = self .temperature ,
546546 max_tokens = self .max_new_tokens ,
547- log_probs = self .log_probs ,
548547 )
Original file line number Diff line number Diff line change 11from agentlab .llm .chat_api import (
2+ AnthropicModelArgs ,
23 AzureModelArgs ,
34 OpenAIModelArgs ,
45 OpenRouterModelArgs ,
56 SelfHostedModelArgs ,
67)
8+ from openai import NOT_GIVEN
79
810default_oss_llms_args = {
911 "n_retry_server" : 4 ,
3840 max_new_tokens = 100_000 ,
3941 vision_support = False ,
4042 ),
43+ "openai/o3-2025-04-16" : OpenAIModelArgs (
44+ model_name = "o3-2025-04-16" ,
45+ max_total_tokens = 200_000 ,
46+ max_input_tokens = 200_000 ,
47+ max_new_tokens = None ,
48+ temperature = 1 ,
49+ vision_support = True ,
50+ ),
4151 "openai/gpt-4o-mini-2024-07-18" : OpenAIModelArgs (
4252 model_name = "gpt-4o-mini-2024-07-18" ,
4353 max_total_tokens = 128_000 ,
115125 max_new_tokens = 16_384 ,
116126 vision_support = True ,
117127 ),
128+ # ---------------- Anthropic ----------------#
129+ "anthropic/claude-3-7-sonnet-20250219" : AnthropicModelArgs (
130+ model_name = "claude-3-7-sonnet-20250219" ,
131+ max_new_tokens = 16_384 ,
132+ temperature = 1e-1 ,
133+ ),
134+ "anthropic/claude-sonnet-4-20250514" : AnthropicModelArgs (
135+ model_name = "claude-sonnet-4-20250514" ,
136+ max_new_tokens = 16_384 ,
137+ temperature = 1e-1 ,
138+ ),
118139 # ---------------- OSS LLMs ----------------#
119140 "meta-llama/Meta-Llama-3-70B-Instruct" : SelfHostedModelArgs (
120141 model_name = "meta-llama/Meta-Llama-3-70B-Instruct" ,
You can’t perform that action at this time.
0 commit comments