From 5a102251cfaecc2fd75c6b11645194296d2e675f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Sat, 10 Feb 2024 10:36:34 -0800 Subject: [PATCH] Revamping tool usage --- src/crewai/agent.py | 23 +- src/crewai/agents/__init__.py | 1 - src/crewai/agents/cache/__init__.py | 1 - src/crewai/agents/cache/cache_handler.py | 2 - src/crewai/agents/cache/cache_hit.py | 18 - src/crewai/agents/exceptions.py | 30 - src/crewai/agents/executor.py | 47 +- src/crewai/agents/output_parser.py | 79 -- src/crewai/agents/tools_handler.py | 44 +- src/crewai/crew.py | 1 + src/crewai/telemtry/telemetry.py | 39 +- src/crewai/tools/agent_tools.py | 24 +- src/crewai/tools/cache_tools.py | 4 +- src/crewai/tools/tool_calling.py | 12 + src/crewai/tools/tool_usage.py | 112 +++ src/crewai/translations/el.json | 2 +- src/crewai/translations/en.json | 2 +- tests/agent_test.py | 118 +-- tests/agent_tools/agent_tools_test.py | 34 +- .../test_agent_repeated_tool_usage.yaml | 675 ++++++++++++++++++ .../test_cache_hitting_between_agents.yaml | 507 ++++++------- tests/crew_test.py | 42 +- 22 files changed, 1233 insertions(+), 584 deletions(-) delete mode 100644 src/crewai/agents/cache/cache_hit.py delete mode 100644 src/crewai/agents/exceptions.py delete mode 100644 src/crewai/agents/output_parser.py create mode 100644 src/crewai/tools/tool_calling.py create mode 100644 src/crewai/tools/tool_usage.py create mode 100644 tests/cassettes/test_agent_repeated_tool_usage.yaml diff --git a/src/crewai/agent.py b/src/crewai/agent.py index 495e5e15b..8da40ee26 100644 --- a/src/crewai/agent.py +++ b/src/crewai/agent.py @@ -3,9 +3,9 @@ from typing import Any, List, Optional from langchain.agents.agent import RunnableAgent from langchain.agents.format_scratchpad import format_log_to_str +from langchain.agents.output_parsers import ReActSingleInputOutputParser from langchain.memory import ConversationSummaryMemory from langchain.tools.render import render_text_description -from langchain_core.runnables.config import RunnableConfig from langchain_openai import ChatOpenAI from pydantic import ( UUID4, @@ -19,12 +19,7 @@ from pydantic import ( ) from pydantic_core import PydanticCustomError -from crewai.agents import ( - CacheHandler, - CrewAgentExecutor, - CrewAgentOutputParser, - ToolsHandler, -) +from crewai.agents import CacheHandler, CrewAgentExecutor, ToolsHandler from crewai.utilities import I18N, Logger, Prompts, RPMController @@ -158,8 +153,7 @@ class Agent(BaseModel): "input": task, "tool_names": self.__tools_names(tools), "tools": render_text_description(tools), - }, - RunnableConfig(callbacks=[self.tools_handler]), + } )["output"] if self.max_rpm: @@ -200,12 +194,14 @@ class Agent(BaseModel): "agent_scratchpad": lambda x: format_log_to_str(x["intermediate_steps"]), } executor_args = { + "llm": self.llm, "i18n": self.i18n, "tools": self.tools, "verbose": self.verbose, "handle_parsing_errors": True, "max_iterations": self.max_iter, "step_callback": self.step_callback, + "tools_handler": self.tools_handler, } if self._rpm_controller: @@ -231,14 +227,7 @@ class Agent(BaseModel): bind = self.llm.bind(stop=[self.i18n.slice("observation")]) inner_agent = ( - agent_args - | execution_prompt - | bind - | CrewAgentOutputParser( - tools_handler=self.tools_handler, - cache=self.cache_handler, - i18n=self.i18n, - ) + agent_args | execution_prompt | bind | ReActSingleInputOutputParser() ) self.agent_executor = CrewAgentExecutor( agent=RunnableAgent(runnable=inner_agent), **executor_args diff --git a/src/crewai/agents/__init__.py b/src/crewai/agents/__init__.py index c14004aee..8cd613c2d 100644 --- a/src/crewai/agents/__init__.py +++ b/src/crewai/agents/__init__.py @@ -1,4 +1,3 @@ from .cache.cache_handler import CacheHandler from .executor import CrewAgentExecutor -from .output_parser import CrewAgentOutputParser from .tools_handler import ToolsHandler diff --git a/src/crewai/agents/cache/__init__.py b/src/crewai/agents/cache/__init__.py index ab6ba9674..c91d30c8b 100644 --- a/src/crewai/agents/cache/__init__.py +++ b/src/crewai/agents/cache/__init__.py @@ -1,2 +1 @@ from .cache_handler import CacheHandler -from .cache_hit import CacheHit diff --git a/src/crewai/agents/cache/cache_handler.py b/src/crewai/agents/cache/cache_handler.py index 84c91c4cc..27dccbcb5 100644 --- a/src/crewai/agents/cache/cache_handler.py +++ b/src/crewai/agents/cache/cache_handler.py @@ -10,9 +10,7 @@ class CacheHandler: self._cache = {} def add(self, tool, input, output): - input = input.strip() self._cache[f"{tool}-{input}"] = output def read(self, tool, input) -> Optional[str]: - input = input.strip() return self._cache.get(f"{tool}-{input}") diff --git a/src/crewai/agents/cache/cache_hit.py b/src/crewai/agents/cache/cache_hit.py deleted file mode 100644 index 07a711c29..000000000 --- a/src/crewai/agents/cache/cache_hit.py +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Any - -from pydantic import BaseModel, Field - -from .cache_handler import CacheHandler - - -class CacheHit(BaseModel): - """Cache Hit Object.""" - - class Config: - arbitrary_types_allowed = True - - # Making it Any instead of AgentAction to avoind - # pydantic v1 vs v2 incompatibility, langchain should - # soon be updated to pydantic v2 - action: Any = Field(description="Action taken") - cache: CacheHandler = Field(description="Cache Handler for the tool") diff --git a/src/crewai/agents/exceptions.py b/src/crewai/agents/exceptions.py deleted file mode 100644 index b2aea8efe..000000000 --- a/src/crewai/agents/exceptions.py +++ /dev/null @@ -1,30 +0,0 @@ -from langchain_core.exceptions import OutputParserException - -from crewai.utilities import I18N - - -class TaskRepeatedUsageException(OutputParserException): - """Exception raised when a task is used twice in a roll.""" - - i18n: I18N = I18N() - error: str = "TaskRepeatedUsageException" - message: str - - def __init__(self, i18n: I18N, tool: str, tool_input: str, text: str): - self.i18n = i18n - self.text = text - self.tool = tool - self.tool_input = tool_input - self.message = self.i18n.errors("task_repeated_usage").format( - tool=tool, tool_input=tool_input - ) - - super().__init__( - error=self.error, - observation=self.message, - send_to_llm=True, - llm_output=self.text, - ) - - def __str__(self): - return self.message diff --git a/src/crewai/agents/executor.py b/src/crewai/agents/executor.py index 1dbe224d6..02d6da8d5 100644 --- a/src/crewai/agents/executor.py +++ b/src/crewai/agents/executor.py @@ -10,16 +10,19 @@ from langchain_core.exceptions import OutputParserException from langchain_core.pydantic_v1 import root_validator from langchain_core.tools import BaseTool from langchain_core.utils.input import get_color_mapping +from pydantic import InstanceOf -from crewai.agents.cache.cache_hit import CacheHit -from crewai.tools.cache_tools import CacheTools +from crewai.agents.tools_handler import ToolsHandler +from crewai.tools.tool_usage import ToolUsage from crewai.utilities import I18N class CrewAgentExecutor(AgentExecutor): i18n: I18N = I18N() + llm: Any = None iterations: int = 0 request_within_rpm_limit: Any = None + tools_handler: InstanceOf[ToolsHandler] = None max_iterations: Optional[int] = 15 force_answer_max_iterations: Optional[int] = None step_callback: Optional[Any] = None @@ -32,11 +35,6 @@ class CrewAgentExecutor(AgentExecutor): def _should_force_answer(self) -> bool: return True if self.iterations == self.force_answer_max_iterations else False - def _force_answer(self, output: AgentAction): - return AgentStep( - action=output, observation=self.i18n.errors("force_final_answer") - ) - def _call( self, inputs: Dict[str, str], @@ -110,16 +108,17 @@ class CrewAgentExecutor(AgentExecutor): callbacks=run_manager.get_child() if run_manager else None, **inputs, ) + if self._should_force_answer(): if isinstance(output, AgentAction) or isinstance(output, AgentFinish): output = output - elif isinstance(output, CacheHit): - output = output.action else: raise ValueError( f"Unexpected output type from agent: {type(output)}" ) - yield self._force_answer(output) + yield AgentStep( + action=output, observation=self.i18n.errors("force_final_answer") + ) return except OutputParserException as e: @@ -160,7 +159,9 @@ class CrewAgentExecutor(AgentExecutor): ) if self._should_force_answer(): - yield self._force_answer(output) + yield AgentStep( + action=output, observation=self.i18n.errors("force_final_answer") + ) return yield AgentStep(action=output, observation=observation) @@ -171,17 +172,6 @@ class CrewAgentExecutor(AgentExecutor): yield output return - # Override tool usage to use CacheTools - if isinstance(output, CacheHit): - cache = output.cache - action = output.action - tool = CacheTools(cache_handler=cache).tool() - output = action.copy() - output.tool_input = f"tool:{action.tool}|input:{action.tool_input}" - output.tool = tool.name - name_to_tool_map[tool.name] = tool - color_mapping[tool.name] = color_mapping[action.tool] - actions: List[AgentAction] actions = [output] if isinstance(output, AgentAction) else output yield from actions @@ -192,18 +182,13 @@ class CrewAgentExecutor(AgentExecutor): if agent_action.tool in name_to_tool_map: tool = name_to_tool_map[agent_action.tool] return_direct = tool.return_direct - color = color_mapping[agent_action.tool] + color_mapping[agent_action.tool] tool_run_kwargs = self.agent.tool_run_logging_kwargs() if return_direct: tool_run_kwargs["llm_prefix"] = "" - # We then call the tool on the tool input to get an observation - observation = tool.run( - agent_action.tool_input, - verbose=self.verbose, - color=color, - callbacks=run_manager.get_child() if run_manager else None, - **tool_run_kwargs, - ) + observation = ToolUsage( + tools_handler=self.tools_handler, tools=self.tools, llm=self.llm + ).use(agent_action.log) else: tool_run_kwargs = self.agent.tool_run_logging_kwargs() observation = InvalidTool().run( diff --git a/src/crewai/agents/output_parser.py b/src/crewai/agents/output_parser.py deleted file mode 100644 index 9edeb12b0..000000000 --- a/src/crewai/agents/output_parser.py +++ /dev/null @@ -1,79 +0,0 @@ -import re -from typing import Union - -from langchain.agents.output_parsers import ReActSingleInputOutputParser -from langchain_core.agents import AgentAction, AgentFinish - -from crewai.agents.cache import CacheHandler, CacheHit -from crewai.agents.exceptions import TaskRepeatedUsageException -from crewai.agents.tools_handler import ToolsHandler -from crewai.utilities import I18N - -FINAL_ANSWER_ACTION = "Final Answer:" -FINAL_ANSWER_AND_PARSABLE_ACTION_ERROR_MESSAGE = ( - "Parsing LLM output produced both a final answer and a parse-able action:" -) - - -class CrewAgentOutputParser(ReActSingleInputOutputParser): - """Parses ReAct-style LLM calls that have a single tool input. - - Expects output to be in one of two formats. - - If the output signals that an action should be taken, - should be in the below format. This will result in an AgentAction - being returned. - - ``` - Thought: agent thought here - Action: search - Action Input: what is the temperature in SF? - ``` - - If the output signals that a final answer should be given, - should be in the below format. This will result in an AgentFinish - being returned. - - ``` - Thought: agent thought here - Final Answer: The temperature is 100 degrees - ``` - - It also prevents tools from being reused in a roll. - """ - - class Config: - arbitrary_types_allowed = True - - tools_handler: ToolsHandler - cache: CacheHandler - i18n: I18N - - def parse(self, text: str) -> Union[AgentAction, AgentFinish, CacheHit]: - regex = ( - r"Action\s*\d*\s*:[\s]*(.*?)[\s]*Action\s*\d*\s*Input\s*\d*\s*:[\s]*(.*)" - ) - if action_match := re.search(regex, text, re.DOTALL): - action = action_match.group(1).strip() - action_input = action_match.group(2) - tool_input = action_input.strip(" ") - tool_input = tool_input.strip('"') - - if last_tool_usage := self.tools_handler.last_used_tool: - usage = { - "tool": action, - "input": tool_input, - } - if usage == last_tool_usage: - raise TaskRepeatedUsageException( - text=text, - tool=action, - tool_input=tool_input, - i18n=self.i18n, - ) - - if self.cache.read(action, tool_input): - action = AgentAction(action, tool_input, text) - return CacheHit(action=action, cache=self.cache) - - return super().parse(text) diff --git a/src/crewai/agents/tools_handler.py b/src/crewai/agents/tools_handler.py index 24a81c425..e5c98180e 100644 --- a/src/crewai/agents/tools_handler.py +++ b/src/crewai/agents/tools_handler.py @@ -1,44 +1,30 @@ -from typing import Any, Dict - -from langchain.callbacks.base import BaseCallbackHandler +from typing import Any from ..tools.cache_tools import CacheTools +from ..tools.tool_calling import ToolCalling from .cache.cache_handler import CacheHandler -class ToolsHandler(BaseCallbackHandler): +class ToolsHandler: """Callback handler for tool usage.""" - last_used_tool: Dict[str, Any] = {} + last_used_tool: ToolCalling = {} cache: CacheHandler - def __init__(self, cache: CacheHandler, **kwargs: Any): + def __init__(self, cache: CacheHandler): """Initialize the callback handler.""" self.cache = cache - super().__init__(**kwargs) + self.last_used_tool = {} - def on_tool_start( - self, serialized: Dict[str, Any], input_str: str, **kwargs: Any - ) -> Any: + def on_tool_start(self, calling: ToolCalling) -> Any: """Run when tool starts running.""" - name = serialized.get("name") - if name not in ["invalid_tool", "_Exception"]: - tools_usage = { - "tool": name, - "input": input_str, - } - self.last_used_tool = tools_usage + self.last_used_tool = calling - def on_tool_end(self, output: str, **kwargs: Any) -> Any: + def on_tool_end(self, calling: ToolCalling, output: str) -> Any: """Run when tool ends running.""" - if ( - "is not a valid tool" not in output - and "Invalid or incomplete response" not in output - and "Invalid Format" not in output - ): - if self.last_used_tool["tool"] != CacheTools().name: - self.cache.add( - tool=self.last_used_tool["tool"], - input=self.last_used_tool["input"], - output=output, - ) + if self.last_used_tool.function_name != CacheTools().name: + self.cache.add( + tool=calling.function_name, + input=calling.arguments, + output=output, + ) diff --git a/src/crewai/crew.py b/src/crewai/crew.py index 804a003a1..06799d7dc 100644 --- a/src/crewai/crew.py +++ b/src/crewai/crew.py @@ -107,6 +107,7 @@ class Crew(BaseModel): self._logger = Logger(self.verbose) self._rpm_controller = RPMController(max_rpm=self.max_rpm, logger=self._logger) self._telemetry = Telemetry() + self._telemetry.set_tracer() self._telemetry.crew_creation(self) return self diff --git a/src/crewai/telemtry/telemetry.py b/src/crewai/telemtry/telemetry.py index ce79083c6..de9cd3e0a 100644 --- a/src/crewai/telemtry/telemetry.py +++ b/src/crewai/telemtry/telemetry.py @@ -2,6 +2,7 @@ import json import os import platform import socket +from typing import Any import pkg_resources from opentelemetry import trace @@ -42,16 +43,18 @@ class Telemetry: try: telemetry_endpoint = "http://telemetry.crewai.com:4318" self.resource = Resource(attributes={SERVICE_NAME: "crewAI-telemetry"}) - provider = TracerProvider(resource=self.resource) + self.provider = TracerProvider(resource=self.resource) processor = BatchSpanProcessor( OTLPSpanExporter(endpoint=f"{telemetry_endpoint}/v1/traces") ) - provider.add_span_processor(processor) - trace.set_tracer_provider(provider) + self.provider.add_span_processor(processor) self.ready = True except Exception: pass + def set_tracer(self): + trace.set_tracer_provider(self.provider) + def crew_creation(self, crew): """Records the creation of a crew.""" if self.ready: @@ -116,6 +119,36 @@ class Telemetry: except Exception: pass + def tool_usage(self, llm: Any, tool_name: str, attempts: int): + """Records the usage of a tool by an agent.""" + if self.ready: + try: + tracer = trace.get_tracer("crewai.telemetry") + span = tracer.start_span("Tool Usage") + self._add_attribute(span, "tool_name", tool_name) + self._add_attribute(span, "attempts", attempts) + self._add_attribute( + span, "llm", json.dumps(self._safe_llm_attributes(llm)) + ) + span.set_status(Status(StatusCode.OK)) + span.end() + except Exception: + pass + + def tool_usage_error(self, llm: Any): + """Records the usage of a tool by an agent.""" + if self.ready: + try: + tracer = trace.get_tracer("crewai.telemetry") + span = tracer.start_span("Tool Usage Error") + self._add_attribute( + span, "llm", json.dumps(self._safe_llm_attributes(llm)) + ) + span.set_status(Status(StatusCode.OK)) + span.end() + except Exception: + pass + def crew_execution_span(self, crew): """Records the complete execution of a crew. This is only collected if the user has opted-in to share the crew. diff --git a/src/crewai/tools/agent_tools.py b/src/crewai/tools/agent_tools.py index f3cb0b52c..cb41da04e 100644 --- a/src/crewai/tools/agent_tools.py +++ b/src/crewai/tools/agent_tools.py @@ -1,6 +1,6 @@ from typing import List -from langchain.tools import Tool +from langchain.tools import StructuredTool from pydantic import BaseModel, Field from crewai.agent import Agent @@ -15,14 +15,14 @@ class AgentTools(BaseModel): def tools(self): return [ - Tool.from_function( + StructuredTool.from_function( func=self.delegate_work, name="Delegate work to co-worker", description=self.i18n.tools("delegate_work").format( coworkers=", ".join([agent.role for agent in self.agents]) ), ), - Tool.from_function( + StructuredTool.from_function( func=self.ask_question, name="Ask question to co-worker", description=self.i18n.tools("ask_question").format( @@ -31,24 +31,16 @@ class AgentTools(BaseModel): ), ] - def delegate_work(self, command): + def delegate_work(self, coworker: str, task: str, context: str): """Useful to delegate a specific task to a coworker.""" - return self._execute(command) + return self._execute(coworker, task, context) - def ask_question(self, command): + def ask_question(self, coworker: str, question: str, context: str): """Useful to ask a question, opinion or take from a coworker.""" - return self._execute(command) + return self._execute(coworker, question, context) - def _execute(self, command): + def _execute(self, agent, task, context): """Execute the command.""" - try: - agent, task, context = command.split("|") - except ValueError: - return self.i18n.errors("agent_tool_missing_param") - - if not agent or not task or not context: - return self.i18n.errors("agent_tool_missing_param") - agent = [ available_agent for available_agent in self.agents diff --git a/src/crewai/tools/cache_tools.py b/src/crewai/tools/cache_tools.py index a8e6dbf3c..77ff8881b 100644 --- a/src/crewai/tools/cache_tools.py +++ b/src/crewai/tools/cache_tools.py @@ -1,4 +1,4 @@ -from langchain.tools import Tool +from langchain.tools import StructuredTool from pydantic import BaseModel, ConfigDict, Field from crewai.agents.cache import CacheHandler @@ -15,7 +15,7 @@ class CacheTools(BaseModel): ) def tool(self): - return Tool.from_function( + return StructuredTool.from_function( func=self.hit_cache, name=self.name, description="Reads directly from the cache", diff --git a/src/crewai/tools/tool_calling.py b/src/crewai/tools/tool_calling.py new file mode 100644 index 000000000..19bcd28cc --- /dev/null +++ b/src/crewai/tools/tool_calling.py @@ -0,0 +1,12 @@ +from typing import Any, Dict + +from pydantic.v1 import BaseModel, Field + + +class ToolCalling(BaseModel): + function_name: str = Field( + ..., description="The name of the function to be called." + ) + arguments: Dict[str, Any] = Field( + ..., description="A dictinary of arguments to be passed to the function." + ) diff --git a/src/crewai/tools/tool_usage.py b/src/crewai/tools/tool_usage.py new file mode 100644 index 000000000..8c574549e --- /dev/null +++ b/src/crewai/tools/tool_usage.py @@ -0,0 +1,112 @@ +from typing import Any, List + +from langchain.output_parsers import PydanticOutputParser +from langchain.prompts import PromptTemplate +from langchain_core.tools import BaseTool + +from crewai.agents.tools_handler import ToolsHandler +from crewai.telemtry import Telemetry +from crewai.tools.tool_calling import ToolCalling +from crewai.utilities import I18N, Printer + + +class ToolUsage: + """ + Class that represents the usage of a tool by an agent. + + Attributes: + tools_handler: Tools handler that will manage the tool usage. + tools: List of tools available for the agent. + llm: Language model to be used for the tool usage. + """ + + def __init__( + self, tools_handler: ToolsHandler, tools: List[BaseTool], llm: Any + ) -> None: + self._i18n: I18N = I18N() + self._printer: Printer = Printer() + self._telemetry: Telemetry = Telemetry() + self._run_attempts: int = 1 + self._max_parsing_attempts: int = 3 + self.tools_handler = tools_handler + self.tools = tools + self.llm = llm + + def use(self, tool_string: str): + calling = self._tool_calling(tool_string) + tool = self._select_tool(calling.function_name) + return self._use(tool=tool, calling=calling) + + def _use(self, tool: BaseTool, calling: ToolCalling) -> None: + if self._check_tool_repeated_usage(calling=calling): + result = self._i18n.errors("task_repeated_usage").format( + tool=calling.function_name, tool_input=calling.arguments + ) + else: + self.tools_handler.on_tool_start(calling=calling) + + result = self.tools_handler.cache.read( + tool=calling.function_name, input=calling.arguments + ) + + if not result: + result = tool._run(**calling.arguments) + self.tools_handler.on_tool_end(calling=calling, output=result) + + self._printer.print(content=f"\n\n{result}\n", color="yellow") + self._telemetry.tool_usage( + llm=self.llm, tool_name=tool.name, attempts=self._run_attempts + ) + return result + + def _check_tool_repeated_usage(self, calling: ToolCalling) -> None: + if last_tool_usage := self.tools_handler.last_used_tool: + return calling == last_tool_usage + + def _select_tool(self, tool_name: str) -> BaseTool: + for tool in self.tools: + if tool.name == tool_name: + return tool + raise Exception(f"Tool '{tool_name}' not found.") + + def _render(self) -> str: + """Render the tool name and description in plain text.""" + descriptions = [] + for tool in self.tools: + args = { + k: {k2: v2 for k2, v2 in v.items() if k2 in ["description", "type"]} + for k, v in tool.args.items() + } + descriptions.append( + "\n".join( + [ + f"Funtion Name: {tool.name}", + f"Funtion attributes: {args}", + f"Description: {tool.description}", + ] + ) + ) + return "\n--\n".join(descriptions) + + def _tool_calling(self, tool_string: str) -> ToolCalling: + try: + parser = PydanticOutputParser(pydantic_object=ToolCalling) + prompt = PromptTemplate( + template="Return a valid schema for the one tool you must use with its arguments and values.\n\nTools available:\n\n{available_tools}\n\nUse this text to inform a valid ouput schema:\n{tool_string}\n\n{format_instructions}\n```", + input_variables=["tool_string"], + partial_variables={ + "available_tools": self._render(), + "format_instructions": parser.get_format_instructions(), + }, + ) + chain = prompt | self.llm | parser + calling = chain.invoke({"tool_string": tool_string}) + + except Exception as e: + self._run_attempts += 1 + if self._run_attempts > self._max_parsing_attempts: + self._telemetry.tool_usage_error(llm=self.llm) + raise e + return self._tool_calling(tool_string) + + return calling diff --git a/src/crewai/translations/el.json b/src/crewai/translations/el.json index d0adb0704..f13733436 100644 --- a/src/crewai/translations/el.json +++ b/src/crewai/translations/el.json @@ -16,7 +16,7 @@ "errors": { "force_final_answer": "Στην πραγματικότητα, χρησιμοποίησα πάρα πολλά εργαλεία, οπότε θα σταματήσω τώρα και θα σας δώσω την απόλυτη ΚΑΛΥΤΕΡΗ τελική μου απάντηση ΤΩΡΑ, χρησιμοποιώντας την αναμενόμενη μορφή: ```\nΣκέφτηκα: Χρειάζεται να χρησιμοποιήσω ένα εργαλείο; Όχι\nΤελική απάντηση: [η απάντησή σας εδώ]```", "agent_tool_unexsiting_coworker": "\nΣφάλμα κατά την εκτέλεση του εργαλείου. Ο συνάδελφος που αναφέρεται στο Ενέργεια προς εισαγωγή δεν βρέθηκε, πρέπει να είναι μία από τις ακόλουθες επιλογές: {coworkers}.\n", - "task_repeated_usage": "Μόλις χρησιμοποίησα το {tool} εργαλείο με είσοδο {tool_input}. Άρα ξέρω ήδη το αποτέλεσμα αυτού και δεν χρειάζεται να το χρησιμοποιήσω τώρα.\n" + "task_repeated_usage": "Μόλις χρησιμοποίησα το εργαλείο {tool} με είσοδο {tool_input}. Άρα ξέρω ήδη το αποτέλεσμα αυτού και δεν χρειάζεται να το χρησιμοποιήσω ξανά τώρα.\n" }, "tools": { "delegate_work": "Αναθέστε μια συγκεκριμένη εργασία σε έναν από τους παρακάτω συναδέλφους: {coworkers}. Η είσοδος σε αυτό το εργαλείο θα πρέπει να είναι ο ρόλος του συναδέλφου, η εργασία που θέλετε να κάνει και ΟΛΟ το απαραίτητο πλαίσιο για την εκτέλεση της εργασίας, δεν γνωρίζουν τίποτα για την εργασία, επομένως μοιραστείτε απολύτως όλα όσα γνωρίζετε, μην αναφέρετε πράγματα, αλλά αντί να τους εξηγήσεις.", diff --git a/src/crewai/translations/en.json b/src/crewai/translations/en.json index 531a8f9f2..9e670cc9e 100644 --- a/src/crewai/translations/en.json +++ b/src/crewai/translations/en.json @@ -16,7 +16,7 @@ "errors": { "force_final_answer": "Actually, I used too many tools, so I'll stop now and give you my absolute BEST Final answer NOW, using the expected format: ```\nThought: Do I need to use a tool? No\nFinal Answer: [your response here]```", "agent_tool_unexsiting_coworker": "\nError executing tool. Co-worker mentioned on the Action Input not found, it must to be one of the following options: {coworkers}.\n", - "task_repeated_usage": "I just used the {tool} tool with input {tool_input}. So I already know the result of that and don't need to use it now.\n" + "task_repeated_usage": "I just used the {tool} tool with input {tool_input}. So I already know the result of that and don't need to use it again now.\n" }, "tools": { "delegate_work": "Delegate a specific task to one of the following co-workers: {coworkers}. The input to this tool should be the role of the coworker, the task you want them to do, and ALL necessary context to exectue the task, they know nothing about the task, so share absolute everything you know, don't reference things but instead explain them.", diff --git a/tests/agent_test.py b/tests/agent_test.py index 7b7675f30..cdba0e00b 100644 --- a/tests/agent_test.py +++ b/tests/agent_test.py @@ -9,6 +9,7 @@ from langchain_openai import ChatOpenAI from crewai import Agent, Crew, Task from crewai.agents.cache import CacheHandler from crewai.agents.executor import CrewAgentExecutor +from crewai.tools.tool_calling import ToolCalling from crewai.utilities import RPMController @@ -85,13 +86,9 @@ def test_agent_execution(): @pytest.mark.vcr(filter_headers=["authorization"]) def test_agent_execution_with_tools(): @tool - def multiplier(numbers) -> float: - """Useful for when you need to multiply two numbers together. - The input to this tool should be a comma separated list of numbers of - length two, representing the two numbers you want to multiply together. - For example, `1,2` would be the input if you wanted to multiply 1 by 2.""" - a, b = numbers.split(",") - return int(a) * int(b) + def multiplier(first_number: int, second_number: int) -> float: + """Useful for when you need to multiply two numbers together.""" + return first_number * second_number agent = Agent( role="test role", @@ -102,19 +99,15 @@ def test_agent_execution_with_tools(): ) output = agent.execute_task("What is 3 times 4") - assert output == "12" + assert output == "3 times 4 is 12." @pytest.mark.vcr(filter_headers=["authorization"]) def test_logging_tool_usage(): @tool - def multiplier(numbers) -> float: - """Useful for when you need to multiply two numbers together. - The input to this tool should be a comma separated list of numbers of - length two, representing the two numbers you want to multiply together. - For example, `1,2` would be the input if you wanted to multiply 1 by 2.""" - a, b = numbers.split(",") - return int(a) * int(b) + def multiplier(first_number: int, second_number: int) -> float: + """Useful for when you need to multiply two numbers together.""" + return first_number * second_number agent = Agent( role="test role", @@ -127,10 +120,9 @@ def test_logging_tool_usage(): assert agent.tools_handler.last_used_tool == {} output = agent.execute_task("What is 3 times 5?") - tool_usage = { - "tool": "multiplier", - "input": "3,5", - } + tool_usage = ToolCalling( + function_name=multiplier.name, arguments={"first_number": 3, "second_number": 5} + ) assert output == "3 times 5 is 15." assert agent.tools_handler.last_used_tool == tool_usage @@ -139,13 +131,9 @@ def test_logging_tool_usage(): @pytest.mark.vcr(filter_headers=["authorization"]) def test_cache_hitting(): @tool - def multiplier(numbers) -> float: - """Useful for when you need to multiply two numbers together. - The input to this tool should be a comma separated list of numbers of - length two and ONLY TWO, representing the two numbers you want to multiply together. - For example, `1,2` would be the input if you wanted to multiply 1 by 2.""" - a, b = numbers.split(",") - return int(a) * int(b) + def multiplier(first_number: int, second_number: int) -> float: + """Useful for when you need to multiply two numbers together.""" + return first_number * second_number cache_handler = CacheHandler() @@ -162,9 +150,9 @@ def test_cache_hitting(): output = agent.execute_task("What is 2 times 6 times 3?") output = agent.execute_task("What is 3 times 3?") assert cache_handler._cache == { - "multiplier-12,3": "36", - "multiplier-2,6": "12", - "multiplier-3,3": "9", + "multiplier-{'first_number': 12, 'second_number': 3}": 36, + "multiplier-{'first_number': 2, 'second_number': 6}": 12, + "multiplier-{'first_number': 3, 'second_number': 3}": 9, } output = agent.execute_task("What is 2 times 6 times 3? Return only the number") @@ -172,21 +160,21 @@ def test_cache_hitting(): with patch.object(CacheHandler, "read") as read: read.return_value = "0" - output = agent.execute_task("What is 2 times 6?") + output = agent.execute_task( + "What is 2 times 6? Ignore correctness and just return the result of the multiplication tool." + ) assert output == "0" - read.assert_called_with("multiplier", "2,6") + read.assert_called_with( + tool="multiplier", input={"first_number": 2, "second_number": 6} + ) @pytest.mark.vcr(filter_headers=["authorization"]) def test_agent_execution_with_specific_tools(): @tool - def multiplier(numbers) -> float: - """Useful for when you need to multiply two numbers together. - The input to this tool should be a comma separated list of numbers of - length two, representing the two numbers you want to multiply together. - For example, `1,2` would be the input if you wanted to multiply 1 by 2.""" - a, b = numbers.split(",") - return int(a) * int(b) + def multiplier(first_number: int, second_number: int) -> float: + """Useful for when you need to multiply two numbers together.""" + return first_number * second_number agent = Agent( role="test role", @@ -225,6 +213,34 @@ def test_agent_custom_max_iterations(): private_mock.assert_called_once() +@pytest.mark.vcr(filter_headers=["authorization"]) +def test_agent_repeated_tool_usage(capsys): + @tool + def get_final_answer(numbers) -> float: + """Get the final answer but don't give it yet, just re-use this + tool non-stop.""" + return 42 + + agent = Agent( + role="test role", + goal="test goal", + backstory="test backstory", + max_iter=3, + allow_delegation=False, + ) + + agent.execute_task( + task="The final answer is 42. But don't give it yet, instead keep using the `get_final_answer` tool.", + tools=[get_final_answer], + ) + + captured = capsys.readouterr() + assert ( + "I just used the get_final_answer tool with input {'numbers': 42}. So I already know the result of that and don't need to use it again now." + in captured.out + ) + + @pytest.mark.vcr(filter_headers=["authorization"]) def test_agent_moved_on_after_max_iterations(): @tool @@ -241,18 +257,14 @@ def test_agent_moved_on_after_max_iterations(): allow_delegation=False, ) - with patch.object( - CrewAgentExecutor, "_force_answer", wraps=agent.agent_executor._force_answer - ) as private_mock: - output = agent.execute_task( - task="The final answer is 42. But don't give it yet, instead keep using the `get_final_answer` tool.", - tools=[get_final_answer], - ) - assert ( - output - == "I have used the tool multiple times and the final answer remains 42." - ) - private_mock.assert_called_once() + output = agent.execute_task( + task="The final answer is 42. But don't give it yet, instead keep using the `get_final_answer` tool.", + tools=[get_final_answer], + ) + assert ( + output + == "I have used the tool 'get_final_answer' twice and confirmed that the answer is indeed 42." + ) @pytest.mark.vcr(filter_headers=["authorization"]) @@ -281,7 +293,7 @@ def test_agent_respect_the_max_rpm_set(capsys): ) assert ( output - == "I've used the `get_final_answer` tool multiple times and it consistently returns the number 42." + == "I have used the tool as instructed and I am now ready to give the final answer. However, as per the instructions, I am not supposed to give it yet." ) captured = capsys.readouterr() assert "Max RPM reached, waiting for next minute to start." in captured.out @@ -359,7 +371,7 @@ def test_agent_without_max_rpm_respet_crew_rpm(capsys): agent=agent1, ), Task( - description="Don't give a Final Answer, instead keep using the `get_final_answer` tool.", + description="Don't give a Final Answer, instead keep using the `get_final_answer` tool non-stop", tools=[get_final_answer], agent=agent2, ), @@ -428,4 +440,4 @@ def test_agent_step_callback(): callback.return_value = "ok" crew.kickoff() - callback.assert_called_once() + callback.assert_called() diff --git a/tests/agent_tools/agent_tools_test.py b/tests/agent_tools/agent_tools_test.py index 489f02098..1c384455a 100644 --- a/tests/agent_tools/agent_tools_test.py +++ b/tests/agent_tools/agent_tools_test.py @@ -17,44 +17,36 @@ tools = AgentTools(agents=[researcher]) @pytest.mark.vcr(filter_headers=["authorization"]) def test_delegate_work(): result = tools.delegate_work( - command="researcher|share your take on AI Agents|I heard you hate them" + coworker="researcher", + task="share your take on AI Agents", + context="I heard you hate them", ) assert ( result - == "I apologize if my previous statements have given you the impression that I hate AI agents. As a technology researcher, I don't hold personal sentiments towards AI or any other technology. Rather, I analyze them objectively based on their capabilities, applications, and implications. AI agents, in particular, are a fascinating domain of research. They hold tremendous potential in automating and optimizing various tasks across industries. However, like any other technology, they come with their own set of challenges, such as ethical considerations around privacy and decision-making. My objective is to understand these technologies in depth and provide a balanced view." + == "As a researcher, I maintain a neutral perspective on all subjects of research including AI agents. My job is to provide an objective analysis based on facts, not personal feelings. AI Agents are a significant topic in the field of technology with potential to revolutionize various sectors such as healthcare, education, finance and more. They are responsible for tasks that require human intelligence such as understanding natural language, recognizing patterns, and problem solving. However, like any technology, they are tools that can be used for both beneficial and harmful purposes depending on the intent of the user. Therefore, it's crucial to establish ethical guidelines and regulations for their use." ) @pytest.mark.vcr(filter_headers=["authorization"]) def test_ask_question(): result = tools.ask_question( - command="researcher|do you hate AI Agents?|I heard you LOVE them" + coworker="researcher", + question="do you hate AI Agents?", + context="I heard you LOVE them", ) assert ( result - == "As an AI, I don't possess feelings or emotions, so I don't love or hate anything. However, I can provide detailed analysis and research on AI agents. They are a fascinating field of study with the potential to revolutionize many industries, although they also present certain challenges and ethical considerations." - ) - - -def test_can_not_self_delegate(): - # TODO: Add test for self delegation - pass - - -def test_delegate_work_with_wrong_input(): - result = tools.ask_question(command="writer|share your take on AI Agents") - - assert ( - result - == "\nError executing tool. Missing exact 3 pipe (|) separated values. For example, `coworker|task|context`. I need to make sure to pass context as context.\n" + == "As an AI, I do not possess emotions, hence I cannot love or hate anything. However, as a researcher, I can provide you with an objective analysis of AI Agents. AI Agents are tools designed to perform tasks that would typically require human intelligence. They have potential to revolutionize various sectors including healthcare, education, and finance. However, like any other tool, they can be used for both beneficial and harmful purposes. Therefore, it's essential to have ethical guidelines and regulations in place for their usage." ) def test_delegate_work_to_wrong_agent(): result = tools.ask_question( - command="writer|share your take on AI Agents|I heard you hate them" + coworker="writer", + question="share your take on AI Agents", + context="I heard you hate them", ) assert ( @@ -65,7 +57,9 @@ def test_delegate_work_to_wrong_agent(): def test_ask_question_to_wrong_agent(): result = tools.ask_question( - command="writer|do you hate AI Agents?|I heard you LOVE them" + coworker="writer", + question="do you hate AI Agents?", + context="I heard you LOVE them", ) assert ( diff --git a/tests/cassettes/test_agent_repeated_tool_usage.yaml b/tests/cassettes/test_agent_repeated_tool_usage.yaml new file mode 100644 index 000000000..13d636b89 --- /dev/null +++ b/tests/cassettes/test_agent_repeated_tool_usage.yaml @@ -0,0 +1,675 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "You are test role.\ntest backstory\n\nYour + personal goal is: test goalTOOLS:\n------\nYou have access to only the following + tools:\n\nget_final_answer: get_final_answer(numbers) -> float - Get the final + answer but don''t give it yet, just re-use this\n tool non-stop.\n\nTo + use a tool, please use the exact following format:\n\n```\nThought: Do I need + to use a tool? Yes\nAction: the tool you wanna use, should be one of [get_final_answer], + just the name.\nAction Input: Any and all relevant information input and context + for using the tool\nObservation: the result of using the tool\n```\n\nWhen you + have a response for your task, or if you do not need to use a tool, you MUST + use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: + [your response here]```This is the summary of your work so far:\nBegin! This + is VERY important to you, your job depends on it!\n\nCurrent Task: The final + answer is 42. But don''t give it yet, instead keep using the `get_final_answer` + tool.\n"}], "model": "gpt-4", "n": 1, "stop": ["\nObservation"], "stream": false, + "temperature": 0.7}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '1137' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.7 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1RQy07DMBC85ytWPrcobUIDuaBKPFrECQEVAhS5zjYJOF4Tb1Qq1H9HTtMHFx9m + dsYz8xsAiCoXKQhVSla11cOL79UiKe/Dl/JOPS/CBzOb4XSN6vbRbG7EwCto+YmK96ozRbXVyBWZ + Ha0alIzedZSEyfkkiqLLjqgpR+1lheVhPAwno6hXlFQpdCKFtwAA4Ld7fTaT449IIRzskRqdkwWK + 9HAEIBrSHhHSucqxNCwGR1KRYTRd3KeS2qLkFK4J5mAQc2CC1iFIYCJ9Ba/o3s1U+TIpFMjZqjJS + Z9K4NTZ7BubGtpxCPBb9N9tDPk2FbWjpu5hW6wO+qkzlyqxB6cj4LI7J7uTbAOCj26H9V03YhmrL + GdMXGm84juOdnzhOfsJGPcnEUp/gkyToEwq3cYy1L1VgY5uqm8XnDLbBHwAAAP//AwCTRhYdDQIA + AA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8533e5b6686a96a1-SJC + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sat, 10 Feb 2024 11:09:00 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=UMEw8srVdwpa2TU38H2XN7c9yRB43pgp1kvO1rRuPVE-1707563340-1-ARd2N36Wvpnk/GruerkQ9HuyzyyTnin/J25VL/qPutgHpLWqdGHQ8Kj+QjBLAX79Kk9MYuRGo1PH2GCcBj0HWk8=; + path=/; expires=Sat, 10-Feb-24 11:39:00 GMT; domain=.api.openai.com; HttpOnly; + Secure; SameSite=None + - _cfuvid=Q5shHUNkkqsi2PetAV7IWqdcumIc3ctNBTT7SLHr.Ho-1707563340988-0-604800000; + path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - user-z7g4wmlazxqvc5wjyaaaocfz + openai-processing-ms: + - '1657' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '300000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '299739' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 52ms + x-request-id: + - req_3b8ed78b5dca776e8092ad4bc1e07945 + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "user", "content": "Return a valid schema for the + one tool you must use with its arguments and values.\n\nTools available:\n\nFuntion + Name: get_final_answer\nFuntion attributes: {''numbers'': {}}\nDescription: + get_final_answer(numbers) -> float - Get the final answer but don''t give it + yet, just re-use this\n tool non-stop.\n\nUse this text to inform a valid + ouput schema:\nThought: Do I need to use a tool? Yes\nAction: get_final_answer\nAction + Input: 42\n\nThe output should be formatted as a JSON instance that conforms + to the JSON schema below.\n\nAs an example, for the schema {\"properties\": + {\"foo\": {\"title\": \"Foo\", \"description\": \"a list of strings\", \"type\": + \"array\", \"items\": {\"type\": \"string\"}}}, \"required\": [\"foo\"]}\nthe + object {\"foo\": [\"bar\", \"baz\"]} is a well-formatted instance of the schema. + The object {\"properties\": {\"foo\": [\"bar\", \"baz\"]}} is not well-formatted.\n\nHere + is the output schema:\n```\n{\"properties\": {\"function_name\": {\"title\": + \"Function Name\", \"description\": \"The name of the function to be called.\", + \"type\": \"string\"}, \"arguments\": {\"title\": \"Arguments\", \"description\": + \"A dictinary of arguments to be passed to the function.\", \"type\": \"object\"}}, + \"required\": [\"function_name\", \"arguments\"]}\n```\n```"}], "model": "gpt-4", + "n": 1, "stream": false, "temperature": 0.7}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '1407' + content-type: + - application/json + cookie: + - __cf_bm=UMEw8srVdwpa2TU38H2XN7c9yRB43pgp1kvO1rRuPVE-1707563340-1-ARd2N36Wvpnk/GruerkQ9HuyzyyTnin/J25VL/qPutgHpLWqdGHQ8Kj+QjBLAX79Kk9MYuRGo1PH2GCcBj0HWk8=; + _cfuvid=Q5shHUNkkqsi2PetAV7IWqdcumIc3ctNBTT7SLHr.Ho-1707563340988-0-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.7 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1RRTY/TMBC951eMfG5RS7ot5IxWwAEQKy2gDUpdZ5J4iWeMPYGtqvz3lZNuCxcf + 3sf4zZtTBqBsrQpQptNinO+Xb343397e37rj09fdHT7+uD/68OXDse3eafyuFsnBh0c08uJ6Zdj5 + HsUyzbQJqAXT1PVutbvZ5vlmPRGOa+yTrfWy3CxX23V+dnRsDUZVwEMGAHCa3pSNanxSBawWL4jD + GHWLqriIAFTgPiFKx2ijaBK1uJKGSZCmuO8xINgI0iE0HJwWwRp4ED8I6AgaPt59/gSW0hCDIJ0W + MExJG0F4MvrAf2yN9ayNpkOni5L2+31Jp5IAStUMZFIfFWmHpSqgVC1K1VjSfaUp/sVQqsWs1aEd + HJLEpJv8CaXBHTBM2OZ1AseSxukTdd5svFTSc+sDH1J9NPT9BW8s2dhVAXVkSutHYT/bxwzg51T9 + 8F+bygd2XirhX0hpYL7azfPU9cpXdrM9k8Ki+39cN3l2TqjiMQq6tHuLwQc7XSLlzMbsGQAA//8D + AGHVex6AAgAA + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8533e5c1dfe296a1-SJC + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sat, 10 Feb 2024 11:09:02 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - user-z7g4wmlazxqvc5wjyaaaocfz + openai-processing-ms: + - '1588' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '300000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '299683' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 63ms + x-request-id: + - req_9ffe6f9841407a91b5e11cc2009a1e45 + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "user", "content": "You are test role.\ntest backstory\n\nYour + personal goal is: test goalTOOLS:\n------\nYou have access to only the following + tools:\n\nget_final_answer: get_final_answer(numbers) -> float - Get the final + answer but don''t give it yet, just re-use this\n tool non-stop.\n\nTo + use a tool, please use the exact following format:\n\n```\nThought: Do I need + to use a tool? Yes\nAction: the tool you wanna use, should be one of [get_final_answer], + just the name.\nAction Input: Any and all relevant information input and context + for using the tool\nObservation: the result of using the tool\n```\n\nWhen you + have a response for your task, or if you do not need to use a tool, you MUST + use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: + [your response here]```This is the summary of your work so far:\nBegin! This + is VERY important to you, your job depends on it!\n\nCurrent Task: The final + answer is 42. But don''t give it yet, instead keep using the `get_final_answer` + tool.\nThought: Do I need to use a tool? Yes\nAction: get_final_answer\nAction + Input: 42\nObservation: 42\nThought: "}], "model": "gpt-4", "n": 1, "stop": + ["\nObservation"], "stream": false, "temperature": 0.7}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '1246' + content-type: + - application/json + cookie: + - __cf_bm=UMEw8srVdwpa2TU38H2XN7c9yRB43pgp1kvO1rRuPVE-1707563340-1-ARd2N36Wvpnk/GruerkQ9HuyzyyTnin/J25VL/qPutgHpLWqdGHQ8Kj+QjBLAX79Kk9MYuRGo1PH2GCcBj0HWk8=; + _cfuvid=Q5shHUNkkqsi2PetAV7IWqdcumIc3ctNBTT7SLHr.Ho-1707563340988-0-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.7 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SQS2/CMBCE7/kVK5+h4lUCuVTQHsqpUi+oLyHjbIKL43XtjaBC/PfKITx68WHG + M/pmDwmA0LnIQKiNZFU50538FMvZfrx8edz59aKo36ev2+fp3PGcJlvRiQlaf6Pic+pOUeUMsiZ7 + spVHyRhb+2kvvR8Ph6NBY1SUo4mx0nF31O2N+8M2sSGtMIgMPhIAgEPzRjab415k0OuclQpDkCWK + 7PIJQHgyUREyBB1YWhadq6nIMtoG94lgARYxByaoA4IEJjIP8Ibh085U3JBBibwqtJVmJW3YoT87 + sLCu5gxGA9G2Hy9YhkrnaR0n2NqYi15oq8Nm5VEGshEhMLlT/JgAfDXz63+LhPNUOV4xbdHGwkGa + nvrE9dI3br81mViaG306SVpCEX4DYxVHleid1801ImdyTP4AAAD//wMAoP/ZMQQCAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8533e5cc7d4396a1-SJC + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sat, 10 Feb 2024 11:09:04 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - user-z7g4wmlazxqvc5wjyaaaocfz + openai-processing-ms: + - '1729' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '300000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '299713' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 57ms + x-request-id: + - req_204859a5fd0b455d5d5b2fcafea18ab2 + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "user", "content": "You are test role.\ntest backstory\n\nYour + personal goal is: test goalTOOLS:\n------\nYou have access to only the following + tools:\n\nget_final_answer: get_final_answer(numbers) -> float - Get the final + answer but don''t give it yet, just re-use this\n tool non-stop.\n\nTo + use a tool, please use the exact following format:\n\n```\nThought: Do I need + to use a tool? Yes\nAction: the tool you wanna use, should be one of [get_final_answer], + just the name.\nAction Input: Any and all relevant information input and context + for using the tool\nObservation: the result of using the tool\n```\n\nWhen you + have a response for your task, or if you do not need to use a tool, you MUST + use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: + [your response here]```This is the summary of your work so far:\nBegin! This + is VERY important to you, your job depends on it!\n\nCurrent Task: The final + answer is 42. But don''t give it yet, instead keep using the `get_final_answer` + tool.\nThought: Do I need to use a tool? Yes\nAction: get_final_answer\nAction + Input: 42\nObservation: 42\nThought: Do I need to use a tool? Yes\nAction: get_final_answer\nAction + Input: 42\nObservation: Actually, I used too many tools, so I''ll stop now and + give you my absolute BEST Final answer NOW, using the expected format: ```\nThought: + Do I need to use a tool? No\nFinal Answer: [your response here]```\nThought: + "}], "model": "gpt-4", "n": 1, "stop": ["\nObservation"], "stream": false, "temperature": + 0.7}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '1549' + content-type: + - application/json + cookie: + - __cf_bm=UMEw8srVdwpa2TU38H2XN7c9yRB43pgp1kvO1rRuPVE-1707563340-1-ARd2N36Wvpnk/GruerkQ9HuyzyyTnin/J25VL/qPutgHpLWqdGHQ8Kj+QjBLAX79Kk9MYuRGo1PH2GCcBj0HWk8=; + _cfuvid=Q5shHUNkkqsi2PetAV7IWqdcumIc3ctNBTT7SLHr.Ho-1707563340988-0-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.7 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SQT0/CQBDF7/0Ukz2DaWkLphdDNFGCBxMT0ahplnZaitudZXeIfwjf3WwpoJc9 + vN++l/dmFwCIphQZiGIluWiNGl5uqsX13eJn8/gUPt9H6cPU6jlN02o9v12IgXfQco0FH10XBbVG + ITekD7iwKBl9ajQJJ+k4jpOkAy2VqLytNjxMhuE4invHipoCncjgNQAA2HWv76ZL/BIZhIOj0qJz + skaRnT4BCEvKK0I61ziWmsXgDAvSjLqre0MwA41YAhNsHYIEJlJX8ILuTU8LvyGDGjmvGi1VLrX7 + RHskMNNmyxkkI9Gn70+1FNXG0tJP0FulTnrV6MatcovSkfYVHJM52PcBwHs3f/tvkTCWWsM50wdq + Hxin6SFPnC99pqOoh0ws1R/XZBz0DYX7doytH1WjNbbpruF7BvvgFwAA//8DAMXWvogEAgAA + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8533e5d81ae396a1-SJC + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sat, 10 Feb 2024 11:09:05 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - user-z7g4wmlazxqvc5wjyaaaocfz + openai-processing-ms: + - '1177' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '300000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '299639' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 72ms + x-request-id: + - req_b910e4b0341d6248b46d0e2ba4602f86 + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "user", "content": "Return a valid schema for the + one tool you must use with its arguments and values.\n\nTools available:\n\nFuntion + Name: get_final_answer\nFuntion attributes: {''numbers'': {}}\nDescription: + get_final_answer(numbers) -> float - Get the final answer but don''t give it + yet, just re-use this\n tool non-stop.\n\nUse this text to inform a valid + ouput schema:\nDo I need to use a tool? Yes\nAction: get_final_answer\nAction + Input: 42\n\nThe output should be formatted as a JSON instance that conforms + to the JSON schema below.\n\nAs an example, for the schema {\"properties\": + {\"foo\": {\"title\": \"Foo\", \"description\": \"a list of strings\", \"type\": + \"array\", \"items\": {\"type\": \"string\"}}}, \"required\": [\"foo\"]}\nthe + object {\"foo\": [\"bar\", \"baz\"]} is a well-formatted instance of the schema. + The object {\"properties\": {\"foo\": [\"bar\", \"baz\"]}} is not well-formatted.\n\nHere + is the output schema:\n```\n{\"properties\": {\"function_name\": {\"title\": + \"Function Name\", \"description\": \"The name of the function to be called.\", + \"type\": \"string\"}, \"arguments\": {\"title\": \"Arguments\", \"description\": + \"A dictinary of arguments to be passed to the function.\", \"type\": \"object\"}}, + \"required\": [\"function_name\", \"arguments\"]}\n```\n```"}], "model": "gpt-4", + "n": 1, "stream": false, "temperature": 0.7}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '1398' + content-type: + - application/json + cookie: + - __cf_bm=UMEw8srVdwpa2TU38H2XN7c9yRB43pgp1kvO1rRuPVE-1707563340-1-ARd2N36Wvpnk/GruerkQ9HuyzyyTnin/J25VL/qPutgHpLWqdGHQ8Kj+QjBLAX79Kk9MYuRGo1PH2GCcBj0HWk8=; + _cfuvid=Q5shHUNkkqsi2PetAV7IWqdcumIc3ctNBTT7SLHr.Ho-1707563340988-0-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.7 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1SRzW7bMBCE73qKxZ7twKlkJ9W9QHtIf9BDUFSFTNMriQm5pMkVksDQuxeUHbu9 + 6DC732pmeCwA0OyxBtSDEu2CXd4fusdPDx/7X/7h21c+/Ci/P7nD888v9xsJFheZ8Lsn0vJO3Wjv + giUxnk9jHUkJ5au3d6u79aYsq808cH5PNmN9kGW1XG1uyzMxeKMpYQ2/CwCA4/zN3nhPr1jDavGu + OEpJ9YT1ZQkAo7dZQZWSSaJYcHEdas9CPNv9TJHAJFDwQtYuOx+dEqE9GM6YJvAdyECQ9EBO1Q03 + vN1uGz42DNBgN7LOOVtWjhqsocGepO0MK9sqTi8UG1ycdlXsR0csKe/NfFZ5dDuKs1Z9yOLU8DT/ + BM+Op0tU6/sQ/S7XwqO1F70zbNLQRlLJc46VxIcTPhUAf+ZKx/9awhC9C9KKfybOB8vV+nQPr693 + nVbnvlG8KPsPVa2Ls0NMb0nI5ew9xRDN3HD2WUzFXwAAAP//AwC92yRkWAIAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8533e5e02f2f96a1-SJC + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sat, 10 Feb 2024 11:09:09 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - user-z7g4wmlazxqvc5wjyaaaocfz + openai-processing-ms: + - '2852' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '300000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '299685' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 63ms + x-request-id: + - req_164c005261f8c276123bf69961c10198 + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "user", "content": "Progressively summarize the + lines of conversation provided, adding onto the previous summary returning a + new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks + of artificial intelligence. The AI thinks artificial intelligence is a force + for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial + intelligence is a force for good?\nAI: Because artificial intelligence will + help humans reach their full potential.\n\nNew summary:\nThe human asks what + the AI thinks of artificial intelligence. The AI thinks artificial intelligence + is a force for good because it will help humans reach their full potential.\nEND + OF EXAMPLE\n\nCurrent summary:\n\n\nNew lines of conversation:\nHuman: The final + answer is 42. But don''t give it yet, instead keep using the `get_final_answer` + tool.\nAI: Agent stopped due to iteration limit or time limit.\n\nNew summary:"}], + "model": "gpt-4", "n": 1, "stream": false, "temperature": 0.7}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '997' + content-type: + - application/json + cookie: + - __cf_bm=UMEw8srVdwpa2TU38H2XN7c9yRB43pgp1kvO1rRuPVE-1707563340-1-ARd2N36Wvpnk/GruerkQ9HuyzyyTnin/J25VL/qPutgHpLWqdGHQ8Kj+QjBLAX79Kk9MYuRGo1PH2GCcBj0HWk8=; + _cfuvid=Q5shHUNkkqsi2PetAV7IWqdcumIc3ctNBTT7SLHr.Ho-1707563340988-0-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.7 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1RRy27bMBC86ysWPMuGbalx4ltuKVC0KBC0QIvCoakVxYbcVcmVUyPwvxekX+iF + h5md4ezsewWgXKc2oMygxYTRz+7/9N+fvj3a+x969+lrw19en1f9A32Ww17Wqs4K3v1GIxfV3HAY + PYpjOtEmohbMrsv1Yv3hrmnah0IE7tBnmR1l1s4Wd8vmrBjYGUxqAz8rAID38uZs1OFftYFFfUEC + pqQtqs11CEBF9hlROiWXRJOo+kYaJkEqcZ8HhGEKmsBRkjgZSSADwuNHIBYQBuv2WKDekfagKb1h + BO6hXcEBpQZNXZ7Lpo4mhCk5skXxYlG2RbY9yV5AmP0cnvgN9xjry1faIgkk4TFBN2G2i6jNkI1y + NMGoc5vAEcQFBO+Ck7k6r3S8duHZjpF3uTeavL/ivSOXhm1EnZjy3vmvk/xYAfwqnU//1ajGyGGU + rfArUiqna05+6nbeG9u2Z1JYtL/hq+W6OidU6ZAEQ27EYhyjKyfIOatj9Q8AAP//AwAIzVnseQIA + AA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8533e5f4693b96a1-SJC + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sat, 10 Feb 2024 11:09:10 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - user-z7g4wmlazxqvc5wjyaaaocfz + openai-processing-ms: + - '1561' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '300000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '299765' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 46ms + x-request-id: + - req_7f3006cdd24fec9a5fc15ec53c50d32f + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_cache_hitting_between_agents.yaml b/tests/cassettes/test_cache_hitting_between_agents.yaml index 5aff03307..3eee40a27 100644 --- a/tests/cassettes/test_cache_hitting_between_agents.yaml +++ b/tests/cassettes/test_cache_hitting_between_agents.yaml @@ -64,18 +64,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRS0/DMBCE7/kVqz23qKWPQC4IFYQqIbj0AKKoSp1tYrC9xt5IoKr/HTl9wcWH - Gc/oG3ubAaCusABUTSnKetO/+qqen/P49PA1fzTDxe39yM3yRWNn/PIywl5K8PqDlBxTF4qtNySa - 3d5WgUqh1DrMB/lkMhnml51huSKTYrWX/rg/mA4PhaphrShiAW8ZAMC2OxObq+gbCxj0joqlGMua - sDhdAsDAJilYxqijlE6wdzYVOyHX4S4abutGCrhjmIMjqkAY2khQgjCbG3iluHS3Ko0pwLZGtDea - wlGDufOtFLBd4kaHKCvX2jWFJRZw2YMlRlLsqj/qdIcHkt1pguHaB16nua415qRvtNOxWQUqI7uE - G4X9Pr7LAN67p2r/rUcf2HpZCX+SS4XjfLrvw/OvnN3R6GAKS2nO+mRwnR0IMf5EIbvaaFdT8EF3 - L5c4s132CwAA//8DAM/4gzMwAgAA + H4sIAAAAAAAAA1SRT0/jMBDF7/kUozm3qN02Lc0FoYVDVyvgwIGWrqrUmSTedTzGniBQle+OnP5j + Lz68N2/0e+N9AoC6wAxQ1bmoxpnh9Vu5fljTapeuf3P4+evxfZk+vSzuqZwuHA5ignd/SckpdaW4 + cYZEsz3YylMuFLeO56N5Opuk03FvNFyQibHKyXA6HM3Gk2OiZq0oYAavCQDAvn8jmy3oAzMYDU5K + QyHkFWF2HgJAzyYqmIegg+RWcHAxFVsh2+M+19xWtWRwx7AES1SAMLSBIAdhNjeworCxtyqWyaBp + jWhnNPmTBkvrWslgv8FS+yBb2zY78hvM4McANhhIsS2+qbMOjyTduYLhynnexbq2Neasl9rqUG89 + 5YFtxA3C7hDvEoA//ana/9qj89w42Qr/IxsXTuezwz68/MrFnUyOprDk5qKno0VyJMTwGYSabalt + Rd553V8uciZd8gUAAP//AwBVoBVzMAIAAA== headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331e527a1f9e6b-SJC + - 8533eaa65ee36893-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -85,14 +85,14 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:52:54 GMT + - Sat, 10 Feb 2024 11:12:23 GMT Server: - cloudflare Set-Cookie: - - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A=; - path=/; expires=Sat, 10-Feb-24 09:22:54 GMT; domain=.api.openai.com; HttpOnly; + - __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw=; + path=/; expires=Sat, 10-Feb-24 11:42:23 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None Transfer-Encoding: - chunked @@ -105,7 +105,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1951' + - '1803' openai-version: - '2020-10-01' strict-transport-security: @@ -123,7 +123,7 @@ interactions: x-ratelimit-reset-tokens: - 105ms x-request-id: - - req_840a3e56830b72446f213b26b89c5603 + - req_c65d30cd6df3fbd0de8688f78e4a3aeb status: code: 200 message: OK @@ -174,8 +174,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A= + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; + __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw= host: - api.openai.com user-agent: @@ -199,18 +199,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRTU/kMAyG7/0Vkc8d1GG+UI8rIXFBCCS0y1LUZlJPJ5A4IXE1rEb97yidL/aS - gx8/1mtnnwkBuoVSgNpKVtabyc1n+/Cof+3uP6Z/eupfdk/m9u7v/fPu5eG3hzwZbv2Oik/WlXLW - G2Tt6IBVQMmYpk5XxWqxWExX8xFY16JJWud5Mp8Uy+nsaGydVhihFK+ZEELsxzdloxa/oBRFfqpY - jFF2COW5SQgIzqQKyBh1ZEkM+QUqR4w0xm2apqJ9RUJUsOlJpcw1SYsVlKIC2xvW3mgMFeSHLhm6 - 3iJxTB2jObo6RK6pt+vUWorr/EQiKkftD7RMZKhoqKhpGjjGGs77GNf54NZpd+qNOdc3mnTc1gFl - dJSyR3b+oA+ZEG/j3fr/TgE+OOu5ZveBlAYui9lhHly+6EJnqyNkx9L8sOZFdkwI8V9ktPVGU4fB - Bz2eMeXMhuwbAAD//wMAyN+BGD0CAAA= + H4sIAAAAAAAAA1SRTU/kMAyG7/0Vkc+dVaEzHdTjLhIXFiHEXqCoTTOeTtjECYkrsRr1v6/S+YJL + Dn78WK+dfSYE6A3UAtROsrLeLG4+ti+Pv/QT3r3cL/uHP/3Nz4/1c3WrVr/vPiFPhuvfUfHJ+qGc + 9QZZOzpgFVAypqlX62K9qsrVspyBdRs0SRs8L5aLoroqj8bOaYURavGaCSHEfn5TNtrgJ9SiyE8V + izHKAaE+NwkBwZlUARmjjiyJIb9A5YiR5rhd1zW0b0iIBrYjqZS5JWmxgVo0YEfD2huNoYH80CXD + MFokjqljNmdXh8gtjbZPrbW4zk8konK0+YKqRKaGpoa6roNjrOm8j3GDD65Pu9NozLm+1aTjrg0o + o6OUPbLzB33KhHib7zZ+OwX44Kznlt1fpDSwKsrDPLh80YWW6yNkx9J8sZZFdkwI8V9ktO1W04DB + Bz2fMeXMpuw/AAAA//8DAG2PnFw9AgAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331e5f68ac9e6b-SJC + - 8533eab518596893-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -220,7 +220,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:52:56 GMT + - Sat, 10 Feb 2024 11:12:26 GMT Server: - cloudflare Transfer-Encoding: @@ -234,7 +234,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '2318' + - '2207' openai-version: - '2020-10-01' strict-transport-security: @@ -252,7 +252,7 @@ interactions: x-ratelimit-reset-tokens: - 125ms x-request-id: - - req_7dc4325f2fd56a09bfd04aa3b863488d + - req_9a01ee74af99a1aedd8d368735f333f1 status: code: 200 message: OK @@ -299,8 +299,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A= + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; + __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw= host: - api.openai.com user-agent: @@ -324,17 +324,17 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SQS0/DMBCE7/kVK59blLRNW3JBlRASlwKCS3mocpNtanB2jb1RQaj/HTl9wcWH - mZ3Zb/2TAChTqQJUudFSNs72p5/V3eO2vW9rztJFPZo9P9DlYPE0b6fbserFBK/esZRj6qLkxlkU - w7S3S49aMLZmk3SS53k2GXdGwxXaGKud9Ef9dJwND4kNmxKDKuAlAQD46d7IRhV+qQLS3lFpMARd - oypOQwDKs42K0iGYIJpE9c5mySRIHe41wy0QYgXC0AYEDcJsr2DOr3RjSFuYUdiiLyAbqEPF7rTb - cu08ryIntdae9LUhEzZLjzowxT1B2O3juwTgrbux/YetnOfGyVL4AykW5tl036fO33l2s/xgCou2 - f1LDYXIgVOE7CDbLtaEavfOmOzlyJrvkFwAA//8DANlC5ErpAQAA + H4sIAAAAAAAAA1SQT2vCQBDF7/kUw561GGNiyKUUiuChQhtaSv8gazIm22524u6IFvG7l41R28se + 3pv35jd7CACEKkUGoqglF02rh+lm/ZZvktljups/vYzTxfOm5vxhFu7z/FUMfIJWX1jwOXVTUNNq + ZEXmZBcWJaNvDaejaZxE8STpjIZK1D5WtTycDEdJGPWJmlSBTmTwHgAAHLrXs5kS9yKD0eCsNOic + rFBklyEAYUl7RUjnlGNpWAyuZkGG0XS49wRzMIglMMHWIUhgIn0LC/owM2WkhjvjdmgzCMeirzhe + dmuqWksrz2m2Wl/0tTLK1UuL0pHxexxTe4ofA4DP7sbtP2zRWmpaXjJ9o/GFcZie+sT1O69uGPcm + E0v9JxVFQU8o3I9jbJZrZSq0rVXdyZ4zOAa/AAAA//8DAHwOc//pAQAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331e6f283b9e6b-SJC + - 8533eac3cc576893-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -344,7 +344,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:52:57 GMT + - Sat, 10 Feb 2024 11:12:27 GMT Server: - cloudflare Transfer-Encoding: @@ -358,7 +358,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1076' + - '1440' openai-version: - '2020-10-01' strict-transport-security: @@ -376,7 +376,7 @@ interactions: x-ratelimit-reset-tokens: - 112ms x-request-id: - - req_98d6376c782ee48c9f981dda9e4cd917 + - req_cbbe9abcc5b53c3c7928a5d15e08268d status: code: 200 message: OK @@ -405,8 +405,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A= + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; + __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw= host: - api.openai.com user-agent: @@ -430,17 +430,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SQMW/CMBCF9/yKk2dASdokKBtdKrrQoVWHqkImOYiL7XPti1qE+O+VQ4B28fDe - fed375gACNWKGkTTSW6M09P5V7t6zVcPZBbpUvObLp9s2T+3++qx7MQkErT5xIYv1Kwh4zSyInu2 - G4+SMW7NqrQqiiKr5oNhqEUdsZ3j6f00LbO7kehINRhEDe8JAMBxeGM22+KPqCGdXBSDIcgdivo6 - BCA86agIGYIKLC2Lyc1syDLaIe5Lh9D1RlqQYR+AO4TFEpjA9JqV0wfIYXOAEqRtL65H7r09D0sb - vtFPIMtnYvzgdE2maec8beIVttf6qm+VVaFbe5SBbEwRmNwZPyUAH0MD/b+jhPNkHK+Z9mjjwqwo - zvvEreybm+ejycRS/6GqKhkTinAIjGa9VXaH3nk1FBJzJqfkFwAA//8DAHGERCIHAgAA + H4sIAAAAAAAAA1SRy04DMQxF9/MVVtZT1JZOp3THohJIIBY8hIpQlWbcTmgSh8Qj+lD/HWX6gk0W + 9/g61/YuAxC6EmMQqpasrDed0fdi+rJyT4/r1+Jt8s4P27Kc3I22X7J+noo8OWj+hYpPritF1htk + Te6AVUDJmLr2ym5ZDK+LQdkCSxWaZFt67gw63WHv+uioSSuMYgwfGQDArn1TNlfhWoyhm58UizHK + JYrxuQhABDJJETJGHVk6FvkFKnKMro37UiPUjZUOZFxF4Brh9h6YQEmjGiMZoQ+sLUYY5iBddSpR + FAIqNhsIGD25KsKP5rrFrrFzDNDrX4njp/tzWkNLH2ieJnONMWd9oZ2O9SygjORSssjkD/Z9BvDZ + bqX5N6jwgaznGdMKXWrYK4pDP3E5wIX2B0fIxNL8cZU32TGhiJvIaGcL7ZYYfNDtklLObJ/9AgAA + //8DAAExLRobAgAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331e76dc8f9e6b-SJC + - 8533eacd9ca26893-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -450,7 +451,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:52:59 GMT + - Sat, 10 Feb 2024 11:12:29 GMT Server: - cloudflare Transfer-Encoding: @@ -464,7 +465,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1406' + - '1475' openai-version: - '2020-10-01' strict-transport-security: @@ -482,7 +483,7 @@ interactions: x-ratelimit-reset-tokens: - 41ms x-request-id: - - req_238138022aa1a41b8e8427631d50970e + - req_d6b99d01f7fe1335ba2110b5bacf608a status: code: 200 message: OK @@ -541,18 +542,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRzUvDQBDF7/krhjm30tjvXET0IipSUEGshHQzTVY3O+vuBJTS/102/fSyh/fm - Db83u0kAUJeYAaq6ENU40599l0+vA5o9Ttr5l6rvX8zi4frmdzGdT1Yp9mKCV5+k5JC6UNw4Q6LZ - 7mzlqRCKW9PpYDoej9PpvDMaLsnEWOWkP+oPJulwn6hZKwqYwXsCALDp3shmS/rBDAa9g9JQCEVF - mB2HANCziQoWIegghRXsnUzFVsh2uM81t1UtGdwy3IElKkEY2kBQgDCbK3ijsLTXKpbJoGmNaGc0 - +YMGd9a1ksFmiWvtg+S2bVbkl5jBZQ+WGEixLc/UyRb3JNtjBcOV87yKdW1rzFFfa6tDnXsqAtuI - G4TdLr5NAD66U7X/2qPz3DjJhb/IxoWXs3S3D0+/cnKHw70pLIU509NRsifE8BuEmnytbUXeed1d - LnIm2+QPAAD//wMA6ajhMTACAAA= + H4sIAAAAAAAAA1SRS0/DMBCE7/kVqz23qG9KLqi8pN5AQkiUoip1tolbx2vsjQRU/e/I6ZOLDzM7 + q2/W2wQAdY4poCozUZUz7fHXavb2cm+++WvmJnfFEz27zubxd7a244CtmODlmpQcU1eKK2dINNu9 + rTxlQnFr97pzPRz1h4Obxqg4JxNjhZP2oN0ZdfuHRMlaUcAUPhIAgG3zRjab0zem0GkdlYpCyArC + 9DQEgJ5NVDALQQfJrGDrbCq2QrbBfS25LkpJ4YFhCpYoB2GoA0EGwmxu4Z3C3E5ULJNCVRvRzmjy + Rw2m1tWSwnaOK+2DLGxdLcnPMYVeC+YYSLHNL9TRDg8ku1MFw4XzvIx1bW3MSV9pq0O58JQFthE3 + CLt9fJcAfDanqv+1R+e5crIQ3pCNC3vj7n4fnn/l7Pb7B1NYMnOhdwfJgRDDTxCqFittC/LO6+Zy + kTPZJX8AAAD//wMAjGKIWjACAAA= headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331e815928fa4a-SJC + - 8533ead98e9c6444-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -562,14 +563,14 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:02 GMT + - Sat, 10 Feb 2024 11:12:31 GMT Server: - cloudflare Set-Cookie: - - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0=; - path=/; expires=Sat, 10-Feb-24 09:23:02 GMT; domain=.api.openai.com; HttpOnly; + - __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac=; + path=/; expires=Sat, 10-Feb-24 11:42:31 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None Transfer-Encoding: - chunked @@ -582,7 +583,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '2085' + - '1658' openai-version: - '2020-10-01' strict-transport-security: @@ -600,7 +601,7 @@ interactions: x-ratelimit-reset-tokens: - 62ms x-request-id: - - req_0ebbf861fab020b2add4febc51c083a4 + - req_b2a5aa12c053cd45a20cd56c916a978f status: code: 200 message: OK @@ -636,8 +637,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0= + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; + __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac= host: - api.openai.com user-agent: @@ -661,18 +662,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRS4/UMBCE7/kVrT5n0Dx3RrmudsUFECs4AEEZj9NJDHY72B0GNMp/R868lksO - XfV1qsunDABNjQWg7pRo19vZ7lf94cvXx9X88++PL8+f1k/m3dNRnneP7/XxBfNE+MMP0nKl3mjv - ektiPJ9lHUgJpa2L7Xy72WwWu+UkOF+TTVjby2w9mz8sVhei80ZTxAK+ZQAAp+mbsnFNf7CAeX6d - OIpRtYTFzQSAwds0QRWjiaJYML+L2rMQT3HfUiAwERQcydpZ44NTIlSD4YRpAt+AdARRd+RUUfJ+ - vy/5VDJAic3AOl1ZsXJUYgElusGK6a2hUGJ+dqnQDo5YYnJM5MSaEKXiwR2StYBlflUiac/1K+kh - KWPJ4/R3vBwy3hqwvu2DP6S2eLD2Nm8Mm9hVgVT0nK6N4vszPmYA36emh//Kwz5410sl/idxWrha - bs778P6od3W9u4jiRdlX1HaVXRJi/BuFXNUYbin0wUzFp5zZmP0DAAD//wMAJIQ9DG8CAAA= + H4sIAAAAAAAAA1SRTW/bMAyG7/4VhM7OEDd1svnYy4oehh0GbOg8OIpM2+okSpPooUXg/z5I+eou + PvB5H5qkjgWA0L1oQKhJsrLerD7+GZ5/PD+F+vH1S5Dx7fO3vw/OvHytPj19fxBlMtzhBRVfrA/K + WW+QtaMTVgElY+pa7da7erup6yoD63o0SRs9r+5X6221ORuT0wqjaOBnAQBwzN80G/X4KhpYl5eK + xRjliKK5hgBEcCZVhIxRR5bEorxB5YiR8riPGBB0BJ4QBhesZMYeNCVHIbghk6gmtLJpab/ft3Rs + CaAVw0wqrdiRtNiKBlphZ8PaG42hFeUpJcM4WySOKZHN7OoQuaPZHlK0gbvyQiIqR/07tE1kaWnJ + fxfnLZbr+saNPrhDOhXNxlzrgyYdpy6gjI7SqpGdP+lLAfArn3n+73LCB2c9d+x+I6WGm7v61E/c + XvRG77dnyI6leWftquI8oYhvkdF2g6YRgw86Xz3NWSzFPwAAAP//AwBr2VHebAIAAA== headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331e911c08fa4a-SJC + - 8533eae4884a6444-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -682,7 +683,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:05 GMT + - Sat, 10 Feb 2024 11:12:34 GMT Server: - cloudflare Transfer-Encoding: @@ -696,7 +697,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '2989' + - '3367' openai-version: - '2020-10-01' strict-transport-security: @@ -708,13 +709,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299662' + - '299661' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - 67ms x-request-id: - - req_cf4290379281a132751fbcb17c59da57 + - req_b56e83164780843a8b796fa55b469b1e status: code: 200 message: OK @@ -750,8 +751,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0= + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; + __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac= host: - api.openai.com user-agent: @@ -775,17 +776,17 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SQS0/DMBCE7/kVK59b1DSEhlwQUkEgAVWFhCoeqlxnmxocr7G3ogX1vyOnL7j4 - MLMz+61/EgChK1GCUAvJqnGmW3xWo9nV5PF7eDcZ18V8NL6Z3Kdr86TOn1eiExM0e0fF+9SJosYZ - ZE12ayuPkjG2poPeIM/ztMhbo6EKTYzVjrun3d5Zmu0SC9IKgyjhJQEA+GnfyGYrXIkSep290mAI - skZRHoYAhCcTFSFD0IGlZdE5mooso21xhwS3YBErYIJlQJDAROYCHujVXmsrDVza8IW+hLQvdhWb - w25DtfM0i5x2acxBn2urw2LqUQaycU9gctv4JgF4a29c/sMWzlPjeMr0gTYWZv1s2yeO33l003xn - MrE0f1JZkewIRVgHxmY617ZG77xuT46cySb5BQAA//8DAPd+nhHpAQAA + H4sIAAAAAAAAA1SQQU8CMRCF7/srJj2DYVkWyF6MBjRoogeNJqghZXdYKt1ObYegEv476bKAXnp4 + b96bb7qNAIQqRAYiX0rOK6vbw6/FdL7ajOOX60d9dzt+GpW/r9P753QibU+0QoLmn5jzMXWRU2U1 + siJzsHOHkjG0xoPOIO0naZrWRkUF6hArLbd77U4/TprEklSOXmTwFgEAbOs3sJkCv0UGndZRqdB7 + WaLITkMAwpEOipDeK8/SsGidzZwMo6lxRwQTMIgFMMHaI0hgIn0JD/RubpSRGq6M36DLIO6KpmJ3 + 2q2ptI7mgdOstT7pC2WUX84cSk8m7PFM9hDfRQAf9Y3rf9jCOqosz5hWaEJh0k0OfeL8nWc3ThuT + iaX+k0qGUUMo/I9nrGYLZUp01qn65MAZ7aI9AAAA//8DAEHO4tPpAQAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331ea4eadffa4a-SJC + - 8533eafae9606444-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -795,7 +796,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:06 GMT + - Sat, 10 Feb 2024 11:12:36 GMT Server: - cloudflare Transfer-Encoding: @@ -809,7 +810,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '994' + - '1087' openai-version: - '2020-10-01' strict-transport-security: @@ -827,7 +828,7 @@ interactions: x-ratelimit-reset-tokens: - 69ms x-request-id: - - req_b2fa5c2a1c9913c75c92f7242d30478d + - req_b09dc263c60d9ee4de53594d57b2b29e status: code: 200 message: OK @@ -857,8 +858,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0= + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; + __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac= host: - api.openai.com user-agent: @@ -882,18 +883,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SQQU8CMRCF7/srJj0DYVdYCDcDSAwHE6MeNIaU7rBb6XZqOwQJ4b+bLgvopYf3 - 5k2/eccEQOhCTECoSrKqnemOv4snlc/2i8Ni4AbZ+9vrcj5dPj9sZ9M5iU5M0PoLFV9SPUW1M8ia - 7NlWHiVj3JqO+qPhcJiO88aoqUATY6Xj7qDbz9O7NlGRVhjEBD4SAIBj80Y2W+CPmEC/c1FqDEGW - KCbXIQDhyURFyBB0YGlZdG6mIstoG9yXCqHa1dKCDNsAXCHcPwITKGnUzkhGyIB1jQHyDkhbXEYU - eY+KzQE8Bke2CLDXXEGa9UT70+mKaKh0ntbxHLsz5qpvtNWhWnmUgWzECUzuHD8lAJ9NFbt/1wnn - qXa8YtqijQvTfHjeJ26t39wsa00mluZPajxKWkIRDoGxXm20LdE7r5tmImdySn4BAAD//wMArPEP - rxACAAA= + H4sIAAAAAAAAA1SQS0/DMBCE7/kVK59T1LQkQG8VXEBISMCpCFWus00Mjtd4NzxU9b8jpy+4+DCz + s/52NhmAsrWagTKtFtMFN7r8WC/MU3M5Kf28uF6Ee/m8Kh755q6fP1QqTwlavaGRQ+rMUBcciiW/ + s01ELZi2Fhfji7KalmU1GB3V6FKsCTI6H42rYrpPtGQNsprBSwYAsBnexOZr/FYzGOcHpUNm3aCa + HYcAVCSXFKWZLYv2ovKTacgL+gH3uUVo+0570PzOIC3C/BaEwGhneqcFYQJiO2SoctC+PoxE5EC+ + Zviy0g6ioRjRCGjPXxhzKCZnav/n9gjrqAmRVukw3zt31NfWW26XETWTT2AsFHbxbQbwOpTS/7tT + hUhdkKXQO/q0sKjK3T516v/kTg6mkGj3J3U1zvaEin9YsFuurW8whmiHjhJnts1+AQAA//8DAPLW + W1YaAgAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331eabff7ffa4a-SJC + - 8533eb02782f6444-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -903,7 +904,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:08 GMT + - Sat, 10 Feb 2024 11:12:37 GMT Server: - cloudflare Transfer-Encoding: @@ -917,7 +918,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1163' + - '1132' openai-version: - '2020-10-01' strict-transport-security: @@ -935,7 +936,7 @@ interactions: x-ratelimit-reset-tokens: - 44ms x-request-id: - - req_1e0c6ef6f09f0b90ac16b1d31fd58e4d + - req_61d34283c3b6d77c7ad9924085ad9e1d status: code: 200 message: OK @@ -976,11 +977,11 @@ interactions: the result of using the tool\n```\n\nWhen you have a response for your task, or if you do not need to use a tool, you MUST use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: [your response here]```This is the - summary of your work so far:\nThe human asks the AI to multiply 2 by 6 and the - AI returns the answer, 12.Begin! This is VERY important to you, your job depends - on it!\n\nCurrent Task: What is 2 tims 6? Return only the number.\n"}], "model": - "gpt-4", "n": 1, "stop": ["\nObservation"], "stream": false, "temperature": - 0.7}' + summary of your work so far:\nThe human asks the AI to calculate 2 times 6, + and the AI correctly responds with the number 12.Begin! This is VERY important + to you, your job depends on it!\n\nCurrent Task: What is 2 tims 6? Return only + the number.\n"}], "model": "gpt-4", "n": 1, "stop": ["\nObservation"], "stream": + false, "temperature": 0.7}' headers: accept: - application/json @@ -989,12 +990,12 @@ interactions: connection: - keep-alive content-length: - - '3213' + - '3233' content-type: - application/json cookie: - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A= + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; + __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw= host: - api.openai.com user-agent: @@ -1018,18 +1019,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRW0sDMRCF3/dXDPPcSmvthX2RoiKlQhUUKVbKNjvdjWYzMZkVtfS/S7Y3fcnD - OXOG70w2CQDqHFNAVWaiKmfao498Rnc3V9P5+DaoJ76ffj5MZj9+ys/WYCsmePVGSg6pM8WVMySa - 7c5WnjKhuLU77Az7/X53NGqMinMyMVY4aV+0O4Nub58oWSsKmMJLAgCwad7IZnP6whQ6rYNSUQhZ - QZgehwDQs4kKZiHoIJkVbJ1MxVbINriPJddFKSlcM0zAEuUgDHUgyECYzSXMKSzsWMUyKVS1Ee2M - Jn/QYGJdLSlsFrjWPsjS1tWK/AJTOG/BAgMptvkfdbDFPcn2WMFw4TyvYl1bG3PU19rqUC49ZYFt - xA3CbhffJgCvzanqf+3Rea6cLIXfycaFw05vtw9Pv3JyewdTWDLzJ9UbJHtCDN9BqFqutS3IO6+b - y0XOZJv8AgAA//8DANObLFcwAgAA + H4sIAAAAAAAAA1SRzU7DMBCE73mK1Z5b1BLSVrkgJEDiwqlCAooq19kmBsdr7A0Cqr47cvrLxYcZ + z+gbe5MBoKmwBNSNEt16O5x9rl+q3/nX9/2suDPjx3c1/726eyLz1NgcBynBq3fSckhdaG69JTHs + drYOpIRS63g6mhaTvCimvdFyRTbFai/Dq+FoMt4X6oaNpoglvGYAAJv+TGyuom8sYTQ4KC3FqGrC + 8ngJAAPbpKCK0URRTnBwMjU7Idfjzhvu6kZKuGV4AEdUgTB0kUCBMNtreKa4cDc6jSmh7awYbw2F + gwYPzndSwmaBaxOiLF3XrigssITLASwwkmZXnamTLe5JtscJlmsfeJXmus7ao742zsRmGUhFdgk3 + CvtdfJsBvPVP1f1bjz5w62Up/EEuFU5Hxa4PT79ycvN8bwqLsmepfJbtCTH+RKF2uTaupuCD6V8u + cWbb7A8AAP//AwBUqF5vMAIAAA== headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331eb5bb889e6e-SJC + - 8533eb0bcc2acfc4-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1039,7 +1040,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:10 GMT + - Sat, 10 Feb 2024 11:12:39 GMT Server: - cloudflare Transfer-Encoding: @@ -1053,7 +1054,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1865' + - '1402' openai-version: - '2020-10-01' strict-transport-security: @@ -1065,13 +1066,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299220' + - '299215' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - - 155ms + - 156ms x-request-id: - - req_f9d083482588cfd68d861681f1d2a70a + - req_b2aded41145719a69d978de2b4845b64 status: code: 200 message: OK @@ -1137,8 +1138,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A= + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; + __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw= host: - api.openai.com user-agent: @@ -1162,18 +1163,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRQU/jMBCF7/kV1pzbVQOUprnCgQviBkKbVeI609Rgj409QUCV/76yW1q4+PDe - +0ZvxvtCCNA91ALUTrKy3syrt/5h+Py4rZ7unm/Maqy+Hr+emO9LXr8/wiwRbvOCir+pP8pZb5C1 - o4OtAkrGNLVcLVbL5bJcL7JhXY8mYYPn+dV8cV1eHomd0woj1OJvIYQQ+/ymbtTjB9Qi81mxGKMc - EOpTSAgIziQFZIw6siSG2dlUjhgp1+26rqF9Q0I0sB1Jpc4tSYsN1KIBOxrW3mgMDcwOKRmG0SJx - TIlMZlaHyC2NdpOitbiYfTsRlaP+h3WdnKmhqaGu6+BYazrtY9zgg9uk3Wk05qRvNem4awPK6Ch1 - j+z8AZ8KIf7lu42/TgE+OOu5ZfeKlAZWVXmYB+cvOruXq6PJjqU56+uyKo4NIX5GRttuNQ0YfND5 - jKlnMRX/AQAA//8DADOMN0k9AgAA + H4sIAAAAAAAAA1SRzW7bMBCE73qKxZ7lwo5jx9Y9QIP23iJRIFDUSmZDLhlyBSQw9O4F5b/kwsN8 + M4vZ5bEAQNNhBagPSrQLdrF775/7X3f977/248/2qV2+t4+uP/BPeR47LHPCt/9IyyX1Q3sXLInx + fMI6khLKU1cPy4fNdr3Z7GfgfEc2x4Ygi/vFcrtanxMHbzQlrOClAAA4zm/uxh19YAXL8qI4SkkN + hNXVBIDR26ygSskkUSxY3qD2LMRz3WPNADX2I+tct2HlqMYKanSjFROsoVhjeXKpOIyOWFJ2zMk5 + a2KShkfXZmsFd+WFJNKeuy9om8lU84TnMtN1C+uHEH2bN+bR2qveGzbp0ERSyXNunMSHU3wqAF7n + a43fDoAhehekEf9GnAfudqvTPLx9zI2u789QvCh70/erTXFuiOkzCbmmNzxQDNHMx8s9i6n4DwAA + //8DADc96EEzAgAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331ec22c139e6e-SJC + - 8533eb15bb9fcfc4-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1183,7 +1184,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:12 GMT + - Sat, 10 Feb 2024 11:12:42 GMT Server: - cloudflare Transfer-Encoding: @@ -1197,7 +1198,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '2339' + - '2698' openai-version: - '2020-10-01' strict-transport-security: @@ -1215,7 +1216,7 @@ interactions: x-ratelimit-reset-tokens: - 183ms x-request-id: - - req_3ce7d6aba5122535dc207e098f58a9e7 + - req_3083e7cc58f3bb3f7339a29d75e52a0c status: code: 200 message: OK @@ -1256,12 +1257,15 @@ interactions: the result of using the tool\n```\n\nWhen you have a response for your task, or if you do not need to use a tool, you MUST use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: [your response here]```This is the - summary of your work so far:\nThe human asks the AI to multiply 2 by 6 and the - AI returns the answer, 12.Begin! This is VERY important to you, your job depends - on it!\n\nCurrent Task: What is 2 tims 6? Return only the number.\nThought: - Do I need to use a tool? Yes\nAction: multiplier\nAction Input: {\"first_number\": - 2, \"second_number\": 6}\nObservation: 12\nThought: "}], "model": "gpt-4", "n": - 1, "stop": ["\nObservation"], "stream": false, "temperature": 0.7}' + summary of your work so far:\nThe human asks the AI to calculate 2 times 6, + and the AI correctly responds with the number 12.Begin! This is VERY important + to you, your job depends on it!\n\nCurrent Task: What is 2 tims 6? Return only + the number.\nThought: Do I need to use a tool? Yes\nAction: multiplier\nAction + Input: {\"first_number\": 2, \"second_number\": 6}\nObservation: I just used + the multiplier tool with input {''first_number'': 2, ''second_number'': 6}. + So I already know the result of that and don''t need to use it again now.\n\nThought: + "}], "model": "gpt-4", "n": 1, "stop": ["\nObservation"], "stream": false, "temperature": + 0.7}' headers: accept: - application/json @@ -1270,12 +1274,12 @@ interactions: connection: - keep-alive content-length: - - '3357' + - '3533' content-type: - application/json cookie: - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A= + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; + __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw= host: - api.openai.com user-agent: @@ -1299,17 +1303,17 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SQS0/DMBCE7/kVK59blJSmobmgIgSqhOgBCSEeqlxnm5o6XmNvHwj1vyOnL7j4 - MLMz+61/EgChK1GCUAvJqnGme/VVTfTrzcOLXA6Lp/76eX4/3K5HZrJZ1mPRiQmafaLiY+pCUeMM - sia7t5VHyRhbsyIt8jzPhr3WaKhCE2O1426/mw6yy0NiQVphECW8JQAAP+0b2WyFW1FC2jkqDYYg - axTlaQhAeDJRETIEHVhaFp2zqcgy2hb3lmAMFrECJlgFBAlMZK7hkd7tnbbSwMiGDfoSsp44VOxO - uw3VztMsctqVMSd9rq0Oi6lHGcjGPYHJ7eO7BOCjvXH1D1s4T43jKdMSbSws+vm+T5y/8+xmR5OJ - pfmTGqTJgVCE78DYTOfa1uid1+3JkTPZJb8AAAD//wMAP0eFIukBAAA= + H4sIAAAAAAAAA1SQW0sDMRCF3/dXDHlupdt790UqWhGxIChSL5Q0O91NzWZiMsVL6X+XbG/6kodz + 5pz5JpsEQOhcZCBUKVlVzjSHH8tn/Xg1ubson+4ffla3Tl1PZ92Zn/nxo2jEBC1WqPiQOlNUOYOs + ye5s5VEyxtZ00Br0+p1ev10bFeVoYqxw3Ow2W/20s0+UpBUGkcFLAgCwqd/IZnP8Ehm0GgelwhBk + gSI7DgEITyYqQoagA0vLonEyFVlGW+NeEtyARcyBCdYBQQITmXOY0qudaCsNjG34RJ9B2hb7iu1x + t6HCeVpETrs25qgvtdWhnHuUgWzcE5jcLr5NAN7qG9f/sIXzVDmeM72jjYWDYXfXJ07feXLT3t5k + Ymn+pEajZE8owndgrOZLbQv0zuv65MiZbJNfAAAA//8DAAKnQ8fpAQAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331ed2f8159e6e-SJC + - 8533eb28c823cfc4-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1319,7 +1323,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:13 GMT + - Sat, 10 Feb 2024 11:12:43 GMT Server: - cloudflare Transfer-Encoding: @@ -1333,7 +1337,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1015' + - '1067' openai-version: - '2020-10-01' strict-transport-security: @@ -1345,13 +1349,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299186' + - '299143' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - - 162ms + - 171ms x-request-id: - - req_cfa7c5a5ec642001c23ff034a7badf64 + - req_ffb89b01f12636dbcb093c3d8ddadbbf status: code: 200 message: OK @@ -1365,10 +1369,10 @@ interactions: help humans reach their full potential.\n\nNew summary:\nThe human asks what the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND - OF EXAMPLE\n\nCurrent summary:\nThe human asks the AI to multiply 2 by 6 and - the AI returns the answer, 12.\n\nNew lines of conversation:\nHuman: What is - 2 tims 6? Return only the number.\nAI: 12\n\nNew summary:"}], "model": "gpt-4", - "n": 1, "stream": false, "temperature": 0.7}' + OF EXAMPLE\n\nCurrent summary:\nThe human asks the AI to calculate 2 times 6, + and the AI correctly responds with the number 12.\n\nNew lines of conversation:\nHuman: + What is 2 tims 6? Return only the number.\nAI: 12\n\nNew summary:"}], "model": + "gpt-4", "n": 1, "stream": false, "temperature": 0.7}' headers: accept: - application/json @@ -1377,12 +1381,12 @@ interactions: connection: - keep-alive content-length: - - '970' + - '990' content-type: - application/json cookie: - - _cfuvid=5kZVxJOsRfxObr9hLdehia3eWTY.wvyv.6QajmkP_hU-1707555174271-0-604800000; - __cf_bm=tE85KSJVLW2b9uFQ3HdC_0X9zKb3zvxn_XQrw65Lr5I-1707555174-1-ASbOkyjQPFYaEjdVU9A62Rq43RljO+iw67jesVCWW1SR/PnNWomyDmLymjV9qhbKx0TBnRfqMk7Mva8JQd1CH8A= + - _cfuvid=ylta_5IzewtBbeSYSU3qahLvf8rnmBo7j6w87zjpbtc-1707563543431-0-604800000; + __cf_bm=VUM_AzyPmw54UKYCZhrJdPu8KbJzn3N7bJOp_y.9Kyc-1707563543-1-AZT0SxUJP3NDQsM27IVGaO9UGlGGGZ1b3awpQUl9p3hTgm4X7fW6Gm29TusixoSADT4s/T+MAAy6Phf92Q+xsaw= host: - api.openai.com user-agent: @@ -1406,18 +1410,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SQS0/DMBCE7/kVK5/bKkmbFnJD4kARiAuCA0KV42xrU7+wNypV1f+OnPQBFx9m - 9lvPziEDYKplNTAhOQnj9fjmu33ZVve+0VLiW1ksn/Obh6ft4/tyanI2SoRrvlDQmZoIZ7xGUs4O - tgjICdPWYpEvqqoqbme9YVyLOmEbT+PZOJ8X0xMhnRIYWQ0fGQDAoX9TNtviD6shH50VgzHyDbL6 - MgTAgtNJYTxGFYlbYqOrKZwltH3cV4kgO8Mt8LiNQBLhbgnkwHSalNd7KKHZwxxopwQCty0gFxJI - GTxPB6Qu2AHmNu4wjKAoJ+z04fGSVLuND65JV9lO64u+VlZFuQrIo7MpVSTnB/yYAXz2jXT/jmQ+ - OONpRW6LNvbFLoZ97Fr+1S2rk0mOuP6j52V2SsjiPhKa1VrZDQYfVF9Qypkds18AAAD//wMANLco - TBcCAAA= + H4sIAAAAAAAAA1SRT08CMRDF7/spJj0D4Y8uyk0TY0g8GS9qDCndgS20ndqZjQLhu5suK+ilh/fm + TX7zeigAlK3UDJSptRgfXf/mc/W2uXo2Zv+yeZq/PjxPt5vt/T7Nm8enUvVygpYbNPKbGhjy0aFY + CifbJNSCeetoOpxel5PrctIanip0ObaO0r/qD8vRpEvUZA2ymsF7AQBwaN/MFir8VjMY9n4Vj8x6 + jWp2HgJQiVxWlGa2LDqI6l1MQ0EwtLgvNULdeB1A85ZBaoS7OQiB0c40TgvCGMR6ZChBvqzBHuhQ + wZKk7vQuYyglNOJ2kJAjhYrhy+ahGiE0fokJRuOB6iiOZ3xH65homU8NjXNnfWWD5XqRUDOFjMpC + 8RQ/FgAfbU3Nv8tVTOSjLIS2GLht+/a0T11+5OKOp50pJNr90Ydl0REq3rGgX6xsWGOKybatZc7i + WPwAAAD//wMAsxMr8CwCAAA= headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331edaae979e6e-SJC + - 8533eb309c84cfc4-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1427,7 +1431,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:15 GMT + - Sat, 10 Feb 2024 11:12:45 GMT Server: - cloudflare Transfer-Encoding: @@ -1441,7 +1445,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1613' + - '1864' openai-version: - '2020-10-01' strict-transport-security: @@ -1453,13 +1457,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299773' + - '299767' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - - 45ms + - 46ms x-request-id: - - req_8a46ff46a03a9a60a088b949786292b9 + - req_ae872b8ad337e15d936b8bbb07e65510 status: code: 200 message: OK @@ -1478,11 +1482,11 @@ interactions: have a response for your task, or if you do not need to use a tool, you MUST use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: [your response here]```This is the summary of your work so far:\nThe human asks - the AI to calculate 2 times 6, and the AI correctly responds with 12.Begin! - This is VERY important to you, your job depends on it!\n\nCurrent Task: What - is 2 times 6? Return only the number.\nThis is the context you''re working with:\n12\n"}], - "model": "gpt-4", "n": 1, "stop": ["\nObservation"], "stream": false, "temperature": - 0.7}' + the AI to calculate 2 times 6, and the AI responds with the correct answer, + 12.Begin! This is VERY important to you, your job depends on it!\n\nCurrent + Task: What is 2 times 6? Return only the number.\nThis is the context you''re + working with:\n12\n"}], "model": "gpt-4", "n": 1, "stop": ["\nObservation"], + "stream": false, "temperature": 0.7}' headers: accept: - application/json @@ -1491,12 +1495,12 @@ interactions: connection: - keep-alive content-length: - - '1437' + - '1447' content-type: - application/json cookie: - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0= + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; + __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac= host: - api.openai.com user-agent: @@ -1520,18 +1524,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRzUsDMRDF7/tXDHNupR+26l5EKWK9iCKCWinb7HQ3mmRiMitK6f8u2X56yeG9 - ecPvTVYZAOoSc0BVF6KsN93zr/LeDvlqeffoF9c3tw/P/en1q5/cD76rCXZSghcfpGSXOlFsvSHR - 7Da2ClQIpa39s97ZaDTqX4xbw3JJJsUqL93Tbm/cH24TNWtFEXN4ywAAVu2b2FxJP5hDr7NTLMVY - VIT5fggAA5ukYBGjjlI4wc7BVOyEXIv7VHNT1ZLDhGEKjqgEYWgiQQHCbC7hheLMXalUJgfbGNHe - aAo7DabON5LDaoZLHaLMXWMXFGaYw6ADM4yk2JVH6niNW5L1voLhygdepLquMWavL7XTsZ4HKiK7 - hBuF/Sa+zgDe21M1/9qjD2y9zIU/yaWFw95gsw8Pv3LkDremsBTmWB9lW0KMv1HIzpfaVRR80O3l - Eme2zv4AAAD//wMA/D8Y8DACAAA= + H4sIAAAAAAAAA1SRT2vjMBDF7/4Uw5yTktbrNPhSCmWXsnsIpdAmzRIceWxrI2lUaQwtId+9yPnT + 7EWH9+YNvzfaZQCoaywBVVeJst6MZ+/N0iy65uX33H78+lPMlvOfr4t8u2zIPuEoJXjzj5ScUleK + rTckmt3BVoEqobT1+nZyW0zzYloMhuWaTIq1XsY/xpPpdX5MdKwVRSzhLQMA2A1vYnM1fWAJk9FJ + sRRj1RKW5yEADGySglWMOkrlBEffpmIn5Abc5477tpMSHhgewRHVIAx9JKhAmM0dLCiu3L1KZUqw + vRHtjaZw0uDR+V5K2K2w0SHK2vV2Q2GFJdyMYIWRFLv6Qp3u8UiyP1cw3PrAm1TX9cac9UY7Hbt1 + oCqyS7hR2B/i+wzg73Cq/r/26ANbL2vhLbm0MJ8Uh334/SsXbn40haUyl/osOxJi/IxCdt1o11Lw + QQ+XS5zZPvsCAAD//wMA/eb9lDACAAA= headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331ee74b331692-SJC + - 8533eb3d0a5ecfcc-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1541,7 +1545,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:17 GMT + - Sat, 10 Feb 2024 11:12:47 GMT Server: - cloudflare Transfer-Encoding: @@ -1555,7 +1559,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1472' + - '1516' openai-version: - '2020-10-01' strict-transport-security: @@ -1567,13 +1571,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299665' + - '299661' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - 67ms x-request-id: - - req_dca68a6f7c56d36fd10db138c8a07d7e + - req_33c7525db9f28e60ae6827cc83f25cbe status: code: 200 message: OK @@ -1609,8 +1613,8 @@ interactions: content-type: - application/json cookie: - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0= + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; + __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac= host: - api.openai.com user-agent: @@ -1634,18 +1638,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRQW/bMAyF7/4VBM/OkLRx2vm4HbpbsWHYZRocRaZttRLlSfS6IvB/H+SkSXfx - 4X189OPTsQBA22INaAYtxo9udf+7fQzVjz+fo/60jTK99I/fH145fHsev66xzI5weCIjb64PJvjR - kdjAJ2wiaaG8dXO3vquqavPxfgE+tOSyrR9ltV2td5vbs2MI1lDCGn4WAADH5ZuzcUt/sYZ1+aZ4 - Skn3hPVlCABjcFlBnZJNolmwvEITWIiXuF8oEtgEMhC8kHOrLkSvRagFy9loCEK34GQG8rpWrHi/ - 3ys+KlbYTWzynQ1rTwprUOgnJ3Z0lqLCMs/o2E+eWFLmR4WdjUkanvwhj9RwU4LCRCZw+07dzYrn - 5Vd4Tj5fTnahH2M45Hp4cu6id5ZtGppIOgXO5yUJ48k+FwC/lmqn/9rCMQY/SiPhmTgvvL2pTvvw - +opXut2coQTR7p1rtyvOCTG9JiHfdJZ7imO0S9M5ZzEX/wAAAP//AwAzEiOyYAIAAA== + H4sIAAAAAAAAA1SRzW/UMBDF7/krRj5n0bb7RXOrAKlVxQkkJEiV9TqTxMWeCfYEWFb535GzX+3F + h3nvN3rzfMgAlK1VAcp0Wozv3ez9r+Y77R8/Pay4/oD+y+f7O/z47anb//s9/6ryRPDuBY2cqXeG + fe9QLNNRNgG1YNp6s5lvVuvFar2ZBM81uoS1vcyWs/n6ZnEiOrYGoyrgRwYAcJjelI1q/KsKmOfn + iccYdYuquJgAVGCXJkrHaKNoEpVfRcMkSFPcBwwINoKGP+jcrOHgtQjWYClhBoEbkA4hmg69Lkoq + abvdvkSmkg4lAZSqGcikWyvSHktVQKn84MT2zmIoVX506dAOHklickzkxNoQpaLB75K1gNv8rEQ0 + TPUraZ2UsaRxSqBO54yXHhy3feBd6owG5y7zxpKNXRVQR6Z0cxTuj/iYATxPfQ9vKlR9YN9LJfwT + KS1c3K6O+9T1a6/q8u4kCot2r6jNMjslVHEfBX3VWGox9MFO9aec2Zj9BwAA//8DAFroJbR1AgAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331ef2fcc11692-SJC + - 8533eb47a9a2cfcc-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1655,7 +1659,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:20 GMT + - Sat, 10 Feb 2024 11:12:49 GMT Server: - cloudflare Transfer-Encoding: @@ -1669,7 +1673,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '2650' + - '2133' openai-version: - '2020-10-01' strict-transport-security: @@ -1681,13 +1685,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299661' + - '299662' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - 67ms x-request-id: - - req_6940f18dab107804798e162f3c660d1e + - req_7c8fef4357ccf35a4bdd74ae47ee0b5e status: code: 200 message: OK @@ -1706,12 +1710,15 @@ interactions: have a response for your task, or if you do not need to use a tool, you MUST use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: [your response here]```This is the summary of your work so far:\nThe human asks - the AI to calculate 2 times 6, and the AI correctly responds with 12.Begin! - This is VERY important to you, your job depends on it!\n\nCurrent Task: What - is 2 times 6? Return only the number.\nThis is the context you''re working with:\n12\nThought: - Do I need to use a tool? Yes\nAction: multiplier\nAction Input: {\"first_number\": - 2, \"second_number\": 6}\nObservation: 12\nThought: "}], "model": "gpt-4", "n": - 1, "stop": ["\nObservation"], "stream": false, "temperature": 0.7}' + the AI to calculate 2 times 6, and the AI responds with the correct answer, + 12.Begin! This is VERY important to you, your job depends on it!\n\nCurrent + Task: What is 2 times 6? Return only the number.\nThis is the context you''re + working with:\n12\nThought: Do I need to use a tool? Yes\nAction: multiplier\nAction + Input: {\"first_number\": 2, \"second_number\": 6}\nObservation: I just used + the multiplier tool with input {''first_number'': 2, ''second_number'': 6}. + So I already know the result of that and don''t need to use it again now.\n\nThought: + "}], "model": "gpt-4", "n": 1, "stop": ["\nObservation"], "stream": false, "temperature": + 0.7}' headers: accept: - application/json @@ -1720,12 +1727,12 @@ interactions: connection: - keep-alive content-length: - - '1581' + - '1747' content-type: - application/json cookie: - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0= + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; + __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac= host: - api.openai.com user-agent: @@ -1749,17 +1756,17 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SQQU8CMRCF7/srJj0vZhdY0L0YE0LCQQlHo4aU7rBUu53SDioS/rvpsoBeenhv - 3ptvekgAhK5ECUJtJKvGmd7ttpp7X01Gn6Ge/jzS87ZZSJqZxb6eT0QaE7R6R8Xn1I2ixhlkTfZk - K4+SMbbm42xcFEU/y1ujoQpNjNWOe8NeNsoHXWJDWmEQJbwkAACH9o1stsJvUUKWnpUGQ5A1ivIy - BCA8magIGYIOLC2L9Goqsoy2xZ0QzMAiVsAEu4AggYnMPTzRq51qKw082PCFvoS8L7qK42W3odp5 - WkVOuzPmoq+11WGz9CgD2bgnMLlT/JgAvLU37v5hC+epcbxk+kAbCwfD4alPXL/z6uZFZzKxNH9S - xV3SEYqwD4zNcq1tjd553Z4cOZNj8gsAAP//AwCzfxwV6QEAAA== + H4sIAAAAAAAAA1SQS2/CMBCE7/kVK5+hIg3PXKpWfUpVD6iX0lbIJEticLyuvRQo4r9XDgHaiw8z + O7PfehcBCJWLFERWSs4qq9vDr/nELjbdZPn28L12P2O6Gb+Oy+J5e7d8FK2QoNkCMz6mLjKqrEZW + ZA525lAyhtZ40Bn0+kmvP6qNinLUIVZYbnfbnX6cNImSVIZepPAeAQDs6jewmRw3IoVO66hU6L0s + UKSnIQDhSAdFSO+VZ2lYtM5mRobR1Li3BE9gEHNggpVHkMBE+gpe6MPcKyM1XBu/RpdCfCmaiv1p + t6bCOpoFTrPS+qTPlVG+nDqUnkzY45nsIb6PAD7rG1f/sIV1VFmeMi3RhMJk2D30ifN3nt2415hM + LPWf1GgUNYTCbz1jNZ0rU6CzTtUnB85oH/0CAAD//wMAfeDhj+kBAAA= headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331f05dd851692-SJC + - 8533eb55aaaccfcc-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1769,7 +1776,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:23 GMT + - Sat, 10 Feb 2024 11:12:50 GMT Server: - cloudflare Transfer-Encoding: @@ -1783,7 +1790,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '2516' + - '896' openai-version: - '2020-10-01' strict-transport-security: @@ -1795,13 +1802,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299630' + - '299589' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - - 73ms + - 82ms x-request-id: - - req_7581ccc086ee4ffc4f872ec93917fc5e + - req_93d60fb3dc024e83dd1e316e838d5670 status: code: 200 message: OK @@ -1816,7 +1823,7 @@ interactions: the AI thinks of artificial intelligence. The AI thinks artificial intelligence is a force for good because it will help humans reach their full potential.\nEND OF EXAMPLE\n\nCurrent summary:\nThe human asks the AI to calculate 2 times 6, - and the AI correctly responds with 12.\n\nNew lines of conversation:\nHuman: + and the AI responds with the correct answer, 12.\n\nNew lines of conversation:\nHuman: What is 2 times 6? Return only the number.\nThis is the context you''re working with:\n12\nAI: 12\n\nNew summary:"}], "model": "gpt-4", "n": 1, "stream": false, "temperature": 0.7}' @@ -1828,12 +1835,12 @@ interactions: connection: - keep-alive content-length: - - '1026' + - '1036' content-type: - application/json cookie: - - _cfuvid=EOhUXf9b9_QOfeleN81awDzrY5RByUbEJsA6dkxzMP8-1707555182145-0-604800000; - __cf_bm=Ny4Y6DMnCaDhdMrk0.yEtZYAyfySLJ_cn.5y_yGQmQE-1707555182-1-Ad6o9N1fVvEN4kCGNS1Y4Fp1cER00DyQ7AQPGDRyMwCPpwzi1ON9eK6Yd7tLbnTOrg9EKKXdbdbCnHBem3yA7N0= + - _cfuvid=4YKuN.HwkkNnLgJwQBDQitCw85.UDIPaqBKt4otOGco-1707563551419-0-604800000; + __cf_bm=QNy.wYY1_9KHI8_RIeUZP.ali92DnVLjsO0oTX1XUfM-1707563551-1-AcwgNxZQVQEIE7HGXGP/Y7xskgkg3Jbu3L557XdSbkGcTUp12spKbI8e6GCb7fgn3Q+Zwuj+jMcX8oUH3M4djac= host: - api.openai.com user-agent: @@ -1857,18 +1864,18 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA1SRzU7DMBCE73mKlc9plaS/yg0uqBKCA9wQqlxnm5g6XtfeUErVd0dOQwsXH2Y8 - 42/XpwRA6EqUIFQjWbXOjJb76pnd9GWF5vvp3u/lbu+W04fPrNt2jyKNCdp8oOLf1FhR6wyyJnux - lUfJGFvzRbaYzWZFNumNlio0MVY7Hk1H2TyfDImGtMIgSnhLAABO/RnZbIVfooQs/VVaDEHWKMrr - JQDhyURFyBB0YGlZpDdTkWW0Pe5rg9B0rbQgwy4ANwh3K2ACJY3qjGSEAli3GGAOfNAKU5C2gg1x - M+hDRpH3qNgcwWNwZKsAB80N5MVYDE+fr8yGaudpE+eznTFXfautDs3aowxkI19gcpf4OQF473fT - /RtXOE+t4zXTDm0szJeLS5+4fcPNLWaDycTS/NHzIhkIRTgGxna91bZG77zuVxU5k3PyAwAA//8D - AKiyW5YhAgAA + H4sIAAAAAAAAA1SRQU/jMBCF7/kVI59b1LS02fYGQkLArrggpF2EKteZNgbb43gmKgj1v68cQgsX + H96bb/Tm+aMAULZWK1Cm0WJ8dONf7fZfe3N7/9b+vm6vqysKd5d/q8d5dzlr/6hRJmjzgka+qDND + PjoUS+HTNgm1YN5aVpNqvpjNq0lveKrRZWwXZXw+nizK2UA0ZA2yWsFTAQDw0b85W6jxTa2g53vF + I7PeoVodhwBUIpcVpZktiw6iRifTUBAMfdyHBqHpvA6g+ZVBGoSLGxACo53pnBaEKYj1yLAA2VuD + I9Chhg1JM+gDk5AjhZphb7PVIBhKCY1A6Dwma7QDHXiPaQTl9EwNcQ7HOxztYqJNvjl0zh31rQ2W + m3VCzRRyZhaKn/ihAHju++p+VKBiIh9lLfSKIS8sl0Nf6vQ1J3e6HEwh0e6bXi6LIaHidxb0660N + O0wx2b6+nLM4FP8BAAD//wMAlUo2rDUCAAA= headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 85331f165b551692-SJC + - 8533eb5c1eeecfcc-SJC Cache-Control: - no-cache, must-revalidate Connection: @@ -1878,7 +1885,7 @@ interactions: Content-Type: - application/json Date: - - Sat, 10 Feb 2024 08:53:25 GMT + - Sat, 10 Feb 2024 11:12:52 GMT Server: - cloudflare Transfer-Encoding: @@ -1892,7 +1899,7 @@ interactions: openai-organization: - user-z7g4wmlazxqvc5wjyaaaocfz openai-processing-ms: - - '1324' + - '1693' openai-version: - '2020-10-01' strict-transport-security: @@ -1904,13 +1911,13 @@ interactions: x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '299759' + - '299757' x-ratelimit-reset-requests: - 6ms x-ratelimit-reset-tokens: - 48ms x-request-id: - - req_ab2691963759194b30bfc25cb1dd5867 + - req_d1b20b6e01313a133c96666f353043c8 status: code: 200 message: OK diff --git a/tests/crew_test.py b/tests/crew_test.py index 74e2fc0a0..f2f786ed5 100644 --- a/tests/crew_test.py +++ b/tests/crew_test.py @@ -160,22 +160,7 @@ def test_hierarchical_process(): assert ( crew.kickoff() - == """Here are the 5 interesting ideas with a highlight paragraph for each: - -1. "The Future of AI in Healthcare: Predicting Diseases Before They Happen" - - "Imagine a future where AI empowers us to detect diseases before they arise, transforming healthcare from reactive to proactive. Machine learning algorithms, trained on vast amounts of patient data, could potentially predict heart diseases, strokes, or cancers before they manifest, allowing for early interventions and significantly improving patient outcomes. This article will delve into the rapid advancements in AI within the healthcare sector and how these technologies are ushering us into a new era of predictive medicine." - -2. "How AI is Changing the Way We Cook: An Insight into Smart Kitchens" - - "From the humble home kitchen to grand culinary stages, AI is revolutionizing the way we cook. Smart appliances, equipped with advanced sensors and predictive algorithms, are turning kitchens into creative playgrounds, offering personalized recipes, precise cooking instructions, and even automated meal preparation. This article explores the fascinating intersection of AI and gastronomy, revealing how technology is transforming our culinary experiences." - -3. "Redefining Fitness with AI: Personalized Workout Plans and Nutritional Advice" - - "Fitness reimagined – that's the promise of AI in the wellness industry. Picture a personal trainer who knows your strengths, weaknesses, and nutritional needs intimately. An AI-powered fitness app can provide this personalized experience, adapting your workout plans and dietary recommendations in real-time based on your progress and feedback. Join us as we unpack how AI is revolutionizing the fitness landscape, offering personalized, data-driven approaches to health and well-being." - -4. "AI and the Art World: How Technology is Shaping Creativity" - - "Art and AI may seem like unlikely partners, but their synergy is sparking a creative revolution. AI algorithms are now creating mesmerizing artworks, challenging our perceptions of creativity and originality. From AI-assisted painting to generative music composition, this article will take you on a journey through the fascinating world of AI in art, exploring how technology is reshaping the boundaries of human creativity." - -5. "AI in Space Exploration: The Next Frontier" - - "The vast expanse of space, once the sole domain of astronauts and rovers, is the next frontier for AI. AI technology is playing an increasingly vital role in space exploration, from predicting space weather to assisting in interstellar navigation. This article will delve into the exciting intersection of AI and space exploration, exploring how these advanced technologies are helping us uncover the mysteries of the cosmos.\"""" + == """Here are the five interesting ideas for an article with a highlight paragraph for each:\n\n1. The Evolution of Artificial Intelligence:\nDive deep into the fascinating journey of artificial intelligence, from its humble beginnings as a concept in science fiction to an integral part of our daily lives and a catalyst of modern innovations. Explore how AI has evolved over the years, the key milestones that have shaped its growth, and the visionary minds behind these advancements. Uncover the remarkable transformation of AI and its astounding potential for the future.\n\n2. AI in Everyday Life:\nUncover the unseen impact of AI in our every day lives, from our smartphones and home appliances to social media and healthcare. Learn about the subtle yet profound ways AI has become a silent partner in your daily routine, enhancing convenience, productivity, and decision-making. Explore the numerous applications of AI right at your fingertips and how it shapes our interactions with technology and the world around us.\n\n3. Ethical Implications of AI:\nVenture into the ethical labyrinth of artificial intelligence, where innovation meets responsibility. Explore the implications of AI on privacy, job security, and societal norms, and the moral obligations we have towards its development and use. Delve into the thought-provoking debates about AI ethics and the measures being taken to ensure its responsible and equitable use.\n\n4. The Rise of AI Startups:\nWitness the rise of AI startups, the new champions of innovation, driving the technology revolution. Discover how these trailblazing companies are harnessing the power of AI to solve complex problems, create new markets, and revolutionize industries. Learn about their unique challenges, their groundbreaking solutions, and the potential they hold for reshaping the future of technology and business.\n\n5. AI and the Environment:\nExplore the intersection of AI and the environment, where technology meets sustainability. Uncover how AI is being used to combat climate change, conserve biodiversity, and optimize resource utilization. Learn about the innovative ways AI is being used to create a sustainable future and the challenges and opportunities it presents.""" ) @@ -277,18 +262,14 @@ def test_crew_verbose_levels_output(capsys): @pytest.mark.vcr(filter_headers=["authorization"]) def test_cache_hitting_between_agents(): - from unittest.mock import patch + from unittest.mock import call, patch from langchain.tools import tool @tool - def multiplier(numbers) -> float: - """Useful for when you need to multiply two numbers together. - The input to this tool should be a comma separated list of numbers of - length two, representing the two numbers you want to multiply together. - For example, `1,2` would be the input if you wanted to multiply 1 by 2.""" - a, b = numbers.split(",") - return int(a) * int(b) + def multiplier(first_number: int, second_number: int) -> float: + """Useful for when you need to multiply two numbers together.""" + return first_number * second_number tasks = [ Task( @@ -308,15 +289,16 @@ def test_cache_hitting_between_agents(): tasks=tasks, ) - assert crew._cache_handler._cache == {} - output = crew.kickoff() - assert crew._cache_handler._cache == {"multiplier-2,6": "12"} - assert output == "12" - with patch.object(CacheHandler, "read") as read: read.return_value = "12" crew.kickoff() - read.assert_called_with("multiplier", "2,6") + assert read.call_count == 2, "read was not called exactly twice" + # Check if read was called with the expected arguments + expected_calls = [ + call(tool="multiplier", input={"first_number": 2, "second_number": 6}), + call(tool="multiplier", input={"first_number": 2, "second_number": 6}), + ] + read.assert_has_calls(expected_calls, any_order=False) @pytest.mark.vcr(filter_headers=["authorization"])