mirror of https://github.com/aliasrobotics/cai.git
LLM AS A JUDGE - works for anthropic
This commit is contained in:
parent
27a09c576e
commit
f6cc6e1283
|
|
@ -29,7 +29,7 @@ ctf_task_planner = Agent(
|
|||
model= os.getenv('CAI_MODEL', "qwen2.5:14b"),
|
||||
openai_client=AsyncOpenAI(),
|
||||
),
|
||||
tools =[]
|
||||
tools=[]
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -53,6 +53,7 @@ ctf_plan_evaluator = Agent[None](
|
|||
model= os.getenv('CAI_MODEL', "qwen2.5:14b"),
|
||||
openai_client=AsyncOpenAI(),
|
||||
),
|
||||
tools=[],
|
||||
output_type=EvaluationFeedback,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -973,6 +973,10 @@ class OpenAIChatCompletionsModel(Model):
|
|||
# Only remove tool_choice if model starts with "gpt" and has no tools
|
||||
if self.model.startswith("gpt") and not converted_tools:
|
||||
kwargs.pop("tool_choice", None)
|
||||
|
||||
# TODO: review this. Remove tool_choice for Anthropic/Claude models when no tools are provided
|
||||
if ("claude" in str(self.model).lower() or "anthropic" in str(self.model).lower()) and not converted_tools:
|
||||
kwargs.pop("tool_choice", None)
|
||||
|
||||
# Model adjustments
|
||||
if any(x in self.model for x in ["claude"]):
|
||||
|
|
|
|||
Loading…
Reference in New Issue