mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-22 15:28:30 +00:00
Compare commits
1 Commits
fix/consol
...
lg-update-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccd98cc511 |
@@ -1,6 +1,6 @@
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Any, Callable, Dict, List, Literal, Optional, Sequence, Tuple, Type, Union
|
from typing import Any, Dict, List, Literal, Optional, Sequence, Type, Union
|
||||||
|
|
||||||
from pydantic import Field, InstanceOf, PrivateAttr, model_validator
|
from pydantic import Field, InstanceOf, PrivateAttr, model_validator
|
||||||
|
|
||||||
@@ -155,13 +155,6 @@ class Agent(BaseAgent):
|
|||||||
default=None,
|
default=None,
|
||||||
description="The Agent's role to be used from your repository.",
|
description="The Agent's role to be used from your repository.",
|
||||||
)
|
)
|
||||||
guardrail: Optional[Union[Callable[[Any], Tuple[bool, Any]], str]] = Field(
|
|
||||||
default=None,
|
|
||||||
description="Function or string description of a guardrail to validate agent output"
|
|
||||||
)
|
|
||||||
guardrail_max_retries: int = Field(
|
|
||||||
default=3, description="Maximum number of retries when guardrail fails"
|
|
||||||
)
|
|
||||||
|
|
||||||
@model_validator(mode="before")
|
@model_validator(mode="before")
|
||||||
def validate_from_repository(cls, v):
|
def validate_from_repository(cls, v):
|
||||||
@@ -787,8 +780,6 @@ class Agent(BaseAgent):
|
|||||||
response_format=response_format,
|
response_format=response_format,
|
||||||
i18n=self.i18n,
|
i18n=self.i18n,
|
||||||
original_agent=self,
|
original_agent=self,
|
||||||
guardrail=self.guardrail,
|
|
||||||
guardrail_max_retries=self.guardrail_max_retries,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return lite_agent.kickoff(messages)
|
return lite_agent.kickoff(messages)
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ from crewai.utilities import I18N
|
|||||||
from crewai.utilities.converter import ConverterError
|
from crewai.utilities.converter import ConverterError
|
||||||
from crewai.utilities.evaluators.task_evaluator import TaskEvaluator
|
from crewai.utilities.evaluators.task_evaluator import TaskEvaluator
|
||||||
from crewai.utilities.printer import Printer
|
from crewai.utilities.printer import Printer
|
||||||
from crewai.utilities.events.event_listener import event_listener
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||||
@@ -126,9 +125,6 @@ class CrewAgentExecutorMixin:
|
|||||||
|
|
||||||
def _ask_human_input(self, final_answer: str) -> str:
|
def _ask_human_input(self, final_answer: str) -> str:
|
||||||
"""Prompt human input with mode-appropriate messaging."""
|
"""Prompt human input with mode-appropriate messaging."""
|
||||||
event_listener.formatter.pause_live_updates()
|
|
||||||
|
|
||||||
try:
|
|
||||||
self._printer.print(
|
self._printer.print(
|
||||||
content=f"\033[1m\033[95m ## Final Result:\033[00m \033[92m{final_answer}\033[00m"
|
content=f"\033[1m\033[95m ## Final Result:\033[00m \033[92m{final_answer}\033[00m"
|
||||||
)
|
)
|
||||||
@@ -159,5 +155,3 @@ class CrewAgentExecutorMixin:
|
|||||||
if response.strip() != "":
|
if response.strip() != "":
|
||||||
self._printer.print(content="\nProcessing your feedback...", color="cyan")
|
self._printer.print(content="\nProcessing your feedback...", color="cyan")
|
||||||
return response
|
return response
|
||||||
finally:
|
|
||||||
event_listener.formatter.resume_live_updates()
|
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import inspect
|
|
||||||
import uuid
|
import uuid
|
||||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, cast, get_args, get_origin
|
from datetime import datetime
|
||||||
|
from typing import Any, Callable, Dict, List, Optional, Type, Union, cast
|
||||||
|
|
||||||
try:
|
from pydantic import BaseModel, Field, InstanceOf, PrivateAttr, model_validator
|
||||||
from typing import Self
|
|
||||||
except ImportError:
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, InstanceOf, PrivateAttr, model_validator, field_validator
|
|
||||||
|
|
||||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||||
from crewai.agents.agent_builder.utilities.base_token_process import TokenProcess
|
from crewai.agents.agent_builder.utilities.base_token_process import TokenProcess
|
||||||
@@ -23,7 +18,6 @@ from crewai.llm import LLM
|
|||||||
from crewai.tools.base_tool import BaseTool
|
from crewai.tools.base_tool import BaseTool
|
||||||
from crewai.tools.structured_tool import CrewStructuredTool
|
from crewai.tools.structured_tool import CrewStructuredTool
|
||||||
from crewai.utilities import I18N
|
from crewai.utilities import I18N
|
||||||
from crewai.utilities.guardrail import process_guardrail
|
|
||||||
from crewai.utilities.agent_utils import (
|
from crewai.utilities.agent_utils import (
|
||||||
enforce_rpm_limit,
|
enforce_rpm_limit,
|
||||||
format_message_for_llm,
|
format_message_for_llm,
|
||||||
@@ -41,7 +35,7 @@ from crewai.utilities.agent_utils import (
|
|||||||
render_text_description_and_args,
|
render_text_description_and_args,
|
||||||
show_agent_logs,
|
show_agent_logs,
|
||||||
)
|
)
|
||||||
from crewai.utilities.converter import generate_model_description
|
from crewai.utilities.converter import convert_to_model, generate_model_description
|
||||||
from crewai.utilities.events.agent_events import (
|
from crewai.utilities.events.agent_events import (
|
||||||
LiteAgentExecutionCompletedEvent,
|
LiteAgentExecutionCompletedEvent,
|
||||||
LiteAgentExecutionErrorEvent,
|
LiteAgentExecutionErrorEvent,
|
||||||
@@ -152,15 +146,6 @@ class LiteAgent(FlowTrackable, BaseModel):
|
|||||||
default=[], description="Callbacks to be used for the agent"
|
default=[], description="Callbacks to be used for the agent"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Guardrail Properties
|
|
||||||
guardrail: Optional[Union[Callable[[LiteAgentOutput], Tuple[bool, Any]], str]] = Field(
|
|
||||||
default=None,
|
|
||||||
description="Function or string description of a guardrail to validate agent output"
|
|
||||||
)
|
|
||||||
guardrail_max_retries: int = Field(
|
|
||||||
default=3, description="Maximum number of retries when guardrail fails"
|
|
||||||
)
|
|
||||||
|
|
||||||
# State and Results
|
# State and Results
|
||||||
tools_results: List[Dict[str, Any]] = Field(
|
tools_results: List[Dict[str, Any]] = Field(
|
||||||
default=[], description="Results of the tools used by the agent."
|
default=[], description="Results of the tools used by the agent."
|
||||||
@@ -178,9 +163,6 @@ class LiteAgent(FlowTrackable, BaseModel):
|
|||||||
_messages: List[Dict[str, str]] = PrivateAttr(default_factory=list)
|
_messages: List[Dict[str, str]] = PrivateAttr(default_factory=list)
|
||||||
_iterations: int = PrivateAttr(default=0)
|
_iterations: int = PrivateAttr(default=0)
|
||||||
_printer: Printer = PrivateAttr(default_factory=Printer)
|
_printer: Printer = PrivateAttr(default_factory=Printer)
|
||||||
_guardrail: Optional[Callable] = PrivateAttr(default=None)
|
|
||||||
_guardrail_retry_count: int = PrivateAttr(default=0)
|
|
||||||
|
|
||||||
|
|
||||||
@model_validator(mode="after")
|
@model_validator(mode="after")
|
||||||
def setup_llm(self):
|
def setup_llm(self):
|
||||||
@@ -202,60 +184,6 @@ class LiteAgent(FlowTrackable, BaseModel):
|
|||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@model_validator(mode="after")
|
|
||||||
def ensure_guardrail_is_callable(self) -> Self:
|
|
||||||
if callable(self.guardrail):
|
|
||||||
self._guardrail = self.guardrail
|
|
||||||
elif isinstance(self.guardrail, str):
|
|
||||||
from crewai.tasks.llm_guardrail import LLMGuardrail
|
|
||||||
assert isinstance(self.llm, LLM)
|
|
||||||
|
|
||||||
self._guardrail = LLMGuardrail(
|
|
||||||
description=self.guardrail, llm=self.llm
|
|
||||||
)
|
|
||||||
|
|
||||||
return self
|
|
||||||
|
|
||||||
@field_validator("guardrail", mode="before")
|
|
||||||
@classmethod
|
|
||||||
def validate_guardrail_function(cls, v: Optional[Union[Callable, str]]) -> Optional[Union[Callable, str]]:
|
|
||||||
"""Validate that the guardrail function has the correct signature.
|
|
||||||
|
|
||||||
If v is a callable, validate that it has the correct signature.
|
|
||||||
If v is a string, return it as is.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
v: The guardrail function to validate or a string describing the guardrail task
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
The validated guardrail function or a string describing the guardrail task
|
|
||||||
"""
|
|
||||||
if v is None or isinstance(v, str):
|
|
||||||
return v
|
|
||||||
|
|
||||||
# Check function signature
|
|
||||||
sig = inspect.signature(v)
|
|
||||||
if len(sig.parameters) != 1:
|
|
||||||
raise ValueError(
|
|
||||||
f"Guardrail function must accept exactly 1 parameter (LiteAgentOutput), "
|
|
||||||
f"but it accepts {len(sig.parameters)}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Check return annotation if present
|
|
||||||
if sig.return_annotation is not sig.empty:
|
|
||||||
if sig.return_annotation == Tuple[bool, Any]:
|
|
||||||
return v
|
|
||||||
|
|
||||||
origin = get_origin(sig.return_annotation)
|
|
||||||
args = get_args(sig.return_annotation)
|
|
||||||
|
|
||||||
if origin is not tuple or len(args) != 2 or args[0] is not bool:
|
|
||||||
raise ValueError(
|
|
||||||
"If return type is annotated, it must be Tuple[bool, Any]"
|
|
||||||
)
|
|
||||||
|
|
||||||
return v
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def key(self) -> str:
|
def key(self) -> str:
|
||||||
"""Get the unique key for this agent instance."""
|
"""Get the unique key for this agent instance."""
|
||||||
@@ -295,32 +223,13 @@ class LiteAgent(FlowTrackable, BaseModel):
|
|||||||
# Format messages for the LLM
|
# Format messages for the LLM
|
||||||
self._messages = self._format_messages(messages)
|
self._messages = self._format_messages(messages)
|
||||||
|
|
||||||
return self._execute_core(agent_info=agent_info)
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
self._printer.print(
|
|
||||||
content="Agent failed to reach a final answer. This is likely a bug - please report it.",
|
|
||||||
color="red",
|
|
||||||
)
|
|
||||||
handle_unknown_error(self._printer, e)
|
|
||||||
# Emit error event
|
|
||||||
crewai_event_bus.emit(
|
|
||||||
self,
|
|
||||||
event=LiteAgentExecutionErrorEvent(
|
|
||||||
agent_info=agent_info,
|
|
||||||
error=str(e),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
raise e
|
|
||||||
|
|
||||||
def _execute_core(self, agent_info: Dict[str, Any]) -> LiteAgentOutput:
|
|
||||||
# Emit event for agent execution start
|
# Emit event for agent execution start
|
||||||
crewai_event_bus.emit(
|
crewai_event_bus.emit(
|
||||||
self,
|
self,
|
||||||
event=LiteAgentExecutionStartedEvent(
|
event=LiteAgentExecutionStartedEvent(
|
||||||
agent_info=agent_info,
|
agent_info=agent_info,
|
||||||
tools=self._parsed_tools,
|
tools=self._parsed_tools,
|
||||||
messages=self._messages,
|
messages=messages,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -352,44 +261,6 @@ class LiteAgent(FlowTrackable, BaseModel):
|
|||||||
usage_metrics=usage_metrics.model_dump() if usage_metrics else None,
|
usage_metrics=usage_metrics.model_dump() if usage_metrics else None,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Process guardrail if set
|
|
||||||
if self._guardrail is not None:
|
|
||||||
guardrail_result = process_guardrail(
|
|
||||||
output=output,
|
|
||||||
guardrail=self._guardrail,
|
|
||||||
retry_count=self._guardrail_retry_count
|
|
||||||
)
|
|
||||||
|
|
||||||
if not guardrail_result.success:
|
|
||||||
if self._guardrail_retry_count >= self.guardrail_max_retries:
|
|
||||||
raise Exception(
|
|
||||||
f"Agent's guardrail failed validation after {self.guardrail_max_retries} retries. "
|
|
||||||
f"Last error: {guardrail_result.error}"
|
|
||||||
)
|
|
||||||
self._guardrail_retry_count += 1
|
|
||||||
if self.verbose:
|
|
||||||
self._printer.print(
|
|
||||||
f"Guardrail failed. Retrying ({self._guardrail_retry_count}/{self.guardrail_max_retries})..."
|
|
||||||
f"\n{guardrail_result.error}"
|
|
||||||
)
|
|
||||||
|
|
||||||
self._messages.append({
|
|
||||||
"role": "user",
|
|
||||||
"content": guardrail_result.error or "Guardrail validation failed"
|
|
||||||
})
|
|
||||||
|
|
||||||
return self._execute_core(agent_info=agent_info)
|
|
||||||
|
|
||||||
# Apply guardrail result if available
|
|
||||||
if guardrail_result.result is not None:
|
|
||||||
if isinstance(guardrail_result.result, str):
|
|
||||||
output.raw = guardrail_result.result
|
|
||||||
elif isinstance(guardrail_result.result, BaseModel):
|
|
||||||
output.pydantic = guardrail_result.result
|
|
||||||
|
|
||||||
usage_metrics = self._token_process.get_summary()
|
|
||||||
output.usage_metrics = usage_metrics.model_dump() if usage_metrics else None
|
|
||||||
|
|
||||||
# Emit completion event
|
# Emit completion event
|
||||||
crewai_event_bus.emit(
|
crewai_event_bus.emit(
|
||||||
self,
|
self,
|
||||||
@@ -401,6 +272,22 @@ class LiteAgent(FlowTrackable, BaseModel):
|
|||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
self._printer.print(
|
||||||
|
content="Agent failed to reach a final answer. This is likely a bug - please report it.",
|
||||||
|
color="red",
|
||||||
|
)
|
||||||
|
handle_unknown_error(self._printer, e)
|
||||||
|
# Emit error event
|
||||||
|
crewai_event_bus.emit(
|
||||||
|
self,
|
||||||
|
event=LiteAgentExecutionErrorEvent(
|
||||||
|
agent_info=agent_info,
|
||||||
|
error=str(e),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
raise e
|
||||||
|
|
||||||
async def kickoff_async(
|
async def kickoff_async(
|
||||||
self, messages: Union[str, List[Dict[str, str]]]
|
self, messages: Union[str, List[Dict[str, str]]]
|
||||||
) -> LiteAgentOutput:
|
) -> LiteAgentOutput:
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ from pydantic_core import PydanticCustomError
|
|||||||
|
|
||||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||||
from crewai.security import Fingerprint, SecurityConfig
|
from crewai.security import Fingerprint, SecurityConfig
|
||||||
|
from crewai.tasks.guardrail_result import GuardrailResult
|
||||||
from crewai.tasks.output_format import OutputFormat
|
from crewai.tasks.output_format import OutputFormat
|
||||||
from crewai.tasks.task_output import TaskOutput
|
from crewai.tasks.task_output import TaskOutput
|
||||||
from crewai.tools.base_tool import BaseTool
|
from crewai.tools.base_tool import BaseTool
|
||||||
from crewai.utilities.config import process_config
|
from crewai.utilities.config import process_config
|
||||||
from crewai.utilities.constants import NOT_SPECIFIED
|
from crewai.utilities.constants import NOT_SPECIFIED
|
||||||
from crewai.utilities.guardrail import process_guardrail, GuardrailResult
|
|
||||||
from crewai.utilities.converter import Converter, convert_to_model
|
from crewai.utilities.converter import Converter, convert_to_model
|
||||||
from crewai.utilities.events import (
|
from crewai.utilities.events import (
|
||||||
TaskCompletedEvent,
|
TaskCompletedEvent,
|
||||||
@@ -431,11 +431,7 @@ class Task(BaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if self._guardrail:
|
if self._guardrail:
|
||||||
guardrail_result = process_guardrail(
|
guardrail_result = self._process_guardrail(task_output)
|
||||||
output=task_output,
|
|
||||||
guardrail=self._guardrail,
|
|
||||||
retry_count=self.retry_count
|
|
||||||
)
|
|
||||||
if not guardrail_result.success:
|
if not guardrail_result.success:
|
||||||
if self.retry_count >= self.max_retries:
|
if self.retry_count >= self.max_retries:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
from typing import Any, Callable, Optional, Tuple, Union
|
"""
|
||||||
|
Module for handling task guardrail validation results.
|
||||||
|
|
||||||
|
This module provides the GuardrailResult class which standardizes
|
||||||
|
the way task guardrails return their validation results.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from typing import Any, Optional, Tuple, Union
|
||||||
|
|
||||||
from pydantic import BaseModel, field_validator
|
from pydantic import BaseModel, field_validator
|
||||||
|
|
||||||
|
|
||||||
class GuardrailResult(BaseModel):
|
class GuardrailResult(BaseModel):
|
||||||
"""Result from a task guardrail execution.
|
"""Result from a task guardrail execution.
|
||||||
|
|
||||||
@@ -46,48 +54,3 @@ class GuardrailResult(BaseModel):
|
|||||||
result=data if success else None,
|
result=data if success else None,
|
||||||
error=data if not success else None
|
error=data if not success else None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def process_guardrail(output: Any, guardrail: Callable, retry_count: int) -> GuardrailResult:
|
|
||||||
"""Process the guardrail for the agent output.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
output: The output to validate with the guardrail
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
GuardrailResult: The result of the guardrail validation
|
|
||||||
"""
|
|
||||||
from crewai.task import TaskOutput
|
|
||||||
from crewai.lite_agent import LiteAgentOutput
|
|
||||||
|
|
||||||
assert isinstance(output, TaskOutput) or isinstance(output, LiteAgentOutput), "Output must be a TaskOutput or LiteAgentOutput"
|
|
||||||
|
|
||||||
assert guardrail is not None
|
|
||||||
|
|
||||||
from crewai.utilities.events import (
|
|
||||||
LLMGuardrailCompletedEvent,
|
|
||||||
LLMGuardrailStartedEvent,
|
|
||||||
)
|
|
||||||
from crewai.utilities.events.crewai_event_bus import crewai_event_bus
|
|
||||||
|
|
||||||
crewai_event_bus.emit(
|
|
||||||
None,
|
|
||||||
LLMGuardrailStartedEvent(
|
|
||||||
guardrail=guardrail, retry_count=retry_count
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
result = guardrail(output)
|
|
||||||
guardrail_result = GuardrailResult.from_tuple(result)
|
|
||||||
|
|
||||||
crewai_event_bus.emit(
|
|
||||||
None,
|
|
||||||
LLMGuardrailCompletedEvent(
|
|
||||||
success=guardrail_result.success,
|
|
||||||
result=guardrail_result.result,
|
|
||||||
error=guardrail_result.error,
|
|
||||||
retry_count=retry_count,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
return guardrail_result
|
|
||||||
@@ -8,7 +8,7 @@ import platform
|
|||||||
import warnings
|
import warnings
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from importlib.metadata import version
|
from importlib.metadata import version
|
||||||
from typing import TYPE_CHECKING, Any, Callable, Optional
|
from typing import TYPE_CHECKING, Any, Optional
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from opentelemetry import trace
|
from opentelemetry import trace
|
||||||
@@ -73,16 +73,11 @@ class Telemetry:
|
|||||||
with cls._lock:
|
with cls._lock:
|
||||||
if cls._instance is None:
|
if cls._instance is None:
|
||||||
cls._instance = super(Telemetry, cls).__new__(cls)
|
cls._instance = super(Telemetry, cls).__new__(cls)
|
||||||
cls._instance._initialized = False
|
|
||||||
return cls._instance
|
return cls._instance
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
if hasattr(self, '_initialized') and self._initialized:
|
|
||||||
return
|
|
||||||
|
|
||||||
self.ready: bool = False
|
self.ready: bool = False
|
||||||
self.trace_set: bool = False
|
self.trace_set: bool = False
|
||||||
self._initialized: bool = True
|
|
||||||
|
|
||||||
if self._is_telemetry_disabled():
|
if self._is_telemetry_disabled():
|
||||||
return
|
return
|
||||||
@@ -118,10 +113,6 @@ class Telemetry:
|
|||||||
or os.getenv("CREWAI_DISABLE_TELEMETRY", "false").lower() == "true"
|
or os.getenv("CREWAI_DISABLE_TELEMETRY", "false").lower() == "true"
|
||||||
)
|
)
|
||||||
|
|
||||||
def _should_execute_telemetry(self) -> bool:
|
|
||||||
"""Check if telemetry operations should be executed."""
|
|
||||||
return self.ready and not self._is_telemetry_disabled()
|
|
||||||
|
|
||||||
def set_tracer(self):
|
def set_tracer(self):
|
||||||
if self.ready and not self.trace_set:
|
if self.ready and not self.trace_set:
|
||||||
try:
|
try:
|
||||||
@@ -132,9 +123,8 @@ class Telemetry:
|
|||||||
self.ready = False
|
self.ready = False
|
||||||
self.trace_set = False
|
self.trace_set = False
|
||||||
|
|
||||||
def _safe_telemetry_operation(self, operation: Callable[[], None]) -> None:
|
def _safe_telemetry_operation(self, operation):
|
||||||
"""Execute telemetry operation safely, checking both readiness and environment variables."""
|
if not self.ready:
|
||||||
if not self._should_execute_telemetry():
|
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
operation()
|
operation()
|
||||||
@@ -433,8 +423,7 @@ class Telemetry:
|
|||||||
|
|
||||||
return span
|
return span
|
||||||
|
|
||||||
self._safe_telemetry_operation(operation)
|
return self._safe_telemetry_operation(operation)
|
||||||
return None
|
|
||||||
|
|
||||||
def task_ended(self, span: Span, task: Task, crew: Crew):
|
def task_ended(self, span: Span, task: Task, crew: Crew):
|
||||||
"""Records the completion of a task execution in a crew.
|
"""Records the completion of a task execution in a crew.
|
||||||
@@ -784,8 +773,7 @@ class Telemetry:
|
|||||||
return span
|
return span
|
||||||
|
|
||||||
if crew.share_crew:
|
if crew.share_crew:
|
||||||
self._safe_telemetry_operation(operation)
|
return self._safe_telemetry_operation(operation)
|
||||||
return operation()
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def end_crew(self, crew, final_string_output):
|
def end_crew(self, crew, final_string_output):
|
||||||
|
|||||||
@@ -326,14 +326,10 @@ class EventListener(BaseEventListener):
|
|||||||
|
|
||||||
@crewai_event_bus.on(LLMCallStartedEvent)
|
@crewai_event_bus.on(LLMCallStartedEvent)
|
||||||
def on_llm_call_started(source, event: LLMCallStartedEvent):
|
def on_llm_call_started(source, event: LLMCallStartedEvent):
|
||||||
# Capture the returned tool branch and update the current_tool_branch reference
|
self.formatter.handle_llm_call_started(
|
||||||
thinking_branch = self.formatter.handle_llm_call_started(
|
|
||||||
self.formatter.current_agent_branch,
|
self.formatter.current_agent_branch,
|
||||||
self.formatter.current_crew_tree,
|
self.formatter.current_crew_tree,
|
||||||
)
|
)
|
||||||
# Update the formatter's current_tool_branch to ensure proper cleanup
|
|
||||||
if thinking_branch is not None:
|
|
||||||
self.formatter.current_tool_branch = thinking_branch
|
|
||||||
|
|
||||||
@crewai_event_bus.on(LLMCallCompletedEvent)
|
@crewai_event_bus.on(LLMCallCompletedEvent)
|
||||||
def on_llm_call_completed(source, event: LLMCallCompletedEvent):
|
def on_llm_call_completed(source, event: LLMCallCompletedEvent):
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ class ConsoleFormatter:
|
|||||||
current_lite_agent_branch: Optional[Tree] = None
|
current_lite_agent_branch: Optional[Tree] = None
|
||||||
tool_usage_counts: Dict[str, int] = {}
|
tool_usage_counts: Dict[str, int] = {}
|
||||||
current_reasoning_branch: Optional[Tree] = None # Track reasoning status
|
current_reasoning_branch: Optional[Tree] = None # Track reasoning status
|
||||||
_live_paused: bool = False
|
|
||||||
current_llm_tool_tree: Optional[Tree] = None
|
current_llm_tool_tree: Optional[Tree] = None
|
||||||
|
|
||||||
def __init__(self, verbose: bool = False):
|
def __init__(self, verbose: bool = False):
|
||||||
@@ -120,19 +119,6 @@ class ConsoleFormatter:
|
|||||||
# Finally, pass through to the regular Console.print implementation
|
# Finally, pass through to the regular Console.print implementation
|
||||||
self.console.print(*args, **kwargs)
|
self.console.print(*args, **kwargs)
|
||||||
|
|
||||||
def pause_live_updates(self) -> None:
|
|
||||||
"""Pause Live session updates to allow for human input without interference."""
|
|
||||||
if not self._live_paused:
|
|
||||||
if self._live:
|
|
||||||
self._live.stop()
|
|
||||||
self._live = None
|
|
||||||
self._live_paused = True
|
|
||||||
|
|
||||||
def resume_live_updates(self) -> None:
|
|
||||||
"""Resume Live session updates after human input is complete."""
|
|
||||||
if self._live_paused:
|
|
||||||
self._live_paused = False
|
|
||||||
|
|
||||||
def print_panel(
|
def print_panel(
|
||||||
self, content: Text, title: str, style: str = "blue", is_flow: bool = False
|
self, content: Text, title: str, style: str = "blue", is_flow: bool = False
|
||||||
) -> None:
|
) -> None:
|
||||||
@@ -625,22 +611,14 @@ class ConsoleFormatter:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
# Only add thinking status if we don't have a current tool branch
|
# Only add thinking status if we don't have a current tool branch
|
||||||
# or if the current tool branch is not a thinking node
|
if self.current_tool_branch is None:
|
||||||
should_add_thinking = (
|
|
||||||
self.current_tool_branch is None or
|
|
||||||
"Thinking" not in str(self.current_tool_branch.label)
|
|
||||||
)
|
|
||||||
|
|
||||||
if should_add_thinking:
|
|
||||||
tool_branch = branch_to_use.add("")
|
tool_branch = branch_to_use.add("")
|
||||||
self.update_tree_label(tool_branch, "🧠", "Thinking...", "blue")
|
self.update_tree_label(tool_branch, "🧠", "Thinking...", "blue")
|
||||||
self.current_tool_branch = tool_branch
|
self.current_tool_branch = tool_branch
|
||||||
self.print(tree_to_use)
|
self.print(tree_to_use)
|
||||||
self.print()
|
self.print()
|
||||||
return tool_branch
|
return tool_branch
|
||||||
|
return None
|
||||||
# Return the existing tool branch if it's already a thinking node
|
|
||||||
return self.current_tool_branch
|
|
||||||
|
|
||||||
def handle_llm_call_completed(
|
def handle_llm_call_completed(
|
||||||
self,
|
self,
|
||||||
@@ -649,7 +627,7 @@ class ConsoleFormatter:
|
|||||||
crew_tree: Optional[Tree],
|
crew_tree: Optional[Tree],
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle LLM call completed event."""
|
"""Handle LLM call completed event."""
|
||||||
if not self.verbose:
|
if not self.verbose or tool_branch is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Decide which tree to render: prefer full crew tree, else parent branch
|
# Decide which tree to render: prefer full crew tree, else parent branch
|
||||||
@@ -657,47 +635,23 @@ class ConsoleFormatter:
|
|||||||
if tree_to_use is None:
|
if tree_to_use is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Try to remove the thinking status node - first try the provided tool_branch
|
# Remove the thinking status node when complete
|
||||||
thinking_branch_to_remove = None
|
if "Thinking" in str(tool_branch.label):
|
||||||
|
parents = [
|
||||||
|
self.current_lite_agent_branch,
|
||||||
|
self.current_agent_branch,
|
||||||
|
self.current_task_branch,
|
||||||
|
tree_to_use,
|
||||||
|
]
|
||||||
removed = False
|
removed = False
|
||||||
|
|
||||||
# Method 1: Use the provided tool_branch if it's a thinking node
|
|
||||||
if tool_branch is not None and "Thinking" in str(tool_branch.label):
|
|
||||||
thinking_branch_to_remove = tool_branch
|
|
||||||
|
|
||||||
# Method 2: Fallback - search for any thinking node if tool_branch is None or not thinking
|
|
||||||
if thinking_branch_to_remove is None:
|
|
||||||
parents = [
|
|
||||||
self.current_lite_agent_branch,
|
|
||||||
self.current_agent_branch,
|
|
||||||
self.current_task_branch,
|
|
||||||
tree_to_use,
|
|
||||||
]
|
|
||||||
for parent in parents:
|
for parent in parents:
|
||||||
if isinstance(parent, Tree):
|
if isinstance(parent, Tree) and tool_branch in parent.children:
|
||||||
for child in parent.children:
|
parent.children.remove(tool_branch)
|
||||||
if "Thinking" in str(child.label):
|
|
||||||
thinking_branch_to_remove = child
|
|
||||||
break
|
|
||||||
if thinking_branch_to_remove:
|
|
||||||
break
|
|
||||||
|
|
||||||
# Remove the thinking node if found
|
|
||||||
if thinking_branch_to_remove:
|
|
||||||
parents = [
|
|
||||||
self.current_lite_agent_branch,
|
|
||||||
self.current_agent_branch,
|
|
||||||
self.current_task_branch,
|
|
||||||
tree_to_use,
|
|
||||||
]
|
|
||||||
for parent in parents:
|
|
||||||
if isinstance(parent, Tree) and thinking_branch_to_remove in parent.children:
|
|
||||||
parent.children.remove(thinking_branch_to_remove)
|
|
||||||
removed = True
|
removed = True
|
||||||
break
|
break
|
||||||
|
|
||||||
# Clear pointer if we just removed the current_tool_branch
|
# Clear pointer if we just removed the current_tool_branch
|
||||||
if self.current_tool_branch is thinking_branch_to_remove:
|
if self.current_tool_branch is tool_branch:
|
||||||
self.current_tool_branch = None
|
self.current_tool_branch = None
|
||||||
|
|
||||||
if removed:
|
if removed:
|
||||||
@@ -714,36 +668,9 @@ class ConsoleFormatter:
|
|||||||
# Decide which tree to render: prefer full crew tree, else parent branch
|
# Decide which tree to render: prefer full crew tree, else parent branch
|
||||||
tree_to_use = self.current_crew_tree or crew_tree or self.current_task_branch
|
tree_to_use = self.current_crew_tree or crew_tree or self.current_task_branch
|
||||||
|
|
||||||
# Find the thinking branch to update (similar to completion logic)
|
# Update tool branch if it exists
|
||||||
thinking_branch_to_update = None
|
if tool_branch:
|
||||||
|
tool_branch.label = Text("❌ LLM Failed", style="red bold")
|
||||||
# Method 1: Use the provided tool_branch if it's a thinking node
|
|
||||||
if tool_branch is not None and "Thinking" in str(tool_branch.label):
|
|
||||||
thinking_branch_to_update = tool_branch
|
|
||||||
|
|
||||||
# Method 2: Fallback - search for any thinking node if tool_branch is None or not thinking
|
|
||||||
if thinking_branch_to_update is None:
|
|
||||||
parents = [
|
|
||||||
self.current_lite_agent_branch,
|
|
||||||
self.current_agent_branch,
|
|
||||||
self.current_task_branch,
|
|
||||||
tree_to_use,
|
|
||||||
]
|
|
||||||
for parent in parents:
|
|
||||||
if isinstance(parent, Tree):
|
|
||||||
for child in parent.children:
|
|
||||||
if "Thinking" in str(child.label):
|
|
||||||
thinking_branch_to_update = child
|
|
||||||
break
|
|
||||||
if thinking_branch_to_update:
|
|
||||||
break
|
|
||||||
|
|
||||||
# Update the thinking branch to show failure
|
|
||||||
if thinking_branch_to_update:
|
|
||||||
thinking_branch_to_update.label = Text("❌ LLM Failed", style="red bold")
|
|
||||||
# Clear the current_tool_branch reference
|
|
||||||
if self.current_tool_branch is thinking_branch_to_update:
|
|
||||||
self.current_tool_branch = None
|
|
||||||
if tree_to_use:
|
if tree_to_use:
|
||||||
self.print(tree_to_use)
|
self.print(tree_to_use)
|
||||||
self.print()
|
self.print()
|
||||||
|
|||||||
@@ -1,137 +0,0 @@
|
|||||||
interactions:
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players
|
|
||||||
in the world?"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '694'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
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
|
|
||||||
AMMI9CsaDwAA
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9be627c40f260-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 15:02:05 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Set-Cookie:
|
|
||||||
- __cf_bm=qYkxv9nLxeWAtPBvECxNw8fLnoBHLorJdRI8.xVEVEA-1749567725-1.0.1.1-75sp4gwHGJocK1MFkSgRcB4xJUiCwz31VRD4LAmQGEmfYB0BMQZ5sgWS8e_UMbjCaEhaPNO88q5XdbLOCWA85_rO0vYTb4hp6tmIiaerhsM;
|
|
||||||
path=/; expires=Tue, 10-Jun-25 15:32:05 GMT; domain=.api.openai.com; HttpOnly;
|
|
||||||
Secure; SameSite=None
|
|
||||||
- _cfuvid=HRKCwkyTqSXpCj9_i_T5lDtlr_INA290o0b3k.26oi8-1749567725794-0.0.1.1-604800000;
|
|
||||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '42674'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '42684'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149999859'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_d92e6f33fa5e0fbe43349afee8f55921
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
version: 1
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
interactions:
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 1 best players
|
|
||||||
in the world?"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '693'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
H4sIAAAAAAAAAwAAAP//TFPRbttGEHzPVwz04taQBFt1nFZvsgsnRlvYqI0aafOyPK7IjY97xO1R
|
|
||||||
CpMv6nf0x4qlZLcvBHh3Mzs7s/vtDTCTerbGLLRUQtfHxVUzPF6udsaXHx/Cn7//8fG8e9rf/XxF
|
|
||||||
X+vqaTZ3RKo+cygvqGVIXR+5SNLDdchMhZ31/N3FT28vL99enE0XXao5Oqzpy+IiLTpRWazOVheL
|
|
||||||
s3eL8x+P6DZJYJut8dcbAPg2fV2n1vxltsbENZ10bEYNz9avj4BZTtFPZmQmVkjLbP7fZUhaWCfp
|
|
||||||
j20amrascQtNewRSNLJjEBrXD1LbcwY+6Y0oRWym/zUeW0ZJPfpII2eIorSMfcqxnoMMaYu7UFLF
|
|
||||||
Gauz1Q9ziOFXScoRv7GZLPEkNccRmRvKNdcTSNmBzjRVZyuwFALnY52Jl2JEkY7nBya0ZGipBikk
|
|
||||||
xsFKljQYAmXmjNBSplA4y1euUY3gLyVTyrUo5RH2LDHaHDsxSToHaY2Q1E1jDePSO/+kv/CITWiF
|
|
||||||
d9yxFlv78QKnp9dxqOz0dH2UYj1rmfR39DllKaMLbuVVDRXcXOOKcuCYlObYt5wZLaPiQB1P2BCH
|
|
||||||
6sS8z4X3ichUizawkDLnJT5MzxQlk9qWc+YaJeGeshgeSLQs3nPuSBTf3T+8/97TWZ2tzpcHzbda
|
|
||||||
OCv5pFJ07R+8RI1NbliLKDnZTkJJeXwJ1uG4Tj1h0/3zd5ZAk1PHqxVubm82ePL0cT30cxiHIbtm
|
|
||||||
7z1yQ2H0gAkvddFyTsuji5s95fp/Nnqi+6Tohlikj4wrijEp6pO7DJoez9FK00Zp2vJSxgqVwbxM
|
|
||||||
mfy08jKdTUwVxTgiKYx3nCkihUAeuS094PtIo/M8lDHylO5BiRieNe0V25SnIqIhcy1VZNRZqio6
|
|
||||||
iiqJUsY5+sxBjNH72mlzGKc+pyhbCWgSxYWHKNos8cGd8ZVjz8PnpMm085HxZveGVjpPoiPlYccZ
|
|
||||||
pc2+qyjeNGreshobjKmLbBbHOTp6PrjRgaYx9s13oK9yOkS5FY71chrrW93GgTUcOr7iMWk92ShW
|
|
||||||
JNhxwU4M0vUUXhka8uU7uHEk8CuyXqbMj7t66H5Kpk+5WEdqrfRo6V8AAAD//4xVy24CIRTdz1cQ
|
|
||||||
1m1Tx+nCr+gXGHKFO85NGSDAaF347w2ggtUmXR84931O0hcdLJP5mlC14yNzPfmJQlrB0qkkWWQW
|
|
||||||
VMyhH62fIUVNApUXgWk8oGZH1JqRiTYzzqRe1+8hDRFYEhOY83kWVKEimbcx55mFoLTlM2+IvuoL
|
|
||||||
fuPs0gQxsOMEkVFkM4IJiWmHD9vWaiGLVsHprRVfj+MSIBmAWbRuADDGxpxQlv3tBTnfhF7bvfN2
|
|
||||||
F3595SMZCpPwCMGaJOohWsczeu4Y22ZDWe48gjtvZxdFtF+Yw636vvDx6mMV7TebCxptBF2BoV+9
|
|
||||||
PCEUCiOQDo0ncQlyQlW/VgODRZFtgK4p+zGdZ9yldDL7/9BXQEp0EZVw6aTlfcn1mcfk8389u7U5
|
|
||||||
J8wD+gNJFJHQp1EoHGHRxX15OIWIsxjJ7NE7T8WCRyfWA3wMgJu15N25+wEAAP//AwDdzCHTkAgA
|
|
||||||
AA==
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9a27f5dc000f9-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:42:51 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Set-Cookie:
|
|
||||||
- __cf_bm=7hq1JYlSmmLvjUR7npK1vcLJYOvCPn947S.EYBtvTcQ-1749566571-1.0.1.1-11XCSwdUqYCYC3zE9DZk20c_BHXTPqEi6YMhVtX9dekgrj0J3a4EHGdHvcnhBNkIxYzhM4zzQsetx2sxisMk62ywkO8Tzo3rlYdo__Kov7w;
|
|
||||||
path=/; expires=Tue, 10-Jun-25 15:12:51 GMT; domain=.api.openai.com; HttpOnly;
|
|
||||||
Secure; SameSite=None
|
|
||||||
- _cfuvid=bhxj6kzt6diFCyNbiiw60v4lKiUKaoHjQ3Yc4KWW4OI-1749566571331-0.0.1.1-604800000;
|
|
||||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '30419'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '30424'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149999859'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_b5983a9572e28ded39da7b12e678e2b7
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
version: 1
|
|
||||||
@@ -1,643 +0,0 @@
|
|||||||
interactions:
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players
|
|
||||||
in the world?"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '694'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
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
|
|
||||||
BF+cIJ0em8Hel71fAQAA//8DAICIe4nBDwAA
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9947e9abcf1fe-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:33:27 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Set-Cookie:
|
|
||||||
- __cf_bm=UscrLNUFPQp17ivpT2nYqbIb8GsK9e0GpWC7sIKWwnU-1749566007-1.0.1.1-fCm5jdN02Agxc9.Ep4aAnKukyBp9S3iOLK9NY51NLG1zib3MnfjyCm5HhsWtUvr2lIjQpD_EWosVk4JuLbGxrKYZBa4WTendGsY9lCU9naU;
|
|
||||||
path=/; expires=Tue, 10-Jun-25 15:03:27 GMT; domain=.api.openai.com; HttpOnly;
|
|
||||||
Secure; SameSite=None
|
|
||||||
- _cfuvid=CGbpwQsAGlm5OcWs4NP0JuyqJh.mIqHyUZjIdKm8_.I-1749566007688-0.0.1.1-604800000;
|
|
||||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '40370'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '40375'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149999859'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_94fb13dc93d3bc9714811ff4ede4c08f
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Guardrail Agent. You
|
|
||||||
are a expert at validating the output of a task. By providing effective feedback
|
|
||||||
if the output is not valid.\nYour personal goal is: Validate the output of the
|
|
||||||
task\n\nTo give my best complete final answer to the task respond using the
|
|
||||||
exact following format:\n\nThought: I now can give a great answer\nFinal Answer:
|
|
||||||
Your final answer must be the great and the most complete as possible, it must
|
|
||||||
be outcome described.\n\nI MUST use these formats, my job depends on it!\nIMPORTANT:
|
|
||||||
Your final answer MUST contain all the information requested in the following
|
|
||||||
format: {\n \"valid\": bool,\n \"feedback\": str | None\n}\n\nIMPORTANT: Ensure
|
|
||||||
the final output does not include any code block markers like ```json or ```python."},
|
|
||||||
{"role": "user", "content": "\n Ensure the following task result complies
|
|
||||||
with the given guardrail.\n\n Task result:\n Here are the top
|
|
||||||
10 best soccer players in the world as of October 2023, based on their performance,
|
|
||||||
impact, and overall contributions to the game:\n\n1. **Lionel Messi** (Inter
|
|
||||||
Miami)\n - Position: Forward\n - Country: Argentina\n - Highlights: Messi
|
|
||||||
continues to showcase his exceptional dribbling, vision, and playmaking ability,
|
|
||||||
leading Argentina to victory in the 2022 FIFA World Cup and significantly contributing
|
|
||||||
to his club''s successes.\n\n2. **Kylian Mbapp\u00e9** (Paris Saint-Germain)\n -
|
|
||||||
Position: Forward\n - Country: France\n - Highlights: Known for his blistering
|
|
||||||
speed and clinical finishing, Mbapp\u00e9 is a key player for both PSG and the
|
|
||||||
French national team, known for his performances in Ligue 1 and international
|
|
||||||
tournaments.\n\n3. **Erling Haaland** (Manchester City)\n - Position: Forward\n -
|
|
||||||
Country: Norway\n - Highlights: Haaland''s goal-scoring prowess and strength
|
|
||||||
have made him one of the most feared strikers in Europe, helping Manchester
|
|
||||||
City secure several titles including the UEFA Champions League.\n\n4. **Kevin
|
|
||||||
De Bruyne** (Manchester City)\n - Position: Midfielder\n - Country: Belgium\n -
|
|
||||||
Highlights: De Bruyne\u2019s exceptional passing, control, and vision make him
|
|
||||||
one of the best playmakers in the world, instrumental in Manchester City\u2019s
|
|
||||||
dominance in domestic and European competitions.\n\n5. **Cristiano Ronaldo**
|
|
||||||
(Al Nassr)\n - Position: Forward\n - Country: Portugal\n - Highlights:
|
|
||||||
Despite moving to the Saudi Pro League, Ronaldo''s extraordinary talent and
|
|
||||||
goal-scoring ability keep him in the conversation among the best, having had
|
|
||||||
a legendary career across multiple leagues.\n\n6. **Neymar Jr.** (Al Hilal)\n -
|
|
||||||
Position: Forward\n - Country: Brazil\n - Highlights: Neymar''s agility,
|
|
||||||
creativity, and skill have kept him as a top performer in soccer, now showcasing
|
|
||||||
his talents in the Saudi Pro League while maintaining a strong national team
|
|
||||||
presence.\n\n7. **Robert Lewandowski** (Barcelona)\n - Position: Forward\n -
|
|
||||||
Country: Poland\n - Highlights: The prolific striker continues to score consistently
|
|
||||||
in La Liga, known for his finishing, positioning, and aerial ability, contributing
|
|
||||||
to Barcelona\u2019s successes.\n\n8. **Karim Benzema** (Al Ittihad)\n - Position:
|
|
||||||
Forward\n - Country: France\n - Highlights: The former Real Madrid star
|
|
||||||
remains a top talent, displaying leadership and technical skills, now continuing
|
|
||||||
his career in the Saudi Pro League.\n\n9. **Luka Modri\u0107** (Real Madrid)\n -
|
|
||||||
Position: Midfielder\n - Country: Croatia\n - Highlights: A master of midfield
|
|
||||||
control and passing, Modri\u0107 remains an influential figure at Real Madrid,
|
|
||||||
showcasing his experience and football intelligence.\n\n10. **Mohamed Salah**
|
|
||||||
(Liverpool)\n - Position: Forward\n - Country: Egypt\n - Highlights:
|
|
||||||
Salah''s explosive pace and goal-scoring ability keep him as a central figure
|
|
||||||
for Liverpool in the Premier League and European competitions, maintaining his
|
|
||||||
status as one of the elite forwards.\n\nThese players have demonstrated exceptional
|
|
||||||
skill, consistency, and impact in their respective teams and leagues, solidifying
|
|
||||||
their positions among the best in the world.\n\n Guardrail:\n Only
|
|
||||||
include Brazilian players, both women and men\n \n Your task:\n -
|
|
||||||
Confirm if the Task result complies with the guardrail.\n - If not, provide
|
|
||||||
clear feedback explaining what is wrong (e.g., by how much it violates the rule,
|
|
||||||
or what specific part fails).\n - Focus only on identifying issues \u2014
|
|
||||||
do not propose corrections.\n - If the Task result complies with the
|
|
||||||
guardrail, saying that is valid\n "}], "model": "gpt-4o-mini", "stop":
|
|
||||||
["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '4676'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
cookie:
|
|
||||||
- __cf_bm=UscrLNUFPQp17ivpT2nYqbIb8GsK9e0GpWC7sIKWwnU-1749566007-1.0.1.1-fCm5jdN02Agxc9.Ep4aAnKukyBp9S3iOLK9NY51NLG1zib3MnfjyCm5HhsWtUvr2lIjQpD_EWosVk4JuLbGxrKYZBa4WTendGsY9lCU9naU;
|
|
||||||
_cfuvid=CGbpwQsAGlm5OcWs4NP0JuyqJh.mIqHyUZjIdKm8_.I-1749566007688-0.0.1.1-604800000
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
H4sIAAAAAAAAA4xUwWobMRC9+ysGnVqwjZ3YjuNbQim0hULBtIc6mLE0uzuxVtpqtHbckH8v2o29
|
|
||||||
TpNCLwuapzfzZvRmH3sAio1agNIFRl1WdnCb119+LIvZh+/+h9zM55Op3Wzv5dt4rKei+onhN/ek
|
|
||||||
45E11L6sLEX2roV1IIyUso6vJtfT2Ww0mjdA6Q3ZRMurOJj4QcmOBxeji8lgdDUYz5/ZhWdNohbw
|
|
||||||
swcA8Nh8k05n6EEtYNQ/RkoSwZzU4nQJQAVvU0ShCEtEF1W/A7V3kVwjfVn4Oi/iAj6B83vQ6CDn
|
|
||||||
HQFCnvQDOtlTAFi5j+zQwk1zXsDjygGs1A4tm5VaQIZWqN8GMyKzQb1N8ZVaFgQRZQuBpLYRjCcB
|
|
||||||
5yM0AzvAnmMBsSDIawwmIFtAAY7ATtvakEBl8UBBIAu+hB0G9rWA9rWLgUkAnQHv7AFKcmn8AnHv
|
|
||||||
4Tbgb7aM7kR/95UOJQb4HIYNpz2+h33BloAeUjV2+Rlz70vq+Cl7IHsYwvKFWqlIc8YarT1AoF81
|
|
||||||
SRSI/thAK+6Vnj5sfCyeayQ9Jbl+EqML4HZCWW0ztpbMcKVW7un8CQNltWCykautPQPQOR+xmUMy
|
|
||||||
z90z8nSyi/V5FfxG/qKqjB1LsQ6E4l2yhkRfqQZ96gHcNbasXzhNVcGXVVxHv6Wm3PV01uZT3TZ0
|
|
||||||
6PwIRh/RdvHxaHLRfyPh2lBEtnLmbKVRF2Q6brcGWBv2Z0DvrO3Xct7K3bbOLv+f9B2gNVWRzLoK
|
|
||||||
ZFi/bLm7Fij9Lf517TTmRrASCjvWtI5MIT2FoQxr2+6wkoNEKtcZu5xCFbhd5KxaX05wOkG6vtSq
|
|
||||||
99T7AwAA//8DABZK9w/WBAAA
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9957c4b46f1fe-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:33:46 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '18280'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '18287'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149998889'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_853da6b9ca8f386ff1427c837346290d
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players
|
|
||||||
in the world?"}, {"role": "assistant", "content": "Thought: I now can give a
|
|
||||||
great answer \nFinal Answer: Here are the top 10 best soccer players in the
|
|
||||||
world as of October 2023, based on their performance, impact, and overall contributions
|
|
||||||
to the game:\n\n1. **Lionel Messi** (Inter Miami)\n - Position: Forward\n -
|
|
||||||
Country: Argentina\n - Highlights: Messi continues to showcase his exceptional
|
|
||||||
dribbling, vision, and playmaking ability, leading Argentina to victory in the
|
|
||||||
2022 FIFA World Cup and significantly contributing to his club''s successes.\n\n2.
|
|
||||||
**Kylian Mbapp\u00e9** (Paris Saint-Germain)\n - Position: Forward\n - Country:
|
|
||||||
France\n - Highlights: Known for his blistering speed and clinical finishing,
|
|
||||||
Mbapp\u00e9 is a key player for both PSG and the French national team, known
|
|
||||||
for his performances in Ligue 1 and international tournaments.\n\n3. **Erling
|
|
||||||
Haaland** (Manchester City)\n - Position: Forward\n - Country: Norway\n -
|
|
||||||
Highlights: Haaland''s goal-scoring prowess and strength have made him one of
|
|
||||||
the most feared strikers in Europe, helping Manchester City secure several titles
|
|
||||||
including the UEFA Champions League.\n\n4. **Kevin De Bruyne** (Manchester City)\n -
|
|
||||||
Position: Midfielder\n - Country: Belgium\n - Highlights: De Bruyne\u2019s
|
|
||||||
exceptional passing, control, and vision make him one of the best playmakers
|
|
||||||
in the world, instrumental in Manchester City\u2019s dominance in domestic and
|
|
||||||
European competitions.\n\n5. **Cristiano Ronaldo** (Al Nassr)\n - Position:
|
|
||||||
Forward\n - Country: Portugal\n - Highlights: Despite moving to the Saudi
|
|
||||||
Pro League, Ronaldo''s extraordinary talent and goal-scoring ability keep him
|
|
||||||
in the conversation among the best, having had a legendary career across multiple
|
|
||||||
leagues.\n\n6. **Neymar Jr.** (Al Hilal)\n - Position: Forward\n - Country:
|
|
||||||
Brazil\n - Highlights: Neymar''s agility, creativity, and skill have kept
|
|
||||||
him as a top performer in soccer, now showcasing his talents in the Saudi Pro
|
|
||||||
League while maintaining a strong national team presence.\n\n7. **Robert Lewandowski**
|
|
||||||
(Barcelona)\n - Position: Forward\n - Country: Poland\n - Highlights:
|
|
||||||
The prolific striker continues to score consistently in La Liga, known for his
|
|
||||||
finishing, positioning, and aerial ability, contributing to Barcelona\u2019s
|
|
||||||
successes.\n\n8. **Karim Benzema** (Al Ittihad)\n - Position: Forward\n -
|
|
||||||
Country: France\n - Highlights: The former Real Madrid star remains a top
|
|
||||||
talent, displaying leadership and technical skills, now continuing his career
|
|
||||||
in the Saudi Pro League.\n\n9. **Luka Modri\u0107** (Real Madrid)\n - Position:
|
|
||||||
Midfielder\n - Country: Croatia\n - Highlights: A master of midfield control
|
|
||||||
and passing, Modri\u0107 remains an influential figure at Real Madrid, showcasing
|
|
||||||
his experience and football intelligence.\n\n10. **Mohamed Salah** (Liverpool)\n -
|
|
||||||
Position: Forward\n - Country: Egypt\n - Highlights: Salah''s explosive
|
|
||||||
pace and goal-scoring ability keep him as a central figure for Liverpool in
|
|
||||||
the Premier League and European competitions, maintaining his status as one
|
|
||||||
of the elite forwards.\n\nThese players have demonstrated exceptional skill,
|
|
||||||
consistency, and impact in their respective teams and leagues, solidifying their
|
|
||||||
positions among the best in the world."}, {"role": "user", "content": "The task
|
|
||||||
result does not comply with the guardrail as it includes players from various
|
|
||||||
countries and only mentions two Brazilian players (Neymar Jr. and Neymar) while
|
|
||||||
excluding Brazilian women players entirely. The guardrail specifically requests
|
|
||||||
to include only Brazilian players, both women and men, which is not fulfilled."}],
|
|
||||||
"model": "gpt-4o-mini", "stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '4338'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
cookie:
|
|
||||||
- __cf_bm=UscrLNUFPQp17ivpT2nYqbIb8GsK9e0GpWC7sIKWwnU-1749566007-1.0.1.1-fCm5jdN02Agxc9.Ep4aAnKukyBp9S3iOLK9NY51NLG1zib3MnfjyCm5HhsWtUvr2lIjQpD_EWosVk4JuLbGxrKYZBa4WTendGsY9lCU9naU;
|
|
||||||
_cfuvid=CGbpwQsAGlm5OcWs4NP0JuyqJh.mIqHyUZjIdKm8_.I-1749566007688-0.0.1.1-604800000
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
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
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d995f0ca0cf1fe-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:34:22 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '35941'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '35946'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149998983'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_c874fed664f962f5ee90decb8ebad875
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Guardrail Agent. You
|
|
||||||
are a expert at validating the output of a task. By providing effective feedback
|
|
||||||
if the output is not valid.\nYour personal goal is: Validate the output of the
|
|
||||||
task\n\nTo give my best complete final answer to the task respond using the
|
|
||||||
exact following format:\n\nThought: I now can give a great answer\nFinal Answer:
|
|
||||||
Your final answer must be the great and the most complete as possible, it must
|
|
||||||
be outcome described.\n\nI MUST use these formats, my job depends on it!\nIMPORTANT:
|
|
||||||
Your final answer MUST contain all the information requested in the following
|
|
||||||
format: {\n \"valid\": bool,\n \"feedback\": str | None\n}\n\nIMPORTANT: Ensure
|
|
||||||
the final output does not include any code block markers like ```json or ```python."},
|
|
||||||
{"role": "user", "content": "\n Ensure the following task result complies
|
|
||||||
with the given guardrail.\n\n Task result:\n Here are the top
|
|
||||||
10 best soccer players in the world, focusing exclusively on Brazilian players,
|
|
||||||
both women and men, based on their performance and impact in the game as of
|
|
||||||
October 2023:\n\n1. **Neymar Jr.** \n - Position: Forward \n - Club: Al
|
|
||||||
Hilal \n - Highlights: One of the most skilled forwards globally, Neymar
|
|
||||||
continues to dazzle with his dribbling, playmaking, and goal-scoring ability,
|
|
||||||
having a significant impact on both his club and the Brazilian national team.\n\n2.
|
|
||||||
**Vin\u00edcius J\u00fanior** \n - Position: Forward \n - Club: Real Madrid \n -
|
|
||||||
Highlights: Vin\u00edcius has emerged as a key player for Real Madrid, noted
|
|
||||||
for his speed, technical skills, and crucial goals in important matches, showcasing
|
|
||||||
his talent on both club and international levels.\n\n3. **Richarlison** \n -
|
|
||||||
Position: Forward \n - Club: Tottenham Hotspur \n - Highlights: Known
|
|
||||||
for his versatility and aerial ability, Richarlison has become a vital member
|
|
||||||
of the national team and has the capability to change the game with his pace
|
|
||||||
and scoring ability.\n\n4. **Marta** \n - Position: Forward \n - Club:
|
|
||||||
Orlando Pride \n - Highlights: A true legend of women''s soccer, Marta has
|
|
||||||
consistently showcased her skill, leadership, and goal-scoring prowess, earning
|
|
||||||
numerous awards and accolades throughout her legendary career.\n\n5. **Andressa
|
|
||||||
Alves** \n - Position: Midfielder \n - Club: Roma \n - Highlights:
|
|
||||||
A pivotal player in women''s soccer, Andressa has displayed her exceptional
|
|
||||||
skills and tactical awareness both in club play and for the Brazilian national
|
|
||||||
team.\n\n6. **Alana Santos** \n - Position: Defender \n - Club: Benfica \n -
|
|
||||||
Highlights: Alana is recognized for her defensive prowess and ability to contribute
|
|
||||||
to the attack, establishing herself as a key player for both her club and the
|
|
||||||
national team.\n\n7. **Gabriel Jesus** \n - Position: Forward \n - Club:
|
|
||||||
Arsenal \n - Highlights: With a flair for scoring and assisting, Gabriel
|
|
||||||
Jesus is an essential part of the national team, known for his work rate and
|
|
||||||
intelligence on the field.\n\n8. **Ta\u00eds Ara\u00fajo** \n - Position:
|
|
||||||
Midfielder \n - Club: S\u00e3o Paulo \n - Highlights: A rising star in
|
|
||||||
Brazilian women''s soccer, Ta\u00eds has gained recognition for her strong performances
|
|
||||||
in midfield, showcasing both skill and creativity.\n\n9. **Thiago Silva** \n -
|
|
||||||
Position: Defender \n - Club: Chelsea \n - Highlights: An experienced
|
|
||||||
and reliable center-back, Silva\u2019s leadership and defensive abilities have
|
|
||||||
made him a cornerstone for Chelsea and the Brazilian national team.\n\n10. **Bia
|
|
||||||
Zaneratto** \n - Position: Forward \n - Club: Palmeiras \n - Highlights:
|
|
||||||
A talented forward, Bia has become known for her goal-scoring capabilities and
|
|
||||||
playmaking skills, contributing significantly to both her club and the national
|
|
||||||
team.\n\nThis list highlights the incredible talent and contributions of Brazilian
|
|
||||||
players in soccer, showcasing their skills across both men''s and women''s games,
|
|
||||||
thus representing Brazil''s rich soccer legacy.\n\n Guardrail:\n Only
|
|
||||||
include Brazilian players, both women and men\n \n Your task:\n -
|
|
||||||
Confirm if the Task result complies with the guardrail.\n - If not, provide
|
|
||||||
clear feedback explaining what is wrong (e.g., by how much it violates the rule,
|
|
||||||
or what specific part fails).\n - Focus only on identifying issues \u2014
|
|
||||||
do not propose corrections.\n - If the Task result complies with the
|
|
||||||
guardrail, saying that is valid\n "}], "model": "gpt-4o-mini", "stop":
|
|
||||||
["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '4571'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
cookie:
|
|
||||||
- __cf_bm=UscrLNUFPQp17ivpT2nYqbIb8GsK9e0GpWC7sIKWwnU-1749566007-1.0.1.1-fCm5jdN02Agxc9.Ep4aAnKukyBp9S3iOLK9NY51NLG1zib3MnfjyCm5HhsWtUvr2lIjQpD_EWosVk4JuLbGxrKYZBa4WTendGsY9lCU9naU;
|
|
||||||
_cfuvid=CGbpwQsAGlm5OcWs4NP0JuyqJh.mIqHyUZjIdKm8_.I-1749566007688-0.0.1.1-604800000
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
H4sIAAAAAAAAA4ySTW/bMAyG7/4VhM72kLj5WHxrDwEKtNilGDYshcFItK1WlgRJTjYE+e+D7DR2
|
|
||||||
tw7YxYD58KX4kjwlAEwKVgDjDQbeWpXd1d3Dl+5Yfb3dPD6K7bri26cw899f5vruG0ujwuxfiIc3
|
|
||||||
1SduWqsoSKMHzB1hoFh1vl5slqvVbJX3oDWCVJTVNmQLk7VSyyyf5Ytsts7mny/qxkhOnhXwIwEA
|
|
||||||
OPXf2KcW9JMVMEvfIi15jzWx4poEwJxRMcLQe+kD6sDSEXKjA+m+9afGdHUTCrgHbY7AUUMtDwQI
|
|
||||||
dewfUPsjOYCd3kqNCm77/wJOOw2wYwdUUuxYAcF1lA6xikjskb/GsO6U2unz9HFHVedRXeAEoNYm
|
|
||||||
YBxgb/v5Qs5Xo8rU1pm9/0PKKqmlb0pH6I2OpnwwlvX0nAA89wPt3s2IWWdaG8pgXql/bpMvh3ps
|
|
||||||
3ONI8/UFBhNQTVTLPP2gXikooFR+shLGkTckRum4P+yENBOQTFz/3c1HtQfnUtf/U34EnJMNJErr
|
|
||||||
SEj+3vGY5iie+b/SrlPuG2ae3EFyKoMkFzchqMJODcfH/C8fqC0rqWty1snhAitb3ixwuUDa3HCW
|
|
||||||
nJPfAAAA//8DAOHOvQuPAwAA
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d996d2b877f1fe-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:34:38 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '15341'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '15343'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149998917'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_22419b91d42cf1e03278a29f3093ed3d
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
version: 1
|
|
||||||
@@ -1,726 +0,0 @@
|
|||||||
interactions:
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players
|
|
||||||
in the world?"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '694'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
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
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9b5400dcd624b-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:55:42 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Set-Cookie:
|
|
||||||
- __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU;
|
|
||||||
path=/; expires=Tue, 10-Jun-25 15:25:42 GMT; domain=.api.openai.com; HttpOnly;
|
|
||||||
Secure; SameSite=None
|
|
||||||
- _cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000;
|
|
||||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '33288'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '33292'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149999859'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_6a587ea22edef774ecdada790a320cab
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players
|
|
||||||
in the world?"}, {"role": "assistant", "content": "Thought: I now can give a
|
|
||||||
great answer \nFinal Answer: The top 10 best soccer players in the world, as
|
|
||||||
of October 2023, can be identified based on their recent performances, skills,
|
|
||||||
impact on games, and overall contributions to their teams. Here is the structured
|
|
||||||
list:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements:
|
|
||||||
Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2.
|
|
||||||
**Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup
|
|
||||||
champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland
|
|
||||||
(Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed,
|
|
||||||
goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions
|
|
||||||
League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester
|
|
||||||
City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n -
|
|
||||||
Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League
|
|
||||||
winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements:
|
|
||||||
2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6.
|
|
||||||
**Neymar Jr. (Al Hilal)**\n - Position: Forward\n - Key Attributes: Flair,
|
|
||||||
dribbling, creativity.\n - Achievements: Multiple domestic league titles,
|
|
||||||
Champions League runner-up.\n\n7. **Robert Lewandowski (FC Barcelona)**\n -
|
|
||||||
Position: Forward\n - Key Attributes: Finishing, positioning, aerial ability.\n -
|
|
||||||
Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion
|
|
||||||
(2023).\n\n8. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League
|
|
||||||
champion, FA Cup, UEFA Champions League winner.\n\n9. **Vin\u00edcius J\u00fanior
|
|
||||||
(Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling,
|
|
||||||
creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga
|
|
||||||
champion (2023).\n\n10. **Luka Modri\u0107 (Real Madrid)**\n - Position:
|
|
||||||
Midfielder\n - Key Attributes: Passing, vision, tactical intelligence.\n -
|
|
||||||
Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\nThis
|
|
||||||
list is compiled based on their current form, past performances, and contributions
|
|
||||||
to their respective teams in both domestic and international competitions. Player
|
|
||||||
rankings can vary based on personal opinion and specific criteria used for evaluation,
|
|
||||||
but these players have consistently been regarded as some of the best in the
|
|
||||||
world as of October 2023."}, {"role": "user", "content": "You are not allowed
|
|
||||||
to include Brazilian players"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '3594'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
cookie:
|
|
||||||
- __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU;
|
|
||||||
_cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
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
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9b6782db84d3b-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:56:30 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '31484'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '31490'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149999166'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_aa737cf40bb76af9f458bfd35f7a77a1
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players
|
|
||||||
in the world?"}, {"role": "assistant", "content": "Thought: I now can give a
|
|
||||||
great answer \nFinal Answer: The top 10 best soccer players in the world, as
|
|
||||||
of October 2023, can be identified based on their recent performances, skills,
|
|
||||||
impact on games, and overall contributions to their teams. Here is the structured
|
|
||||||
list:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements:
|
|
||||||
Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2.
|
|
||||||
**Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup
|
|
||||||
champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland
|
|
||||||
(Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed,
|
|
||||||
goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions
|
|
||||||
League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester
|
|
||||||
City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n -
|
|
||||||
Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League
|
|
||||||
winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements:
|
|
||||||
2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6.
|
|
||||||
**Neymar Jr. (Al Hilal)**\n - Position: Forward\n - Key Attributes: Flair,
|
|
||||||
dribbling, creativity.\n - Achievements: Multiple domestic league titles,
|
|
||||||
Champions League runner-up.\n\n7. **Robert Lewandowski (FC Barcelona)**\n -
|
|
||||||
Position: Forward\n - Key Attributes: Finishing, positioning, aerial ability.\n -
|
|
||||||
Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion
|
|
||||||
(2023).\n\n8. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League
|
|
||||||
champion, FA Cup, UEFA Champions League winner.\n\n9. **Vin\u00edcius J\u00fanior
|
|
||||||
(Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling,
|
|
||||||
creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga
|
|
||||||
champion (2023).\n\n10. **Luka Modri\u0107 (Real Madrid)**\n - Position:
|
|
||||||
Midfielder\n - Key Attributes: Passing, vision, tactical intelligence.\n -
|
|
||||||
Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\nThis
|
|
||||||
list is compiled based on their current form, past performances, and contributions
|
|
||||||
to their respective teams in both domestic and international competitions. Player
|
|
||||||
rankings can vary based on personal opinion and specific criteria used for evaluation,
|
|
||||||
but these players have consistently been regarded as some of the best in the
|
|
||||||
world as of October 2023."}, {"role": "user", "content": "You are not allowed
|
|
||||||
to include Brazilian players"}, {"role": "assistant", "content": "Thought: I
|
|
||||||
now can give a great answer \nFinal Answer: Here is an updated list of the
|
|
||||||
top 10 best soccer players in the world as of October 2023, excluding Brazilian
|
|
||||||
players:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements:
|
|
||||||
Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2.
|
|
||||||
**Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup
|
|
||||||
champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland
|
|
||||||
(Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed,
|
|
||||||
goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions
|
|
||||||
League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester
|
|
||||||
City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n -
|
|
||||||
Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League
|
|
||||||
winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements:
|
|
||||||
2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6.
|
|
||||||
**Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes:
|
|
||||||
Finishing, positioning, aerial ability.\n - Achievements: FIFA Best Men''s
|
|
||||||
Player, multiple Bundesliga titles, La Liga champion (2023).\n\n7. **Mohamed
|
|
||||||
Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing,
|
|
||||||
dribbling.\n - Achievements: Premier League champion, FA Cup, UEFA Champions
|
|
||||||
League winner.\n\n8. **Vin\u00edcius J\u00fanior (Real Madrid)**\n - Position:
|
|
||||||
Forward\n - Key Attributes: Speed, dribbling, creativity.\n - Achievements:
|
|
||||||
UEFA Champions League winner (2022), La Liga champion (2023).\n\n9. **Luka Modri\u0107
|
|
||||||
(Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision,
|
|
||||||
tactical intelligence.\n - Achievements: Multiple Champions League titles,
|
|
||||||
Ballon d''Or winner (2018).\n\n10. **Harry Kane (Bayern Munich)**\n - Position:
|
|
||||||
Forward\n - Key Attributes: Goal-scoring, technique, playmaking.\n - Achievements:
|
|
||||||
Golden Boot winner, Premier League titles, UEFA European Championship runner-up.\n\nThis
|
|
||||||
list has been adjusted to exclude Brazilian players and focuses on those who
|
|
||||||
have made significant impacts in their clubs and on the international stage
|
|
||||||
as of October 2023. Each player is recognized for their exceptional skills,
|
|
||||||
performances, and achievements."}, {"role": "user", "content": "You are not
|
|
||||||
allowed to include Brazilian players"}], "model": "gpt-4o-mini", "stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '6337'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
cookie:
|
|
||||||
- __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU;
|
|
||||||
_cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
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
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9b7561f204d3b-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:56:46 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '12189'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '12193'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149998513'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_1098f5a5384f4a26aecf0c9e4e4d1fc0
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
- request:
|
|
||||||
body: '{"messages": [{"role": "system", "content": "You are Sports Analyst. You
|
|
||||||
are an expert at gathering and organizing information. You carefully collect
|
|
||||||
details and present them in a structured way.\nYour personal goal is: Gather
|
|
||||||
information about the best soccer players\n\nTo give my best complete final
|
|
||||||
answer to the task respond using the exact following format:\n\nThought: I now
|
|
||||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
|
||||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
|
||||||
formats, my job depends on it!"}, {"role": "user", "content": "Top 10 best players
|
|
||||||
in the world?"}, {"role": "assistant", "content": "Thought: I now can give a
|
|
||||||
great answer \nFinal Answer: The top 10 best soccer players in the world, as
|
|
||||||
of October 2023, can be identified based on their recent performances, skills,
|
|
||||||
impact on games, and overall contributions to their teams. Here is the structured
|
|
||||||
list:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements:
|
|
||||||
Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2.
|
|
||||||
**Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup
|
|
||||||
champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland
|
|
||||||
(Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed,
|
|
||||||
goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions
|
|
||||||
League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester
|
|
||||||
City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n -
|
|
||||||
Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League
|
|
||||||
winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements:
|
|
||||||
2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6.
|
|
||||||
**Neymar Jr. (Al Hilal)**\n - Position: Forward\n - Key Attributes: Flair,
|
|
||||||
dribbling, creativity.\n - Achievements: Multiple domestic league titles,
|
|
||||||
Champions League runner-up.\n\n7. **Robert Lewandowski (FC Barcelona)**\n -
|
|
||||||
Position: Forward\n - Key Attributes: Finishing, positioning, aerial ability.\n -
|
|
||||||
Achievements: FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion
|
|
||||||
(2023).\n\n8. **Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, finishing, dribbling.\n - Achievements: Premier League
|
|
||||||
champion, FA Cup, UEFA Champions League winner.\n\n9. **Vin\u00edcius J\u00fanior
|
|
||||||
(Real Madrid)**\n - Position: Forward\n - Key Attributes: Speed, dribbling,
|
|
||||||
creativity.\n - Achievements: UEFA Champions League winner (2022), La Liga
|
|
||||||
champion (2023).\n\n10. **Luka Modri\u0107 (Real Madrid)**\n - Position:
|
|
||||||
Midfielder\n - Key Attributes: Passing, vision, tactical intelligence.\n -
|
|
||||||
Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\nThis
|
|
||||||
list is compiled based on their current form, past performances, and contributions
|
|
||||||
to their respective teams in both domestic and international competitions. Player
|
|
||||||
rankings can vary based on personal opinion and specific criteria used for evaluation,
|
|
||||||
but these players have consistently been regarded as some of the best in the
|
|
||||||
world as of October 2023."}, {"role": "user", "content": "You are not allowed
|
|
||||||
to include Brazilian players"}, {"role": "assistant", "content": "Thought: I
|
|
||||||
now can give a great answer \nFinal Answer: Here is an updated list of the
|
|
||||||
top 10 best soccer players in the world as of October 2023, excluding Brazilian
|
|
||||||
players:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements:
|
|
||||||
Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2.
|
|
||||||
**Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup
|
|
||||||
champion (2018), Ligue 1 titles, multiple domestic cups.\n\n3. **Erling Haaland
|
|
||||||
(Manchester City)**\n - Position: Forward\n - Key Attributes: Power, speed,
|
|
||||||
goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA Champions
|
|
||||||
League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne (Manchester
|
|
||||||
City)**\n - Position: Midfielder\n - Key Attributes: Passing, vision, creativity.\n -
|
|
||||||
Achievements: Multiple Premier League titles, FA Cups, UEFA Champions League
|
|
||||||
winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n - Achievements:
|
|
||||||
2022 Ballon d''Or winner, multiple Champions Leagues with Real Madrid.\n\n6.
|
|
||||||
**Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n - Key Attributes:
|
|
||||||
Finishing, positioning, aerial ability.\n - Achievements: FIFA Best Men''s
|
|
||||||
Player, multiple Bundesliga titles, La Liga champion (2023).\n\n7. **Mohamed
|
|
||||||
Salah (Liverpool)**\n - Position: Forward\n - Key Attributes: Speed, finishing,
|
|
||||||
dribbling.\n - Achievements: Premier League champion, FA Cup, UEFA Champions
|
|
||||||
League winner.\n\n8. **Vin\u00edcius J\u00fanior (Real Madrid)**\n - Position:
|
|
||||||
Forward\n - Key Attributes: Speed, dribbling, creativity.\n - Achievements:
|
|
||||||
UEFA Champions League winner (2022), La Liga champion (2023).\n\n9. **Luka Modri\u0107
|
|
||||||
(Real Madrid)**\n - Position: Midfielder\n - Key Attributes: Passing, vision,
|
|
||||||
tactical intelligence.\n - Achievements: Multiple Champions League titles,
|
|
||||||
Ballon d''Or winner (2018).\n\n10. **Harry Kane (Bayern Munich)**\n - Position:
|
|
||||||
Forward\n - Key Attributes: Goal-scoring, technique, playmaking.\n - Achievements:
|
|
||||||
Golden Boot winner, Premier League titles, UEFA European Championship runner-up.\n\nThis
|
|
||||||
list has been adjusted to exclude Brazilian players and focuses on those who
|
|
||||||
have made significant impacts in their clubs and on the international stage
|
|
||||||
as of October 2023. Each player is recognized for their exceptional skills,
|
|
||||||
performances, and achievements."}, {"role": "user", "content": "You are not
|
|
||||||
allowed to include Brazilian players"}, {"role": "assistant", "content": "Thought:
|
|
||||||
I now can give a great answer \nFinal Answer: Here is the revised list of the
|
|
||||||
top 10 best soccer players in the world as of October 2023, explicitly excluding
|
|
||||||
Brazilian players:\n\n1. **Lionel Messi (Inter Miami CF)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Dribbling, vision, goal-scoring ability.\n - Achievements:
|
|
||||||
Multiple Ballon d''Or winner, Copa America champion, World Cup champion (2022).\n\n2.
|
|
||||||
**Kylian Mbapp\u00e9 (Paris Saint-Germain)**\n - Position: Forward\n - Key
|
|
||||||
Attributes: Speed, technique, finishing.\n - Achievements: FIFA World Cup
|
|
||||||
champion (2018), multiple Ligue 1 titles, and various domestic cups.\n\n3. **Erling
|
|
||||||
Haaland (Manchester City)**\n - Position: Forward\n - Key Attributes: Power,
|
|
||||||
speed, goal-scoring instinct.\n - Achievements: Bundesliga top scorer, UEFA
|
|
||||||
Champions League winner (2023), Premier League titles.\n\n4. **Kevin De Bruyne
|
|
||||||
(Manchester City)**\n - Position: Midfielder\n - Key Attributes: Passing,
|
|
||||||
vision, creativity.\n - Achievements: Multiple Premier League titles, FA Cups,
|
|
||||||
UEFA Champions League winner (2023).\n\n5. **Karim Benzema (Al-Ittihad)**\n -
|
|
||||||
Position: Forward\n - Key Attributes: Goal-scoring, playmaking, tactical intelligence.\n -
|
|
||||||
Achievements: 2022 Ballon d''Or winner, multiple Champions Leagues with Real
|
|
||||||
Madrid.\n\n6. **Robert Lewandowski (FC Barcelona)**\n - Position: Forward\n -
|
|
||||||
Key Attributes: Finishing, positioning, aerial ability.\n - Achievements:
|
|
||||||
FIFA Best Men''s Player, multiple Bundesliga titles, La Liga champion (2023).\n\n7.
|
|
||||||
**Mohamed Salah (Liverpool)**\n - Position: Forward\n - Key Attributes:
|
|
||||||
Speed, finishing, dribbling.\n - Achievements: Premier League champion, FA
|
|
||||||
Cup, UEFA Champions League winner.\n\n8. **Luka Modri\u0107 (Real Madrid)**\n -
|
|
||||||
Position: Midfielder\n - Key Attributes: Passing, vision, tactical intelligence.\n -
|
|
||||||
Achievements: Multiple Champions League titles, Ballon d''Or winner (2018).\n\n9.
|
|
||||||
**Harry Kane (Bayern Munich)**\n - Position: Forward\n - Key Attributes:
|
|
||||||
Goal-scoring, technique, playmaking.\n - Achievements: Golden Boot winner,
|
|
||||||
Premier League titles, UEFA European Championship runner-up.\n\n10. **Rodri
|
|
||||||
(Manchester City)**\n - Position: Midfielder\n - Key Attributes: Defensive
|
|
||||||
skills, passing, positional awareness.\n - Achievements: Premier League titles,
|
|
||||||
UEFA Champions League winner (2023).\n\nThis list is curated while adhering
|
|
||||||
to the restriction of excluding Brazilian players. Each player included has
|
|
||||||
demonstrated exceptional skills and remarkable performances, solidifying their
|
|
||||||
status as some of the best in the world as of October 2023."}, {"role": "user",
|
|
||||||
"content": "You are not allowed to include Brazilian players"}], "model": "gpt-4o-mini",
|
|
||||||
"stop": ["\nObservation:"]}'
|
|
||||||
headers:
|
|
||||||
accept:
|
|
||||||
- application/json
|
|
||||||
accept-encoding:
|
|
||||||
- gzip, deflate, zstd
|
|
||||||
connection:
|
|
||||||
- keep-alive
|
|
||||||
content-length:
|
|
||||||
- '9093'
|
|
||||||
content-type:
|
|
||||||
- application/json
|
|
||||||
cookie:
|
|
||||||
- __cf_bm=8Yv8F0ZCFAo2lf.qoqxao70yxyjVvIV90zQqVF6bVzQ-1749567342-1.0.1.1-fZgnv3RDfunvCO1koxwwFJrHnxSx_rwS_FHvQ6xxDPpKHwYr7dTqIQLZrNgSX5twGyK4F22rUmkuiS6KMVogcinChk8lmHtJBTUVTFjr2KU;
|
|
||||||
_cfuvid=wzh8YnmXvLq1G0RcIVijtzboQtCZyIe2uZiochkBLqE-1749567342267-0.0.1.1-604800000
|
|
||||||
host:
|
|
||||||
- api.openai.com
|
|
||||||
user-agent:
|
|
||||||
- OpenAI/Python 1.78.0
|
|
||||||
x-stainless-arch:
|
|
||||||
- arm64
|
|
||||||
x-stainless-async:
|
|
||||||
- 'false'
|
|
||||||
x-stainless-lang:
|
|
||||||
- python
|
|
||||||
x-stainless-os:
|
|
||||||
- MacOS
|
|
||||||
x-stainless-package-version:
|
|
||||||
- 1.78.0
|
|
||||||
x-stainless-raw-response:
|
|
||||||
- 'true'
|
|
||||||
x-stainless-read-timeout:
|
|
||||||
- '600.0'
|
|
||||||
x-stainless-retry-count:
|
|
||||||
- '0'
|
|
||||||
x-stainless-runtime:
|
|
||||||
- CPython
|
|
||||||
x-stainless-runtime-version:
|
|
||||||
- 3.12.9
|
|
||||||
method: POST
|
|
||||||
uri: https://api.openai.com/v1/chat/completions
|
|
||||||
response:
|
|
||||||
body:
|
|
||||||
string: !!binary |
|
|
||||||
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
|
|
||||||
headers:
|
|
||||||
CF-RAY:
|
|
||||||
- 94d9b7d24d991d2c-GRU
|
|
||||||
Connection:
|
|
||||||
- keep-alive
|
|
||||||
Content-Encoding:
|
|
||||||
- gzip
|
|
||||||
Content-Type:
|
|
||||||
- application/json
|
|
||||||
Date:
|
|
||||||
- Tue, 10 Jun 2025 14:57:29 GMT
|
|
||||||
Server:
|
|
||||||
- cloudflare
|
|
||||||
Transfer-Encoding:
|
|
||||||
- chunked
|
|
||||||
X-Content-Type-Options:
|
|
||||||
- nosniff
|
|
||||||
access-control-expose-headers:
|
|
||||||
- X-Request-ID
|
|
||||||
alt-svc:
|
|
||||||
- h3=":443"; ma=86400
|
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
openai-organization:
|
|
||||||
- crewai-iuxna1
|
|
||||||
openai-processing-ms:
|
|
||||||
- '35291'
|
|
||||||
openai-version:
|
|
||||||
- '2020-10-01'
|
|
||||||
strict-transport-security:
|
|
||||||
- max-age=31536000; includeSubDomains; preload
|
|
||||||
x-envoy-upstream-service-time:
|
|
||||||
- '35294'
|
|
||||||
x-ratelimit-limit-requests:
|
|
||||||
- '30000'
|
|
||||||
x-ratelimit-limit-tokens:
|
|
||||||
- '150000000'
|
|
||||||
x-ratelimit-remaining-requests:
|
|
||||||
- '29999'
|
|
||||||
x-ratelimit-remaining-tokens:
|
|
||||||
- '149997855'
|
|
||||||
x-ratelimit-reset-requests:
|
|
||||||
- 2ms
|
|
||||||
x-ratelimit-reset-tokens:
|
|
||||||
- 0s
|
|
||||||
x-request-id:
|
|
||||||
- req_4676152d4227ac1825d1240ddef231d6
|
|
||||||
status:
|
|
||||||
code: 200
|
|
||||||
message: OK
|
|
||||||
version: 1
|
|
||||||
@@ -9,14 +9,6 @@ from crewai.telemetry import Telemetry
|
|||||||
from opentelemetry import trace
|
from opentelemetry import trace
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
|
||||||
def cleanup_telemetry():
|
|
||||||
"""Automatically clean up Telemetry singleton between tests."""
|
|
||||||
Telemetry._instance = None
|
|
||||||
yield
|
|
||||||
Telemetry._instance = None
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"env_var,value,expected_ready",
|
"env_var,value,expected_ready",
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1,19 +1,11 @@
|
|||||||
import os
|
import os
|
||||||
from unittest.mock import patch, MagicMock
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from crewai.telemetry import Telemetry
|
from crewai.telemetry import Telemetry
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
|
||||||
def cleanup_telemetry():
|
|
||||||
"""Automatically clean up Telemetry singleton between tests."""
|
|
||||||
Telemetry._instance = None
|
|
||||||
yield
|
|
||||||
Telemetry._instance = None
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("env_var,value,expected_ready", [
|
@pytest.mark.parametrize("env_var,value,expected_ready", [
|
||||||
("OTEL_SDK_DISABLED", "true", False),
|
("OTEL_SDK_DISABLED", "true", False),
|
||||||
("OTEL_SDK_DISABLED", "TRUE", False),
|
("OTEL_SDK_DISABLED", "TRUE", False),
|
||||||
@@ -36,59 +28,3 @@ def test_telemetry_enabled_by_default():
|
|||||||
with patch("crewai.telemetry.telemetry.TracerProvider"):
|
with patch("crewai.telemetry.telemetry.TracerProvider"):
|
||||||
telemetry = Telemetry()
|
telemetry = Telemetry()
|
||||||
assert telemetry.ready is True
|
assert telemetry.ready is True
|
||||||
|
|
||||||
|
|
||||||
def test_telemetry_disable_after_singleton_creation():
|
|
||||||
"""Test that telemetry operations are disabled when env var is set after singleton creation."""
|
|
||||||
with patch.dict(os.environ, {}, clear=True):
|
|
||||||
with patch("crewai.telemetry.telemetry.TracerProvider"):
|
|
||||||
telemetry = Telemetry()
|
|
||||||
assert telemetry.ready is True
|
|
||||||
|
|
||||||
mock_operation = MagicMock()
|
|
||||||
telemetry._safe_telemetry_operation(mock_operation)
|
|
||||||
mock_operation.assert_called_once()
|
|
||||||
|
|
||||||
mock_operation.reset_mock()
|
|
||||||
|
|
||||||
os.environ['CREWAI_DISABLE_TELEMETRY'] = 'true'
|
|
||||||
|
|
||||||
telemetry._safe_telemetry_operation(mock_operation)
|
|
||||||
mock_operation.assert_not_called()
|
|
||||||
|
|
||||||
|
|
||||||
def test_telemetry_disable_with_multiple_instances():
|
|
||||||
"""Test that multiple telemetry instances respect dynamically changed env vars."""
|
|
||||||
with patch.dict(os.environ, {}, clear=True):
|
|
||||||
with patch("crewai.telemetry.telemetry.TracerProvider"):
|
|
||||||
telemetry1 = Telemetry()
|
|
||||||
assert telemetry1.ready is True
|
|
||||||
|
|
||||||
os.environ['CREWAI_DISABLE_TELEMETRY'] = 'true'
|
|
||||||
|
|
||||||
telemetry2 = Telemetry()
|
|
||||||
assert telemetry2 is telemetry1
|
|
||||||
assert telemetry2.ready is True
|
|
||||||
|
|
||||||
mock_operation = MagicMock()
|
|
||||||
telemetry2._safe_telemetry_operation(mock_operation)
|
|
||||||
mock_operation.assert_not_called()
|
|
||||||
|
|
||||||
|
|
||||||
def test_telemetry_otel_sdk_disabled_after_creation():
|
|
||||||
"""Test that OTEL_SDK_DISABLED also works when set after singleton creation."""
|
|
||||||
with patch.dict(os.environ, {}, clear=True):
|
|
||||||
with patch("crewai.telemetry.telemetry.TracerProvider"):
|
|
||||||
telemetry = Telemetry()
|
|
||||||
assert telemetry.ready is True
|
|
||||||
|
|
||||||
mock_operation = MagicMock()
|
|
||||||
telemetry._safe_telemetry_operation(mock_operation)
|
|
||||||
mock_operation.assert_called_once()
|
|
||||||
|
|
||||||
mock_operation.reset_mock()
|
|
||||||
|
|
||||||
os.environ['OTEL_SDK_DISABLED'] = 'true'
|
|
||||||
|
|
||||||
telemetry._safe_telemetry_operation(mock_operation)
|
|
||||||
mock_operation.assert_not_called()
|
|
||||||
|
|||||||
@@ -1,167 +0,0 @@
|
|||||||
import pytest
|
|
||||||
from unittest.mock import patch, MagicMock
|
|
||||||
from crewai.utilities.events.event_listener import event_listener
|
|
||||||
|
|
||||||
|
|
||||||
class TestFlowHumanInputIntegration:
|
|
||||||
"""Test integration between Flow execution and human input functionality."""
|
|
||||||
|
|
||||||
def test_console_formatter_pause_resume_methods(self):
|
|
||||||
"""Test that ConsoleFormatter pause/resume methods work correctly."""
|
|
||||||
formatter = event_listener.formatter
|
|
||||||
|
|
||||||
original_paused_state = formatter._live_paused
|
|
||||||
|
|
||||||
try:
|
|
||||||
formatter._live_paused = False
|
|
||||||
|
|
||||||
formatter.pause_live_updates()
|
|
||||||
assert formatter._live_paused
|
|
||||||
|
|
||||||
formatter.resume_live_updates()
|
|
||||||
assert not formatter._live_paused
|
|
||||||
finally:
|
|
||||||
formatter._live_paused = original_paused_state
|
|
||||||
|
|
||||||
@patch('builtins.input', return_value='')
|
|
||||||
def test_human_input_pauses_flow_updates(self, mock_input):
|
|
||||||
"""Test that human input pauses Flow status updates."""
|
|
||||||
from crewai.agents.agent_builder.base_agent_executor_mixin import CrewAgentExecutorMixin
|
|
||||||
|
|
||||||
executor = CrewAgentExecutorMixin()
|
|
||||||
executor.crew = MagicMock()
|
|
||||||
executor.crew._train = False
|
|
||||||
executor._printer = MagicMock()
|
|
||||||
|
|
||||||
formatter = event_listener.formatter
|
|
||||||
|
|
||||||
original_paused_state = formatter._live_paused
|
|
||||||
|
|
||||||
try:
|
|
||||||
formatter._live_paused = False
|
|
||||||
|
|
||||||
with patch.object(formatter, 'pause_live_updates') as mock_pause, \
|
|
||||||
patch.object(formatter, 'resume_live_updates') as mock_resume:
|
|
||||||
|
|
||||||
result = executor._ask_human_input("Test result")
|
|
||||||
|
|
||||||
mock_pause.assert_called_once()
|
|
||||||
mock_resume.assert_called_once()
|
|
||||||
mock_input.assert_called_once()
|
|
||||||
assert result == ''
|
|
||||||
finally:
|
|
||||||
formatter._live_paused = original_paused_state
|
|
||||||
|
|
||||||
@patch('builtins.input', side_effect=['feedback', ''])
|
|
||||||
def test_multiple_human_input_rounds(self, mock_input):
|
|
||||||
"""Test multiple rounds of human input with Flow status management."""
|
|
||||||
from crewai.agents.agent_builder.base_agent_executor_mixin import CrewAgentExecutorMixin
|
|
||||||
|
|
||||||
executor = CrewAgentExecutorMixin()
|
|
||||||
executor.crew = MagicMock()
|
|
||||||
executor.crew._train = False
|
|
||||||
executor._printer = MagicMock()
|
|
||||||
|
|
||||||
formatter = event_listener.formatter
|
|
||||||
|
|
||||||
original_paused_state = formatter._live_paused
|
|
||||||
|
|
||||||
try:
|
|
||||||
pause_calls = []
|
|
||||||
resume_calls = []
|
|
||||||
|
|
||||||
def track_pause():
|
|
||||||
pause_calls.append(True)
|
|
||||||
|
|
||||||
def track_resume():
|
|
||||||
resume_calls.append(True)
|
|
||||||
|
|
||||||
with patch.object(formatter, 'pause_live_updates', side_effect=track_pause), \
|
|
||||||
patch.object(formatter, 'resume_live_updates', side_effect=track_resume):
|
|
||||||
|
|
||||||
result1 = executor._ask_human_input("Test result 1")
|
|
||||||
assert result1 == 'feedback'
|
|
||||||
|
|
||||||
result2 = executor._ask_human_input("Test result 2")
|
|
||||||
assert result2 == ''
|
|
||||||
|
|
||||||
assert len(pause_calls) == 2
|
|
||||||
assert len(resume_calls) == 2
|
|
||||||
finally:
|
|
||||||
formatter._live_paused = original_paused_state
|
|
||||||
|
|
||||||
def test_pause_resume_with_no_live_session(self):
|
|
||||||
"""Test pause/resume methods handle case when no Live session exists."""
|
|
||||||
formatter = event_listener.formatter
|
|
||||||
|
|
||||||
original_live = formatter._live
|
|
||||||
original_paused_state = formatter._live_paused
|
|
||||||
|
|
||||||
try:
|
|
||||||
formatter._live = None
|
|
||||||
formatter._live_paused = False
|
|
||||||
|
|
||||||
formatter.pause_live_updates()
|
|
||||||
formatter.resume_live_updates()
|
|
||||||
|
|
||||||
assert not formatter._live_paused
|
|
||||||
finally:
|
|
||||||
formatter._live = original_live
|
|
||||||
formatter._live_paused = original_paused_state
|
|
||||||
|
|
||||||
def test_pause_resume_exception_handling(self):
|
|
||||||
"""Test that resume is called even if exception occurs during human input."""
|
|
||||||
from crewai.agents.agent_builder.base_agent_executor_mixin import CrewAgentExecutorMixin
|
|
||||||
|
|
||||||
executor = CrewAgentExecutorMixin()
|
|
||||||
executor.crew = MagicMock()
|
|
||||||
executor.crew._train = False
|
|
||||||
executor._printer = MagicMock()
|
|
||||||
|
|
||||||
formatter = event_listener.formatter
|
|
||||||
|
|
||||||
original_paused_state = formatter._live_paused
|
|
||||||
|
|
||||||
try:
|
|
||||||
with patch.object(formatter, 'pause_live_updates') as mock_pause, \
|
|
||||||
patch.object(formatter, 'resume_live_updates') as mock_resume, \
|
|
||||||
patch('builtins.input', side_effect=KeyboardInterrupt("Test exception")):
|
|
||||||
|
|
||||||
with pytest.raises(KeyboardInterrupt):
|
|
||||||
executor._ask_human_input("Test result")
|
|
||||||
|
|
||||||
mock_pause.assert_called_once()
|
|
||||||
mock_resume.assert_called_once()
|
|
||||||
finally:
|
|
||||||
formatter._live_paused = original_paused_state
|
|
||||||
|
|
||||||
def test_training_mode_human_input(self):
|
|
||||||
"""Test human input in training mode."""
|
|
||||||
from crewai.agents.agent_builder.base_agent_executor_mixin import CrewAgentExecutorMixin
|
|
||||||
|
|
||||||
executor = CrewAgentExecutorMixin()
|
|
||||||
executor.crew = MagicMock()
|
|
||||||
executor.crew._train = True
|
|
||||||
executor._printer = MagicMock()
|
|
||||||
|
|
||||||
formatter = event_listener.formatter
|
|
||||||
|
|
||||||
original_paused_state = formatter._live_paused
|
|
||||||
|
|
||||||
try:
|
|
||||||
with patch.object(formatter, 'pause_live_updates') as mock_pause, \
|
|
||||||
patch.object(formatter, 'resume_live_updates') as mock_resume, \
|
|
||||||
patch('builtins.input', return_value='training feedback'):
|
|
||||||
|
|
||||||
result = executor._ask_human_input("Test result")
|
|
||||||
|
|
||||||
mock_pause.assert_called_once()
|
|
||||||
mock_resume.assert_called_once()
|
|
||||||
assert result == 'training feedback'
|
|
||||||
|
|
||||||
executor._printer.print.assert_called()
|
|
||||||
call_args = [call[1]['content'] for call in executor._printer.print.call_args_list]
|
|
||||||
training_prompt_found = any('TRAINING MODE' in content for content in call_args)
|
|
||||||
assert training_prompt_found
|
|
||||||
finally:
|
|
||||||
formatter._live_paused = original_paused_state
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from collections import defaultdict
|
import asyncio
|
||||||
from typing import cast
|
from typing import cast
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
|
||||||
@@ -313,108 +313,5 @@ def test_sets_parent_flow_when_inside_flow():
|
|||||||
nonlocal captured_agent
|
nonlocal captured_agent
|
||||||
captured_agent = source
|
captured_agent = source
|
||||||
|
|
||||||
flow.kickoff()
|
result = flow.kickoff()
|
||||||
assert captured_agent.parent_flow is flow
|
assert captured_agent.parent_flow is flow
|
||||||
|
|
||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
|
||||||
def test_guardrail_is_called_using_string():
|
|
||||||
guardrail_events = defaultdict(list)
|
|
||||||
from crewai.utilities.events import LLMGuardrailCompletedEvent, LLMGuardrailStartedEvent
|
|
||||||
with crewai_event_bus.scoped_handlers():
|
|
||||||
@crewai_event_bus.on(LLMGuardrailStartedEvent)
|
|
||||||
def capture_guardrail_started(source, event):
|
|
||||||
guardrail_events["started"].append(event)
|
|
||||||
|
|
||||||
@crewai_event_bus.on(LLMGuardrailCompletedEvent)
|
|
||||||
def capture_guardrail_completed(source, event):
|
|
||||||
guardrail_events["completed"].append(event)
|
|
||||||
|
|
||||||
agent = Agent(
|
|
||||||
role="Sports Analyst",
|
|
||||||
goal="Gather information about the best soccer players",
|
|
||||||
backstory="""You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.""",
|
|
||||||
guardrail="""Only include Brazilian players, both women and men""",
|
|
||||||
)
|
|
||||||
|
|
||||||
result = agent.kickoff(messages="Top 10 best players in the world?")
|
|
||||||
|
|
||||||
assert len(guardrail_events['started']) == 2
|
|
||||||
assert len(guardrail_events['completed']) == 2
|
|
||||||
assert not guardrail_events['completed'][0].success
|
|
||||||
assert guardrail_events['completed'][1].success
|
|
||||||
assert "Here are the top 10 best soccer players in the world, focusing exclusively on Brazilian players" in result.raw
|
|
||||||
|
|
||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
|
||||||
def test_guardrail_is_called_using_callable():
|
|
||||||
guardrail_events = defaultdict(list)
|
|
||||||
from crewai.utilities.events import LLMGuardrailCompletedEvent, LLMGuardrailStartedEvent
|
|
||||||
with crewai_event_bus.scoped_handlers():
|
|
||||||
@crewai_event_bus.on(LLMGuardrailStartedEvent)
|
|
||||||
def capture_guardrail_started(source, event):
|
|
||||||
guardrail_events["started"].append(event)
|
|
||||||
|
|
||||||
@crewai_event_bus.on(LLMGuardrailCompletedEvent)
|
|
||||||
def capture_guardrail_completed(source, event):
|
|
||||||
guardrail_events["completed"].append(event)
|
|
||||||
|
|
||||||
agent = Agent(
|
|
||||||
role="Sports Analyst",
|
|
||||||
goal="Gather information about the best soccer players",
|
|
||||||
backstory="""You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.""",
|
|
||||||
guardrail=lambda output: (True, "Pelé - Santos, 1958"),
|
|
||||||
)
|
|
||||||
|
|
||||||
result = agent.kickoff(messages="Top 1 best players in the world?")
|
|
||||||
|
|
||||||
assert len(guardrail_events['started']) == 1
|
|
||||||
assert len(guardrail_events['completed']) == 1
|
|
||||||
assert guardrail_events['completed'][0].success
|
|
||||||
assert "Pelé - Santos, 1958" in result.raw
|
|
||||||
|
|
||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
|
||||||
def test_guardrail_reached_attempt_limit():
|
|
||||||
guardrail_events = defaultdict(list)
|
|
||||||
from crewai.utilities.events import LLMGuardrailCompletedEvent, LLMGuardrailStartedEvent
|
|
||||||
with crewai_event_bus.scoped_handlers():
|
|
||||||
@crewai_event_bus.on(LLMGuardrailStartedEvent)
|
|
||||||
def capture_guardrail_started(source, event):
|
|
||||||
guardrail_events["started"].append(event)
|
|
||||||
|
|
||||||
@crewai_event_bus.on(LLMGuardrailCompletedEvent)
|
|
||||||
def capture_guardrail_completed(source, event):
|
|
||||||
guardrail_events["completed"].append(event)
|
|
||||||
|
|
||||||
agent = Agent(
|
|
||||||
role="Sports Analyst",
|
|
||||||
goal="Gather information about the best soccer players",
|
|
||||||
backstory="""You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.""",
|
|
||||||
guardrail=lambda output: (False, "You are not allowed to include Brazilian players"),
|
|
||||||
guardrail_max_retries=2,
|
|
||||||
)
|
|
||||||
|
|
||||||
with pytest.raises(Exception, match="Agent's guardrail failed validation after 2 retries"):
|
|
||||||
agent.kickoff(messages="Top 10 best players in the world?")
|
|
||||||
|
|
||||||
assert len(guardrail_events['started']) == 3 # 2 retries + 1 initial call
|
|
||||||
assert len(guardrail_events['completed']) == 3 # 2 retries + 1 initial call
|
|
||||||
assert not guardrail_events['completed'][0].success
|
|
||||||
assert not guardrail_events['completed'][1].success
|
|
||||||
assert not guardrail_events['completed'][2].success
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
|
||||||
def test_agent_output_when_guardrail_returns_base_model():
|
|
||||||
class Player(BaseModel):
|
|
||||||
name: str
|
|
||||||
country: str
|
|
||||||
|
|
||||||
agent = Agent(
|
|
||||||
role="Sports Analyst",
|
|
||||||
goal="Gather information about the best soccer players",
|
|
||||||
backstory="""You are an expert at gathering and organizing information. You carefully collect details and present them in a structured way.""",
|
|
||||||
guardrail=lambda output: (True, Player(name="Lionel Messi", country="Argentina")),
|
|
||||||
)
|
|
||||||
|
|
||||||
result = agent.kickoff(messages="Top 10 best players in the world?")
|
|
||||||
|
|
||||||
assert result.pydantic == Player(name="Lionel Messi", country="Argentina")
|
|
||||||
|
|||||||
@@ -1,116 +0,0 @@
|
|||||||
from unittest.mock import MagicMock, patch
|
|
||||||
from rich.tree import Tree
|
|
||||||
from rich.live import Live
|
|
||||||
from crewai.utilities.events.utils.console_formatter import ConsoleFormatter
|
|
||||||
|
|
||||||
|
|
||||||
class TestConsoleFormatterPauseResume:
|
|
||||||
"""Test ConsoleFormatter pause/resume functionality."""
|
|
||||||
|
|
||||||
def test_pause_live_updates_with_active_session(self):
|
|
||||||
"""Test pausing when Live session is active."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
mock_live = MagicMock(spec=Live)
|
|
||||||
formatter._live = mock_live
|
|
||||||
formatter._live_paused = False
|
|
||||||
|
|
||||||
formatter.pause_live_updates()
|
|
||||||
|
|
||||||
mock_live.stop.assert_called_once()
|
|
||||||
assert formatter._live_paused
|
|
||||||
|
|
||||||
def test_pause_live_updates_when_already_paused(self):
|
|
||||||
"""Test pausing when already paused does nothing."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
mock_live = MagicMock(spec=Live)
|
|
||||||
formatter._live = mock_live
|
|
||||||
formatter._live_paused = True
|
|
||||||
|
|
||||||
formatter.pause_live_updates()
|
|
||||||
|
|
||||||
mock_live.stop.assert_not_called()
|
|
||||||
assert formatter._live_paused
|
|
||||||
|
|
||||||
def test_pause_live_updates_with_no_session(self):
|
|
||||||
"""Test pausing when no Live session exists."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
formatter._live = None
|
|
||||||
formatter._live_paused = False
|
|
||||||
|
|
||||||
formatter.pause_live_updates()
|
|
||||||
|
|
||||||
assert formatter._live_paused
|
|
||||||
|
|
||||||
def test_resume_live_updates_when_paused(self):
|
|
||||||
"""Test resuming when paused."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
formatter._live_paused = True
|
|
||||||
|
|
||||||
formatter.resume_live_updates()
|
|
||||||
|
|
||||||
assert not formatter._live_paused
|
|
||||||
|
|
||||||
def test_resume_live_updates_when_not_paused(self):
|
|
||||||
"""Test resuming when not paused does nothing."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
formatter._live_paused = False
|
|
||||||
|
|
||||||
formatter.resume_live_updates()
|
|
||||||
|
|
||||||
assert not formatter._live_paused
|
|
||||||
|
|
||||||
def test_print_after_resume_restarts_live_session(self):
|
|
||||||
"""Test that printing a Tree after resume creates new Live session."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
formatter._live_paused = True
|
|
||||||
formatter._live = None
|
|
||||||
|
|
||||||
formatter.resume_live_updates()
|
|
||||||
assert not formatter._live_paused
|
|
||||||
|
|
||||||
tree = Tree("Test")
|
|
||||||
|
|
||||||
with patch('crewai.utilities.events.utils.console_formatter.Live') as mock_live_class:
|
|
||||||
mock_live_instance = MagicMock()
|
|
||||||
mock_live_class.return_value = mock_live_instance
|
|
||||||
|
|
||||||
formatter.print(tree)
|
|
||||||
|
|
||||||
mock_live_class.assert_called_once()
|
|
||||||
mock_live_instance.start.assert_called_once()
|
|
||||||
assert formatter._live == mock_live_instance
|
|
||||||
|
|
||||||
def test_multiple_pause_resume_cycles(self):
|
|
||||||
"""Test multiple pause/resume cycles work correctly."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
mock_live = MagicMock(spec=Live)
|
|
||||||
formatter._live = mock_live
|
|
||||||
formatter._live_paused = False
|
|
||||||
|
|
||||||
formatter.pause_live_updates()
|
|
||||||
assert formatter._live_paused
|
|
||||||
mock_live.stop.assert_called_once()
|
|
||||||
assert formatter._live is None # Live session should be cleared
|
|
||||||
|
|
||||||
formatter.resume_live_updates()
|
|
||||||
assert not formatter._live_paused
|
|
||||||
|
|
||||||
formatter.pause_live_updates()
|
|
||||||
assert formatter._live_paused
|
|
||||||
|
|
||||||
formatter.resume_live_updates()
|
|
||||||
assert not formatter._live_paused
|
|
||||||
|
|
||||||
def test_pause_resume_state_initialization(self):
|
|
||||||
"""Test that _live_paused is properly initialized."""
|
|
||||||
formatter = ConsoleFormatter()
|
|
||||||
|
|
||||||
assert hasattr(formatter, '_live_paused')
|
|
||||||
assert not formatter._live_paused
|
|
||||||
Reference in New Issue
Block a user