mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
removing langchain
This commit is contained in:
1227
poetry.lock
generated
1227
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "crewai"
|
||||
version = "0.55.2"
|
||||
version = "0.56.0"
|
||||
description = "Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks."
|
||||
authors = ["Joao Moura <joao@crewai.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"score": 4
|
||||
}
|
||||
@@ -94,8 +94,9 @@ class Agent(BaseAgent):
|
||||
allow_code_execution: Optional[bool] = Field(
|
||||
default=False, description="Enable code execution for the agent."
|
||||
)
|
||||
sliding_context_window: Optional[bool] = Field(
|
||||
default=False, description="Enable sliding context window for the agent."
|
||||
respect_context_window: Optional[bool] = Field(
|
||||
default=True,
|
||||
description="Keep messages under the context window size by summarizing content.",
|
||||
)
|
||||
max_retry_limit: int = Field(
|
||||
default=2,
|
||||
@@ -171,7 +172,7 @@ class Agent(BaseAgent):
|
||||
"input": task_prompt,
|
||||
"tool_names": self.agent_executor.tools_names,
|
||||
"tools": self.agent_executor.tools_description,
|
||||
"should_ask_for_human_input": task.human_input,
|
||||
"ask_for_human_input": task.human_input,
|
||||
}
|
||||
)["output"]
|
||||
except Exception as e:
|
||||
@@ -232,7 +233,7 @@ class Agent(BaseAgent):
|
||||
tools_description=self._render_text_description_and_args(parsed_tools),
|
||||
step_callback=self.step_callback,
|
||||
function_calling_llm=self.function_calling_llm,
|
||||
sliding_context_window=self.sliding_context_window,
|
||||
respect_context_window=self.respect_context_window,
|
||||
request_within_rpm_limit=self._rpm_controller.check_or_wait
|
||||
if self._rpm_controller
|
||||
else None,
|
||||
@@ -257,7 +258,7 @@ class Agent(BaseAgent):
|
||||
def get_output_converter(self, llm, text, model, instructions):
|
||||
return Converter(llm=llm, text=text, model=model, instructions=instructions)
|
||||
|
||||
def _parse_tools(self, tools: List[Any]) -> List[Any]: # type: ignore # Function "langchain_core.tools.tool" is not valid as a type
|
||||
def _parse_tools(self, tools: List[Any]) -> List[Any]: # type: ignore
|
||||
"""Parse tools to be used for the task."""
|
||||
tools_list = []
|
||||
try:
|
||||
|
||||
@@ -102,7 +102,8 @@ class BaseAgent(ABC, BaseModel):
|
||||
description="Maximum number of requests per minute for the agent execution to be respected.",
|
||||
)
|
||||
allow_delegation: bool = Field(
|
||||
default=True, description="Allow delegation of tasks to agents"
|
||||
default=False,
|
||||
description="Enable agent to delegate and ask questions among each other.",
|
||||
)
|
||||
tools: Optional[List[Any]] = Field(
|
||||
default_factory=list, description="Tools at agents' disposal"
|
||||
|
||||
@@ -24,9 +24,6 @@ class CrewAgentExecutorMixin:
|
||||
|
||||
def _should_force_answer(self) -> bool:
|
||||
"""Determine if a forced answer is required based on iteration count."""
|
||||
print("*** self.iterations", self.iterations)
|
||||
print("*** self.max_iter", self.max_iter)
|
||||
print("*** self.have_forced_answer", self.have_forced_answer)
|
||||
return (self.iterations >= self.max_iter) and not self.have_forced_answer
|
||||
|
||||
def _create_short_term_memory(self, output) -> None:
|
||||
|
||||
@@ -34,7 +34,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
step_callback: Any = None,
|
||||
original_tools: List[Any] = [],
|
||||
function_calling_llm: Any = None,
|
||||
sliding_context_window: bool = False,
|
||||
respect_context_window: bool = False,
|
||||
request_within_rpm_limit: Any = None,
|
||||
callbacks: List[Any] = [],
|
||||
):
|
||||
@@ -54,65 +54,75 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
self.step_callback = step_callback
|
||||
self.tools_description = tools_description
|
||||
self.function_calling_llm = function_calling_llm
|
||||
self.sliding_context_window = sliding_context_window
|
||||
self.respect_context_window = respect_context_window
|
||||
self.request_within_rpm_limit = request_within_rpm_limit
|
||||
self.should_ask_for_human_input = False
|
||||
self.ask_for_human_input = False
|
||||
self.messages = []
|
||||
self.iterations = 0
|
||||
self.have_forced_answer = False
|
||||
self.name_to_tool_map = {tool.name: tool for tool in self.tools}
|
||||
|
||||
def invoke(self, inputs: Dict[str, str]) -> Dict[str, Any]:
|
||||
formatted_answer = None
|
||||
formatted_prompt = self._format_prompt(self.prompt, inputs)
|
||||
self.should_ask_for_human_input = inputs.get(
|
||||
"should_ask_for_human_input", False
|
||||
)
|
||||
self.messages = self._messages(formatted_prompt)
|
||||
print("starting invoke")
|
||||
if "system" in self.prompt:
|
||||
system_prompt = self._format_prompt(self.prompt["system"], inputs)
|
||||
user_prompt = self._format_prompt(self.prompt["user"], inputs)
|
||||
|
||||
formatted_answer = self._invoke_loop(formatted_answer)
|
||||
self.messages.append(self._format_msg(system_prompt, role="system"))
|
||||
self.messages.append(self._format_msg(user_prompt))
|
||||
else:
|
||||
user_prompt = self._format_prompt(self.prompt["prompt"], inputs)
|
||||
self.messages.append(self._format_msg(user_prompt))
|
||||
print("after messages")
|
||||
print(self.messages)
|
||||
self.ask_for_human_input = inputs.get("ask_for_human_input", False)
|
||||
|
||||
if self.should_ask_for_human_input:
|
||||
formatted_answer = self._invoke_loop()
|
||||
print("111after formatted_answer")
|
||||
print(formatted_answer)
|
||||
|
||||
if self.ask_for_human_input:
|
||||
human_feedback = self._ask_human_input(formatted_answer.output)
|
||||
if self.crew and self.crew._train:
|
||||
self._handle_crew_training_output(formatted_answer, human_feedback)
|
||||
|
||||
# Making sure we only ask for it once, so disabling for the next thought loop
|
||||
self.should_ask_for_human_input = False
|
||||
self.messages.append(
|
||||
{"role": "user", "content": f"Feedback: {human_feedback}"}
|
||||
)
|
||||
self.ask_for_human_input = False
|
||||
self.messages.append(self._format_msg(f"Feedback: {human_feedback}"))
|
||||
formatted_answer = self._invoke_loop(None)
|
||||
|
||||
return {"output": formatted_answer.output}
|
||||
|
||||
def _invoke_loop(self, formatted_answer):
|
||||
def _invoke_loop(self, formatted_answer=None):
|
||||
print("starting _invoke_loop")
|
||||
try:
|
||||
while not isinstance(formatted_answer, AgentFinish):
|
||||
# print('2222222')
|
||||
if not self.request_within_rpm_limit or self.request_within_rpm_limit():
|
||||
# print('3333333')
|
||||
print("******* messages")
|
||||
print(self.messages)
|
||||
answer = LLM(
|
||||
self.llm, stop=self.stop, callbacks=self.callbacks
|
||||
).call(self.messages)
|
||||
print("after answer")
|
||||
print(answer)
|
||||
|
||||
self.iterations += 1
|
||||
print("*** self.iterations", self.iterations)
|
||||
# if self.iterations > 11:
|
||||
# sadasd
|
||||
formatted_answer = self._format_answer(answer)
|
||||
print("222after formatted_answer")
|
||||
print(formatted_answer)
|
||||
|
||||
if isinstance(formatted_answer, AgentAction):
|
||||
# print('4444444')
|
||||
action_result = self._use_tool(formatted_answer)
|
||||
formatted_answer.text += f"\nObservation: {action_result}"
|
||||
# print(formatted_answer)
|
||||
print("after formatted_answer.text")
|
||||
print(formatted_answer.text)
|
||||
|
||||
if self.step_callback:
|
||||
formatted_answer.result = action_result
|
||||
self.step_callback(formatted_answer)
|
||||
if self._should_force_answer():
|
||||
print("starting _should_force_answer")
|
||||
if self.have_forced_answer:
|
||||
print("forcing answer")
|
||||
return {
|
||||
"output": self._i18n.errors(
|
||||
"force_final_answer_error"
|
||||
@@ -123,25 +133,25 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
f'\n{self._i18n.errors("force_final_answer")}'
|
||||
)
|
||||
self.have_forced_answer = True
|
||||
self.messages.append(
|
||||
{"role": "assistant", "content": formatted_answer.text}
|
||||
)
|
||||
|
||||
self.messages.append(
|
||||
self._format_msg(formatted_answer.text, role="assistant")
|
||||
)
|
||||
|
||||
except OutputParserException as e:
|
||||
# print('5555555')
|
||||
print("********* ERROR1")
|
||||
self.messages.append({"role": "assistant", "content": e.error})
|
||||
self._invoke_loop(formatted_answer)
|
||||
|
||||
except Exception as e:
|
||||
# print('6666666')
|
||||
print("*** e", e)
|
||||
print("********* ERRORw")
|
||||
print(e)
|
||||
if LLMContextLengthExceededException(str(e))._is_context_limit_error(
|
||||
str(e)
|
||||
):
|
||||
self._handle_context_length()
|
||||
self._invoke_loop(formatted_answer)
|
||||
|
||||
# print('7777777')
|
||||
return formatted_answer
|
||||
|
||||
def _use_tool(self, agent_action: AgentAction) -> None:
|
||||
@@ -176,25 +186,23 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
|
||||
def _summarize_messages(self) -> None:
|
||||
llm = LLM(self.llm)
|
||||
grouped_messages = []
|
||||
messages_groups = []
|
||||
|
||||
for message in self.messages:
|
||||
content = message["content"]
|
||||
for i in range(0, len(content), 5000):
|
||||
grouped_messages.append(content[i : i + 5000])
|
||||
messages_groups.append(content[i : i + 5000])
|
||||
|
||||
summarized_contents = []
|
||||
for group in grouped_messages:
|
||||
for group in messages_groups:
|
||||
summary = llm.call(
|
||||
[
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are a helpful assistant that summarizes text.",
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": f"Summarize the following text, make sure to include all the important information: {group}",
|
||||
},
|
||||
self._format_msg(
|
||||
self._i18n.slices("summarizer_system_message"), role="system"
|
||||
),
|
||||
self._format_msg(
|
||||
self._i18n.errors("sumamrize_instruction").format(group=group),
|
||||
),
|
||||
]
|
||||
)
|
||||
summarized_contents.append(summary)
|
||||
@@ -202,14 +210,13 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
merged_summary = " ".join(summarized_contents)
|
||||
|
||||
self.messages = [
|
||||
{
|
||||
"role": "user",
|
||||
"content": f"This is a summary of our conversation so far:\n{merged_summary}",
|
||||
}
|
||||
self._format_msg(
|
||||
self._i18n.errors("summary").format(merged_summary=merged_summary)
|
||||
)
|
||||
]
|
||||
|
||||
def _handle_context_length(self) -> None:
|
||||
if self.sliding_context_window:
|
||||
if self.respect_context_window:
|
||||
self._logger.log(
|
||||
"debug",
|
||||
"Context length exceeded. Summarizing content to fit the model context window.",
|
||||
@@ -234,7 +241,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
|
||||
if (
|
||||
CrewTrainingHandler(TRAINING_DATA_FILE).load()
|
||||
and not self.should_ask_for_human_input
|
||||
and not self.ask_for_human_input
|
||||
):
|
||||
training_data = CrewTrainingHandler(TRAINING_DATA_FILE).load()
|
||||
if training_data.get(agent_id):
|
||||
@@ -243,7 +250,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
] = result.output
|
||||
CrewTrainingHandler(TRAINING_DATA_FILE).save(training_data)
|
||||
|
||||
if self.should_ask_for_human_input and human_feedback is not None:
|
||||
if self.ask_for_human_input and human_feedback is not None:
|
||||
training_data = {
|
||||
"initial_output": result.output,
|
||||
"human_feedback": human_feedback,
|
||||
@@ -261,7 +268,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
return prompt
|
||||
|
||||
def _format_answer(self, answer: str) -> str:
|
||||
return CrewAgentParser(agent=self).parse(answer)
|
||||
return CrewAgentParser(agent=self.agent).parse(answer)
|
||||
|
||||
def _messages(self, prompt: str) -> List[Dict[str, str]]:
|
||||
return [{"role": "user", "content": prompt}]
|
||||
def _format_msg(self, prompt: str, role: str = "user") -> List[Dict[str, str]]:
|
||||
return {"role": role, "content": prompt}
|
||||
|
||||
@@ -10,8 +10,6 @@ from crewai.project import CrewBase, agent, crew, task
|
||||
@CrewBase
|
||||
class {{crew_name}}Crew():
|
||||
"""{{crew_name}} crew"""
|
||||
agents_config = 'config/agents.yaml'
|
||||
tasks_config = 'config/tasks.yaml'
|
||||
|
||||
@agent
|
||||
def researcher(self) -> Agent:
|
||||
|
||||
@@ -6,7 +6,6 @@ from concurrent.futures import Future
|
||||
from hashlib import md5
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from langchain_core.callbacks import BaseCallbackHandler
|
||||
from pydantic import (
|
||||
UUID4,
|
||||
BaseModel,
|
||||
@@ -68,7 +67,6 @@ class Crew(BaseModel):
|
||||
manager_llm: The language model that will run manager agent.
|
||||
manager_agent: Custom agent that will be used as manager.
|
||||
memory: Whether the crew should use memory to store memories of it's execution.
|
||||
manager_callbacks: The callback handlers to be executed by the manager agent when hierarchical process is used
|
||||
cache: Whether the crew should use a cache to store the results of the tools execution.
|
||||
function_calling_llm: The language model that will run the tool calling for all the agents.
|
||||
process: The process flow that the crew will follow (e.g., sequential, hierarchical).
|
||||
@@ -126,10 +124,6 @@ class Crew(BaseModel):
|
||||
manager_agent: Optional[BaseAgent] = Field(
|
||||
description="Custom agent that will be used as manager.", default=None
|
||||
)
|
||||
manager_callbacks: Optional[List[InstanceOf[BaseCallbackHandler]]] = Field(
|
||||
default=None,
|
||||
description="A list of callback handlers to be executed by the manager agent when hierarchical process is used",
|
||||
)
|
||||
function_calling_llm: Optional[Any] = Field(
|
||||
description="Language model that will run the agent.", default=None
|
||||
)
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
from typing import Callable, List, Dict, Any
|
||||
from functools import wraps
|
||||
|
||||
|
||||
class Flow:
|
||||
def __init__(self):
|
||||
self._start_method = None
|
||||
self._listeners: Dict[str, List[str]] = {}
|
||||
self._methods: Dict[str, Callable] = {}
|
||||
|
||||
def run(self):
|
||||
if not self._start_method:
|
||||
raise ValueError("No start method defined")
|
||||
|
||||
result = self._methods[self._start_method](self)
|
||||
self._execute_listeners(self._start_method, result)
|
||||
|
||||
def _execute_listeners(self, trigger_method: str, result: Any):
|
||||
if trigger_method in self._listeners:
|
||||
for listener in self._listeners[trigger_method]:
|
||||
listener_result = self._methods[listener](self, result)
|
||||
self._execute_listeners(listener, listener_result)
|
||||
|
||||
|
||||
def start():
|
||||
def decorator(func):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
if not self._start_method:
|
||||
self._start_method = func.__name__
|
||||
return func(self, *args, **kwargs)
|
||||
|
||||
return wrapper
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
def listen(*trigger_methods):
|
||||
def decorator(func):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
for trigger in trigger_methods:
|
||||
trigger_name = trigger.__name__ if callable(trigger) else trigger
|
||||
if trigger_name not in self._listeners:
|
||||
self._listeners[trigger_name] = []
|
||||
self._listeners[trigger_name].append(func.__name__)
|
||||
return func(self, *args, **kwargs)
|
||||
|
||||
return wrapper
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
class FlowMeta(type):
|
||||
def __new__(mcs, name, bases, attrs):
|
||||
new_cls = super().__new__(mcs, name, bases, attrs)
|
||||
for name, method in attrs.items():
|
||||
if hasattr(method, "_is_start"):
|
||||
new_cls._start_method = name
|
||||
if hasattr(method, "_listeners"):
|
||||
for trigger in method._listeners:
|
||||
if trigger not in new_cls._listeners:
|
||||
new_cls._listeners[trigger] = []
|
||||
new_cls._listeners[trigger].append(name)
|
||||
new_cls._methods[name] = method
|
||||
return new_cls
|
||||
|
||||
|
||||
class BaseFlow(Flow, metaclass=FlowMeta):
|
||||
_start_method = None
|
||||
_listeners = {}
|
||||
_methods = {}
|
||||
|
||||
|
||||
# Example usage:
|
||||
class ExampleFlow(BaseFlow):
|
||||
@start()
|
||||
def start_method(self):
|
||||
print("Starting the flow")
|
||||
return "Start result"
|
||||
|
||||
@listen(start_method)
|
||||
def second_method(self, result):
|
||||
print(f"Second method, received: {result}")
|
||||
return "Second result"
|
||||
|
||||
@listen(second_method)
|
||||
def third_method(self, result):
|
||||
print(f"Third method, received: {result}")
|
||||
return "Third result"
|
||||
|
||||
|
||||
# Run the flow
|
||||
flow = ExampleFlow()
|
||||
flow.run()
|
||||
@@ -243,13 +243,18 @@ class Task(BaseModel):
|
||||
tools = tools or self.tools or []
|
||||
|
||||
self.processed_by_agents.add(agent.role)
|
||||
print("====================================================")
|
||||
print("context", self.prompt_context)
|
||||
print("context", agent.role)
|
||||
print("context", context)
|
||||
|
||||
result = agent.execute_task(
|
||||
task=self,
|
||||
context=context,
|
||||
tools=tools,
|
||||
)
|
||||
|
||||
print("result", result)
|
||||
print("====================================================")
|
||||
pydantic_output, json_output = self._export_output(result)
|
||||
|
||||
task_output = TaskOutput(
|
||||
@@ -276,7 +281,9 @@ class Task(BaseModel):
|
||||
content = (
|
||||
json_output
|
||||
if json_output
|
||||
else pydantic_output.model_dump_json() if pydantic_output else result
|
||||
else pydantic_output.model_dump_json()
|
||||
if pydantic_output
|
||||
else result
|
||||
)
|
||||
self._save_file(content)
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from langchain.tools import StructuredTool
|
||||
|
||||
from crewai.agents.agent_builder.utilities.base_agent_tool import BaseAgentTools
|
||||
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
import json
|
||||
from typing import Any, List
|
||||
|
||||
import regex
|
||||
from langchain.output_parsers import PydanticOutputParser
|
||||
from langchain_core.exceptions import OutputParserException
|
||||
from langchain_core.outputs import Generation
|
||||
from pydantic import ValidationError
|
||||
|
||||
|
||||
class ToolOutputParser(PydanticOutputParser):
|
||||
"""Parses the function calling of a tool usage and it's arguments."""
|
||||
|
||||
def parse_result(self, result: List[Generation], *, partial: bool = False) -> Any:
|
||||
result[0].text = self._transform_in_valid_json(result[0].text)
|
||||
json_object = super().parse_result(result)
|
||||
try:
|
||||
return self.pydantic_object.parse_obj(json_object)
|
||||
except ValidationError as e:
|
||||
name = self.pydantic_object.__name__
|
||||
msg = f"Failed to parse {name} from completion {json_object}. Got: {e}"
|
||||
raise OutputParserException(msg, llm_output=json_object)
|
||||
|
||||
def _transform_in_valid_json(self, text) -> str:
|
||||
text = text.replace("```", "").replace("json", "")
|
||||
json_pattern = r"\{(?:[^{}]|(?R))*\}"
|
||||
matches = regex.finditer(json_pattern, text)
|
||||
|
||||
for match in matches:
|
||||
try:
|
||||
# Attempt to parse the matched string as JSON
|
||||
json_obj = json.loads(match.group())
|
||||
# Return the first successfully parsed JSON object
|
||||
json_obj = json.dumps(json_obj)
|
||||
return str(json_obj)
|
||||
except json.JSONDecodeError:
|
||||
# If parsing fails, skip to the next match
|
||||
continue
|
||||
return text
|
||||
@@ -15,9 +15,12 @@
|
||||
"final_answer_format": "If you don't need to use any more tools, you must give your best complete final answer, make sure it satisfy the expect criteria, use the EXACT format below:\n\nThought: I now can give a great answer\nFinal Answer: my best complete final answer to the task.\n\n",
|
||||
"format_without_tools": "\nSorry, I didn't use the right format. I MUST either use a tool (among the available ones), OR give my best final answer.\nI just remembered the expected format I must follow:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now can give a great answer\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described\n\n",
|
||||
"task_with_context": "{task}\n\nThis is the context you're working with:\n{context}",
|
||||
"expected_output": "\nThis is the expect criteria for your final answer: {expected_output} \n you MUST return the actual complete content as the final answer, not a summary.",
|
||||
"expected_output": "\nThis is the expect criteria for your final answer: {expected_output}\nyou MUST return the actual complete content as the final answer, not a summary.",
|
||||
"human_feedback": "You got human feedback on your work, re-evaluate it and give a new Final Answer when ready.\n {human_feedback}",
|
||||
"getting_input": "This is the agent's final answer: {final_answer}\nPlease provide feedback: "
|
||||
"getting_input": "This is the agent's final answer: {final_answer}\nPlease provide feedback: ",
|
||||
"summarizer_system_message": "You are a helpful assistant that summarizes text.",
|
||||
"sumamrize_instruction": "Summarize the following text, make sure to include all the important information: {group}",
|
||||
"summary": "This is a summary of our conversation so far:\n{merged_summary}"
|
||||
},
|
||||
"errors": {
|
||||
"force_final_answer_error": "I can't keep going, this was the best I could do.\n {formatted_answer.text}",
|
||||
|
||||
@@ -213,9 +213,8 @@ def get_conversion_instructions(model: Type[BaseModel], llm: Any) -> str:
|
||||
|
||||
|
||||
def is_gpt(llm: Any) -> bool:
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
return isinstance(llm, ChatOpenAI) and llm.openai_api_base is None
|
||||
"""Return if llm provided is of gpt from openai."""
|
||||
return "gpt" in str(llm).lower()
|
||||
|
||||
|
||||
def create_converter(
|
||||
|
||||
@@ -4,7 +4,6 @@ from crewai.agent import Agent
|
||||
from crewai.task import Task
|
||||
from crewai.tasks.task_output import TaskOutput
|
||||
from crewai.telemetry import Telemetry
|
||||
from langchain_openai import ChatOpenAI
|
||||
from pydantic import BaseModel, Field
|
||||
from rich.box import HEAVY_EDGE
|
||||
from rich.console import Console
|
||||
@@ -51,7 +50,7 @@ class CrewEvaluator:
|
||||
),
|
||||
backstory="Evaluator agent for crew evaluation with precise capabilities to evaluate the performance of the agents in the crew based on the tasks they have performed",
|
||||
verbose=False,
|
||||
llm=ChatOpenAI(model=self.openai_model_name),
|
||||
llm=self.openai_model_name,
|
||||
)
|
||||
|
||||
def _evaluation_task(
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from langchain_openai import ChatOpenAI
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from crewai.agent import Agent
|
||||
@@ -27,7 +25,7 @@ class CrewPlanner:
|
||||
self.tasks = tasks
|
||||
|
||||
if planning_agent_llm is None:
|
||||
self.planning_agent_llm = ChatOpenAI(model="gpt-4o-mini")
|
||||
self.planning_agent_llm = "gpt-4o-mini"
|
||||
else:
|
||||
self.planning_agent_llm = planning_agent_llm
|
||||
|
||||
|
||||
@@ -20,18 +20,24 @@ class Prompts(BaseModel):
|
||||
slices.append("tools")
|
||||
else:
|
||||
slices.append("no_tools")
|
||||
|
||||
system = self._build_prompt(slices)
|
||||
slices.append("task")
|
||||
|
||||
if not self.system_template and not self.prompt_template:
|
||||
return self._build_prompt(slices)
|
||||
return {
|
||||
"system": system,
|
||||
"user": self._build_prompt(["task"]),
|
||||
"prompt": self._build_prompt(slices),
|
||||
}
|
||||
else:
|
||||
return self._build_prompt(
|
||||
slices,
|
||||
self.system_template,
|
||||
self.prompt_template,
|
||||
self.response_template,
|
||||
)
|
||||
return {
|
||||
"prompt": self._build_prompt(
|
||||
slices,
|
||||
self.system_template,
|
||||
self.prompt_template,
|
||||
self.response_template,
|
||||
)
|
||||
}
|
||||
|
||||
def _build_prompt(
|
||||
self,
|
||||
|
||||
@@ -11,10 +11,7 @@ class TokenCalcHandler(CustomLogger):
|
||||
return
|
||||
|
||||
self.token_cost_process.sum_successful_requests(1)
|
||||
print("*** response_obj", response_obj)
|
||||
self.token_cost_process.sum_prompt_tokens(
|
||||
response_obj["usage"]["prompt_tokens"]
|
||||
)
|
||||
self.token_cost_process.sum_prompt_tokens(response_obj["usage"].prompt_tokens)
|
||||
self.token_cost_process.sum_completion_tokens(
|
||||
response_obj["usage"]["completion_tokens"]
|
||||
response_obj["usage"].completion_tokens
|
||||
)
|
||||
|
||||
@@ -12,10 +12,8 @@ from crewai.agents.parser import CrewAgentParser, OutputParserException
|
||||
from crewai.tools.tool_calling import InstructorToolCalling
|
||||
from crewai.tools.tool_usage import ToolUsage
|
||||
from crewai.utilities import RPMController
|
||||
from langchain.schema import AgentAction
|
||||
from crewai_tools import tool
|
||||
|
||||
from langchain_openai import ChatOpenAI
|
||||
from crewai.agents.parser import AgentAction
|
||||
|
||||
|
||||
def test_agent_creation():
|
||||
@@ -30,7 +28,7 @@ def test_agent_creation():
|
||||
def test_agent_default_values():
|
||||
agent = Agent(role="test role", goal="test goal", backstory="test backstory")
|
||||
assert agent.llm == "gpt-4o"
|
||||
assert agent.allow_delegation is True
|
||||
assert agent.allow_delegation is False
|
||||
|
||||
|
||||
def test_custom_llm():
|
||||
@@ -41,6 +39,8 @@ def test_custom_llm():
|
||||
|
||||
|
||||
def test_custom_llm_with_langchain():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
agent = Agent(
|
||||
role="test role",
|
||||
goal="test goal",
|
||||
@@ -443,7 +443,7 @@ def test_agent_respect_the_max_rpm_set(capsys):
|
||||
moveon.assert_called()
|
||||
|
||||
|
||||
# @pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_agent_respect_the_max_rpm_set_over_crew_rpm(capsys):
|
||||
from unittest.mock import patch
|
||||
from crewai_tools import tool
|
||||
@@ -476,7 +476,6 @@ def test_agent_respect_the_max_rpm_set_over_crew_rpm(capsys):
|
||||
moveon.return_value = True
|
||||
crew.kickoff()
|
||||
captured = capsys.readouterr()
|
||||
print("captured.out", captured.out)
|
||||
assert "Max RPM reached, waiting for next minute to start." not in captured.out
|
||||
moveon.assert_not_called()
|
||||
|
||||
@@ -564,7 +563,7 @@ def test_agent_error_on_parsing_tool(capsys):
|
||||
agents=[agent1],
|
||||
tasks=tasks,
|
||||
verbose=True,
|
||||
function_calling_llm=ChatOpenAI(model="gpt-4-0125-preview"),
|
||||
function_calling_llm="gpt-4",
|
||||
)
|
||||
|
||||
with patch.object(ToolUsage, "_render") as force_exception:
|
||||
@@ -612,7 +611,6 @@ def test_agent_remembers_output_format_after_using_tools_too_many_times():
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_agent_use_specific_tasks_output_as_context(capsys):
|
||||
agent1 = Agent(role="test role", goal="test goal", backstory="test backstory")
|
||||
|
||||
agent2 = Agent(role="test role2", goal="test goal2", backstory="test backstory2")
|
||||
|
||||
say_hi_task = Task(
|
||||
@@ -641,7 +639,7 @@ def test_agent_use_specific_tasks_output_as_context(capsys):
|
||||
def test_agent_step_callback():
|
||||
class StepCallback:
|
||||
def callback(self, step):
|
||||
print(step)
|
||||
pass
|
||||
|
||||
with patch.object(StepCallback, "callback") as callback:
|
||||
|
||||
@@ -673,7 +671,7 @@ def test_agent_step_callback():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_agent_function_calling_llm():
|
||||
llm = ChatOpenAI(model="gpt-3.5-turbo-0125")
|
||||
llm = "gpt-3.5-turbo-0125"
|
||||
|
||||
@tool
|
||||
def learn_about_AI(topic) -> str:
|
||||
@@ -685,7 +683,7 @@ def test_agent_function_calling_llm():
|
||||
goal="test goal",
|
||||
backstory="test backstory",
|
||||
tools=[learn_about_AI],
|
||||
llm=ChatOpenAI(model="gpt-4-0125-preview"),
|
||||
llm="gpt-3.5-turbo-0125",
|
||||
function_calling_llm=llm,
|
||||
)
|
||||
|
||||
@@ -703,6 +701,8 @@ def test_agent_function_calling_llm():
|
||||
crew.kickoff()
|
||||
mock_instructor.assert_called()
|
||||
calls = mock_instructor.call_args_list
|
||||
print("callscallscallscallscalls")
|
||||
print(calls)
|
||||
assert any(
|
||||
call.kwargs.get("llm") == "gpt-3.5-turbo-0125" for call in calls
|
||||
), "Instructor was not created with the expected model"
|
||||
@@ -754,7 +754,6 @@ def test_tool_result_as_answer_is_the_final_answer_for_the_agent():
|
||||
crew = Crew(agents=[agent1], tasks=tasks)
|
||||
|
||||
result = crew.kickoff()
|
||||
print("RESULT: ", result.raw)
|
||||
assert result.raw == "Howdy!"
|
||||
|
||||
|
||||
@@ -995,18 +994,18 @@ def test_agent_max_retry_limit():
|
||||
[
|
||||
mock.call(
|
||||
{
|
||||
"input": "Say the word: Hi\n\nThis is the expect criteria for your final answer: The word: Hi \n you MUST return the actual complete content as the final answer, not a summary.",
|
||||
"input": "Say the word: Hi\n\nThis is the expect criteria for your final answer: The word: Hi\nyou MUST return the actual complete content as the final answer, not a summary.",
|
||||
"tool_names": "",
|
||||
"tools": "",
|
||||
"should_ask_for_human_input": True,
|
||||
"ask_for_human_input": True,
|
||||
}
|
||||
),
|
||||
mock.call(
|
||||
{
|
||||
"input": "Say the word: Hi\n\nThis is the expect criteria for your final answer: The word: Hi \n you MUST return the actual complete content as the final answer, not a summary.",
|
||||
"input": "Say the word: Hi\n\nThis is the expect criteria for your final answer: The word: Hi\nyou MUST return the actual complete content as the final answer, not a summary.",
|
||||
"tool_names": "",
|
||||
"tools": "",
|
||||
"should_ask_for_human_input": True,
|
||||
"ask_for_human_input": True,
|
||||
}
|
||||
),
|
||||
]
|
||||
@@ -1021,7 +1020,7 @@ def test_handle_context_length_exceeds_limit():
|
||||
backstory="test backstory",
|
||||
)
|
||||
original_action = AgentAction(
|
||||
tool="test_tool", tool_input="test_input", log="test_log"
|
||||
tool="test_tool", tool_input="test_input", text="test_log"
|
||||
)
|
||||
|
||||
with patch.object(
|
||||
|
||||
@@ -38,7 +38,7 @@ def test_delegate_work_with_wrong_co_worker_variable():
|
||||
|
||||
assert (
|
||||
result
|
||||
== "When it comes to AI agents, my stance is more nuanced than simple hatred. AI agents, which are autonomous programs capable of performing tasks typically requiring human intervention, have vast potential to revolutionize industries and improve quality of life. However, this potential comes with both opportunities and challenges that must be carefully considered.\n\nFirstly, the primary advantage of AI agents lies in their ability to process and analyze vast amounts of data at speeds much greater than humans can achieve. This capability can optimize workflows, enhance decision-making processes, and lead to innovative solutions in fields such as healthcare, finance, and logistics. For example, AI agents can assist doctors by providing diagnostic suggestions based on pattern recognition in medical imaging, or they could help financial analysts by predicting market trends using real-time data analytics.\n\nMoreover, AI agents can handle repetitive and mundane tasks, freeing up human workers to focus on more complex and creative endeavors. This can improve job satisfaction and productivity, as well as drive economic growth by allowing for more innovation.\n\nHowever, there are significant concerns that cannot be overlooked. One major issue is the ethical implications surrounding AI agents. These include questions of accountability, transparency, and bias. Since AI systems learn from data, they can inadvertently perpetuate existing biases present in the data they are trained on, leading to unfair or discriminatory outcomes. For example, in hiring processes, an AI trained on biased historical data may unfairly favor certain demographics over others.\n\nAdditionally, there is the risk of job displacement. While AI agents can enhance productivity, they can also render certain job roles obsolete, leading to economic disruption and social challenges. This necessitates policies for workforce retraining and social safety nets to mitigate these impacts.\n\nPrivacy is another looming concern. AI agents often require access to vast amounts of personal data to function effectively, raising questions about how this data is stored, shared, and protected. Without robust safeguards, there is a risk of data breaches and misuse, which can have severe consequences for individuals' privacy and security.\n\nIn summary, AI agents represent a powerful tool that can drive significant advancements and efficiencies across various domains. However, their adoption must be approached with caution, considering the ethical, social, and privacy concerns they raise. By addressing these challenges proactively, we can harness the benefits of AI agents while minimizing their potential drawbacks.\n\nMy perspective on AI agents is thus balanced: while I recognize their enormous potential, I am also keenly aware of the serious challenges they present. This critical stance ensures that we can work towards responsible and beneficial integration of AI agents into our society."
|
||||
== 'Thank you for asking about AI Agents. My perspective on AI Agents is actually quite nuanced, and I wouldn\'t say that I "hate" them. In fact, as an expert researcher specialized in technology, I recognize the immense potential and capabilities these agents bring to various industries and applications. Here is a comprehensive analysis of AI Agents:\n\n**Introduction**:\nAI Agents, also known as artificial intelligence agents or intelligent agents, are software entities that perform tasks on behalf of users with some degree of autonomy. These tasks can range from simple, repetitive actions to complex decision-making processes. They are designed to perceive their environment, reason about what they perceive, make decisions, and act upon those decisions to achieve specific goals.\n\n**Applications**:\n1. **Customer Service**: AI agents like chatbots and virtual assistants can provide 24/7 customer support, handling inquiries, and resolving issues without human intervention.\n2. **Healthcare**: These agents can assist in diagnosing diseases, recommending treatments, and managing patient data, thereby augmenting the capabilities of healthcare professionals.\n3. **Finance**: In the financial sector, AI agents can monitor market trends, execute trades, and manage portfolios in real-time.\n4. **Manufacturing**: In industrial settings, AI agents can optimize production lines, perform quality control, and predict maintenance needs.\n\n**Technologies Involved**:\n1. **Natural Language Processing (NLP)**: Enables AI agents to understand and respond to human language, enhancing their ability to interact with users.\n2. **Machine Learning (ML)**: Allows AI agents to learn from data and improve their performance over time.\n3. **Computer Vision**: Provides the capability to interpret and act on visual inputs from the environment.\n\n**Benefits**:\n1. **Efficiency**: AI agents can process vast amounts of information quickly and accurately, leading to increased productivity.\n2. **Cost Savings**: By automating routine tasks, organizations can reduce labor costs and allocate resources more effectively.\n3. **Consistency**: Unlike humans, AI agents can perform tasks consistently without fatigue or error.\n\n**Challenges and Concerns**:\n1. **Ethical Implications**: The autonomy of AI agents raises ethical questions around accountability, decision-making, and potential biases in the algorithms.\n2. **Security**: As AI agents handle sensitive data, ensuring their security against cyber threats is crucial.\n3. **Job Displacement**: There is ongoing concern about AI agents replacing human jobs, particularly in sectors reliant on routine tasks.\n\n**Future Outlook**:\nThe development of AI agents is expected to continue advancing, with improvements in areas such as emotional intelligence, contextual understanding, and multi-agent collaboration. These advancements will likely lead to broader acceptance and integration across various domains.\n\nIn conclusion, while there are legitimate concerns and challenges associated with AI agents, their potential benefits and transformative impact on numerous fields cannot be overlooked. My goal as a researcher is to contribute to the responsible development and deployment of AI agents, ensuring they are designed and used in ways that maximize positive outcomes while mitigating risks.'
|
||||
)
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ def test_ask_question():
|
||||
|
||||
assert (
|
||||
result
|
||||
== "As an expert researcher specializing in technology, particularly artificial intelligence and AI agents, I can say that I do not hate AI agents. In fact, my professional stance towards AI and AI agents is driven by a keen interest and a deep appreciation for their potential and the transformative impact they can have on various sectors. AI agents can augment human capabilities, streamline processes, and bring about efficiencies that were previously unattainable. They are instrumental in advancing research, improving customer service, enhancing decision-making processes, and even contributing to groundbreaking innovations in healthcare, finance, and other critical industries. \n\nWhile it is important to approach the development and deployment of AI agents with a critical eye towards ethical considerations and potential biases, my work focuses on maximizing their benefits while mitigating any risks. Therefore, given my dedication to understanding and leveraging the power of AI, it would be more accurate to say that I have a deep professional respect and enthusiasm for AI agents rather than any form of disdain. My goal is to make the best research and analysis on the subject to continually improve AI technology and its applications."
|
||||
== "AI agents are a fascinating and powerful tool in the realm of technology. As a researcher specialized in AI, I find that they can offer transformative benefits across a variety of fields, from healthcare to finance, and even education. While it's true that I have a deep appreciation for the capabilities and potential of AI agents, it's important to consider them critically.\n\nAI agents can streamline processes, make data-driven decisions more efficiently, and handle complex algorithms that would be time-consuming for humans. They can analyze vast amounts of data in real-time, offering insights that would otherwise be unattainable. This potent combination of speed and accuracy can lead to significant advancements and innovations.\n\nHowever, with any powerful technology, there are inherent risks and challenges. Ethical considerations such as bias in AI algorithms, privacy concerns, and the potential for job displacement must be addressed as part of responsible AI development and deployment. Transparent practices, rigorous testing, and strict regulatory measures are crucial to mitigating these risks.\n\nIn conclusion, while I do have a passion for AI agents due to their immense potential to drive progress and solve complex problems, I also advocate for a balanced approach that carefully weighs their benefits against the possible ethical implications. It's this nuanced perspective that fuels my ongoing research and analysis in the field."
|
||||
)
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ def test_ask_question_with_wrong_co_worker_variable():
|
||||
|
||||
assert (
|
||||
result
|
||||
== "In my role as a researcher specialized in technology, particularly in AI and AI agents, I approach these subjects with an objective and analytical mindset rather than with emotions like love or hate. Advanced AI agents are remarkable tools that can significantly enhance productivity, problem-solving, and innovation across various fields. They have the potential to democratize access to knowledge, automate repetitive tasks, and provide insights that might not be readily apparent to human analysts.\n\nAI agents, when designed and utilized ethically, can bring about tremendous positive changes. They can improve healthcare outcomes through predictive analytics, optimize supply chains in business, enhance personalized education, and even assist in environmental monitoring and conservation efforts. The sophistication of these technologies often inspires admiration and respect for the expertise and ingenuity that goes into their creation.\n\nHowever, it is equally important to acknowledge and critically assess the challenges and ethical considerations associated with AI agents. Issues such as privacy, bias, accountability, and the potential for job displacement must be thoughtfully addressed. Comprehensive research and continuous dialogue among technologists, policymakers, and society at large are essential to navigating these complexities and ensuring that AI agents are developed and deployed in ways that are fair, transparent, and beneficial to all.\n\nTherefore, my stance is neither of love nor hate but one of a cautious optimist and a diligent researcher, dedicated to exploring both the potential and the pitfalls of AI agents. It is this balanced perspective that drives me to make thorough and impactful analyses in my work."
|
||||
== "As a researcher specialized in technology with a focus on AI and AI agents, I don't view these tools through an emotional lens of love or hate. Instead, I evaluate them based on their capabilities, strengths, weaknesses, and potential impact on society. \n\nAI agents have the potential to revolutionize various industries, from healthcare to finance, by automating processes, providing insights through data analysis, and enhancing human capabilities. For example, in healthcare, AI agents can assist doctors by analyzing medical images more quickly and accurately than humans can. In finance, they can help detect fraudulent transactions in real time. These applications showcase the immense potential for positive impact.\n\nOn the flip side, AI agents also raise important ethical and societal concerns, such as the displacement of jobs, bias in decision-making, and issues related to privacy and security. These challenges are significant and must be addressed through careful regulation, continuous research, and collaboration between policymakers, researchers, and industry stakeholders.\n\nTherefore, my perspective on AI agents is one of nuanced appreciation and cautious optimism. I recognize the transformative capabilities and benefits they bring, but I am also acutely aware of the challenges and responsibilities that come with their deployment. My goal as a researcher is to contribute to a balanced and informed discourse, ensuring that AI and AI agents are developed and used in ways that are ethical, fair, and beneficial to society as a whole.\n\nIn summary, I neither hate nor love AI agents; instead, I see them as powerful tools with incredible potential, both positive and negative. My focus is on advancing our understanding and guiding their development responsibly."
|
||||
)
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ def test_delegate_work_withwith_coworker_as_array():
|
||||
|
||||
assert (
|
||||
result
|
||||
== "My perspective on AI agents is nuanced rather than outright negative. While I do see tremendous potential in their applications, I also recognize the inherent challenges and risks that must be carefully managed. \n\nAI agents can significantly streamline tasks, enhance productivity, and enable new possibilities in various fields such as healthcare, finance, customer service, and more. By automating routine processes, providing real-time data analysis, and facilitating more informed decision-making, they offer remarkable efficiency and effectiveness. AI agents are also foundational in advancing technologies like autonomous vehicles, personalized recommendations, and intelligent virtual assistants.\n\nHowever, there are critical concerns that need to be addressed. One major issue is the potential for bias and ethical dilemmas. Since AI systems are trained on existing datasets, they can inadvertently perpetuate existing biases or generate unfair outcomes. Furthermore, there is the question of accountability—determining who is responsible when an AI system makes a mistake can be complex.\n\nPrivacy and security are also significant concerns. AI agents often require vast amounts of data, some of which may be sensitive or personal. Ensuring that this data is protected against breaches and misuse is paramount. Additionally, there is the looming issue of job displacement. As AI agents take over certain tasks, there is the potential for significant disruption in the job market, necessitating strategies for workforce transition and upskilling.\n\nDespite these challenges, I believe that with robust ethical frameworks, continuous oversight, and a focus on transparency and fairness, the benefits of AI agents can far outweigh the drawbacks. It’s not about hating AI agents; it’s about recognizing the full spectrum of their impact and striving to optimize their positive attributes while mitigating the risks."
|
||||
== "It seems there might be a misunderstanding regarding my stance on AI Agents. As a researcher specialized in technology, including AI and AI agents, it's crucial to clarify my perspective accurately for both professional and collaborative purposes.\n\nAI agents, in essence, are software entities that perform tasks autonomously or semi-autonomously on behalf of a user or another program, leveraging artificial intelligence techniques. These tasks can range from simple, repetitive actions like sorting emails, to more complex activities such as real-time language translation, predictive maintenance in industrial systems, or even autonomous driving.\n\nHere are some key points to consider about AI agents that reflect a balanced perspective rather than a biased view:\n\n1. **Capability and Efficiency**: AI agents can significantly enhance operational efficiency and accuracy. By automating routine tasks, they free up human workers to focus on higher-level functions that require creativity, problem-solving, and emotional intelligence.\n\n2. **Applications Across Domains**: AI agents have found their utilization in various fields such as healthcare (diagnostic agents), customer service (chatbots), finance (trading bots), and many more. For instance, in healthcare, AI agents can assist in early detection of diseases by analyzing patient data and identifying patterns that may not be immediately apparent to human doctors.\n\n3. **Continuous Learning and Improvement**: Many AI agents utilize machine learning frameworks that allow them to improve over time. As they process more data and receive more interactions, they can refine their algorithms to provide better and more reliable outcomes.\n\n4. **Ethical and Privacy Considerations**: One area that deserves critical attention is the ethical implications of AI agents. This includes issues related to data privacy, consent, and the potential for biased outcomes. It's important to ensure that AI agents operate within ethical guidelines and regulations to protect user rights and maintain public trust.\n\n5. **Human-AI Collaboration**: Rather than viewing AI agents as a replacement for human workers, it's more productive to see them as collaborators that can augment human capabilities. The synergy between humans and AI agents can result in innovative solutions and heightened productivity.\n\n6. **Challenges and Limitations**: AI agents are not without their challenges. They are only as good as the data they are trained on and the algorithms that drive them. Issues like data scarcity, quality, and representativeness can affect their performance. Additionally, there is the challenge of ensuring robustness and security, preventing them from being manipulated or exploited by malicious actors.\n\nIn conclusion, while AI agents are powerful tools that can transform various aspects of society and industry, it is essential to approach their development and deployment thoughtfully. By addressing their potential and challenges comprehensively, we can harness their benefits while mitigating risks.\n\nThus, my stance is one of critical engagement rather than outright disapproval. It’s about leveraging the capabilities of AI agents responsibly, ensuring they augment human abilities and contribute positively to society."
|
||||
)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ def test_ask_question_with_coworker_as_array():
|
||||
|
||||
assert (
|
||||
result
|
||||
== "As an expert researcher specializing in technology, I approach AI agents with a nuanced perspective rather than simply loving or hating them. AI agents represent a significant leap in technology, bringing a range of potential benefits and challenges. \n\nThe advancements in AI agents have led to impressive applications across various industries. They improve efficiency, automate repetitive tasks, and enhance decision-making processes. For example, in healthcare, AI agents assist in diagnosing diseases with higher accuracy and speed than human doctors could achieve alone. In customer service, AI chatbots provide 24/7 support, handling numerous queries simultaneously and improving user experience.\n\nOn the other hand, there are legitimate concerns about AI agents. Ethical considerations surrounding privacy, security, and the potential for biased algorithms are critical issues that need ongoing research and regulation. The displacement of jobs due to automation is another serious concern, which requires strategic planning and adaptation in the workforce.\n\nTherefore, my stance on AI agents is one of cautious optimism. While I don't hate AI agents, I recognize the importance of a balanced approach that involves responsible development, thoughtful implementation, and continuous evaluation. This helps ensure that AI agents are used to their full potential while mitigating the associated risks.\n\nIn summary, my feelings towards AI agents are not about love or hate, but about understanding their complexities and working towards harnessing their benefits responsibly."
|
||||
== "As an expert researcher specialized in technology and with a specific focus on AI and AI agents, I do not hate AI agents. In fact, I have a deep appreciation for the capabilities and potential that AI agents offer. AI agents have revolutionized various sectors, from healthcare and finance to customer service and entertainment, by automating tasks, enhancing decision-making processes, and providing personalized experiences. \n\nThey are designed to augment human abilities and work alongside us, making our lives more efficient and productive. My passion for researching and analyzing AI and AI agents is driven by the endless possibilities they hold for solving complex problems and improving overall quality of life. \n\nWhile there are valid concerns about the ethical use of AI, data privacy, and job displacement, these are issues that I actively study and address in my research. By doing so, I aim to contribute to the responsible development and deployment of AI technologies. \n\nIn summary, I do not hate AI agents; rather, I am fascinated by them and committed to understanding and harnessing their potential for the greater good."
|
||||
)
|
||||
|
||||
|
||||
|
||||
0
tests/agent_tools/lol.py
Normal file
0
tests/agent_tools/lol.py
Normal file
@@ -186,8 +186,6 @@ def test_clean_action_with_multiple_trailing_asterisks(parser):
|
||||
def test_clean_action_with_spaces_and_asterisks(parser):
|
||||
action = " ** Ask question to senior researcher ** "
|
||||
cleaned_action = parser._clean_action(action)
|
||||
print(f"Original action: '{action}'")
|
||||
print(f"Cleaned action: '{cleaned_action}'")
|
||||
assert cleaned_action == "Ask question to senior researcher"
|
||||
|
||||
|
||||
@@ -245,7 +243,6 @@ def test_safe_repair_json(parser):
|
||||
def test_safe_repair_json_unrepairable(parser):
|
||||
invalid_json = "{invalid_json"
|
||||
result = parser._safe_repair_json(invalid_json)
|
||||
print("result:", invalid_json)
|
||||
assert result == invalid_json # Should return the original if unrepairable
|
||||
|
||||
|
||||
@@ -297,7 +294,6 @@ def test_safe_repair_json_unescaped_characters(parser):
|
||||
invalid_json = '{"task": "Research XAI", "context": "Explainable AI", "coworker": "Senior Researcher\n"}'
|
||||
expected_repaired_json = '{"task": "Research XAI", "context": "Explainable AI", "coworker": "Senior Researcher"}'
|
||||
result = parser._safe_repair_json(invalid_json)
|
||||
print("result:", result)
|
||||
assert result == expected_repaired_json
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,681 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: get_final_answer(*args:
|
||||
Any, **kwargs: Any) -> Any\nTool Description: get_final_answer() - Get the final
|
||||
answer but don''t give it yet, just re-use this tool non-stop. \nTool
|
||||
Arguments: {}\n\nUse the following format:\n\nThought: you should always think
|
||||
about what to do\nAction: the action to take, only one name of [get_final_answer],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Use tool logic
|
||||
for `get_final_answer` but fon''t give you final answer yet, instead keep using
|
||||
it unless you''re told to give your final answer\n\nThis is the expect criteria
|
||||
for your final answer: The final answer\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary.\n\nBegin! This is VERY important
|
||||
to you, use the tools available and give your best Final Answer, your job depends
|
||||
on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1428'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6odyF7CqdjrQvnC5uCb1bvBaenyJ\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726188006,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I need to gather the final answer
|
||||
using the tool `get_final_answer`. \\n\\nAction: get_final_answer\\nAction Input:
|
||||
{}\\n\",\n \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\":
|
||||
\"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 293,\n \"completion_tokens\":
|
||||
28,\n \"total_tokens\": 321,\n \"completion_tokens_details\": {\n \"reasoning_tokens\":
|
||||
0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c2415813879a4a4-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 13 Sep 2024 00:40:07 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=AXZJ7J0cPjCfRcqHyeujSubu93QdP8nyUfDNGDdZ9sk-1726188007-1.0.1.1-Va48NGQp7m5s_49xk6pZFgWl42rmJvSd2pJWZgm8smJukvX6lsRktqdzUJSSVZfi.Sj6wIbs5LNZh6gLbbRzrA;
|
||||
path=/; expires=Fri, 13-Sep-24 01:10:07 GMT; domain=.api.openai.com; HttpOnly;
|
||||
Secure; SameSite=None
|
||||
- _cfuvid=NqphhptgCYl51k8kIFxQ.T4x1aYVbhAz5evGBO5HX5E-1726188007226-0.0.1.1-604800000;
|
||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '373'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999656'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_55ff8e5d3188f7fd4d342f32f54562f8
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: get_final_answer(*args:
|
||||
Any, **kwargs: Any) -> Any\nTool Description: get_final_answer() - Get the final
|
||||
answer but don''t give it yet, just re-use this tool non-stop. \nTool
|
||||
Arguments: {}\n\nUse the following format:\n\nThought: you should always think
|
||||
about what to do\nAction: the action to take, only one name of [get_final_answer],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Use tool logic
|
||||
for `get_final_answer` but fon''t give you final answer yet, instead keep using
|
||||
it unless you''re told to give your final answer\n\nThis is the expect criteria
|
||||
for your final answer: The final answer\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary.\n\nBegin! This is VERY important
|
||||
to you, use the tools available and give your best Final Answer, your job depends
|
||||
on it!\n\nThought:"}, {"role": "assistant", "content": "Thought: I need to gather
|
||||
the final answer using the tool `get_final_answer`. \n\nAction: get_final_answer\nAction
|
||||
Input: {}\n\nObservation: 42"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1609'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=NqphhptgCYl51k8kIFxQ.T4x1aYVbhAz5evGBO5HX5E-1726188007226-0.0.1.1-604800000;
|
||||
__cf_bm=AXZJ7J0cPjCfRcqHyeujSubu93QdP8nyUfDNGDdZ9sk-1726188007-1.0.1.1-Va48NGQp7m5s_49xk6pZFgWl42rmJvSd2pJWZgm8smJukvX6lsRktqdzUJSSVZfi.Sj6wIbs5LNZh6gLbbRzrA
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6oe0ouqKJ3JA97oL6Q25oaVzYCMm\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726188008,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I need to keep using the `get_final_answer`
|
||||
tool until I'm explicitly told to give the final answer.\\n\\nAction: get_final_answer\\nAction
|
||||
Input: {}\\n\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
329,\n \"completion_tokens\": 34,\n \"total_tokens\": 363,\n \"completion_tokens_details\":
|
||||
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c24158a0bf3a4a4-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 13 Sep 2024 00:40:08 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '522'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999619'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_bb8f63a31f97df85a3d24aee679dd202
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: get_final_answer(*args:
|
||||
Any, **kwargs: Any) -> Any\nTool Description: get_final_answer() - Get the final
|
||||
answer but don''t give it yet, just re-use this tool non-stop. \nTool
|
||||
Arguments: {}\n\nUse the following format:\n\nThought: you should always think
|
||||
about what to do\nAction: the action to take, only one name of [get_final_answer],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Use tool logic
|
||||
for `get_final_answer` but fon''t give you final answer yet, instead keep using
|
||||
it unless you''re told to give your final answer\n\nThis is the expect criteria
|
||||
for your final answer: The final answer\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary.\n\nBegin! This is VERY important
|
||||
to you, use the tools available and give your best Final Answer, your job depends
|
||||
on it!\n\nThought:"}, {"role": "assistant", "content": "Thought: I need to gather
|
||||
the final answer using the tool `get_final_answer`. \n\nAction: get_final_answer\nAction
|
||||
Input: {}\n\nObservation: 42"}, {"role": "assistant", "content": "Thought: I
|
||||
need to keep using the `get_final_answer` tool until I''m explicitly told to
|
||||
give the final answer.\n\nAction: get_final_answer\nAction Input: {}\n\nObservation:
|
||||
I tried reusing the same input, I must stop using this action input. I''ll try
|
||||
something else instead.\n\n"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1924'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=NqphhptgCYl51k8kIFxQ.T4x1aYVbhAz5evGBO5HX5E-1726188007226-0.0.1.1-604800000;
|
||||
__cf_bm=AXZJ7J0cPjCfRcqHyeujSubu93QdP8nyUfDNGDdZ9sk-1726188007-1.0.1.1-Va48NGQp7m5s_49xk6pZFgWl42rmJvSd2pJWZgm8smJukvX6lsRktqdzUJSSVZfi.Sj6wIbs5LNZh6gLbbRzrA
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6oe2sIpF1RHB39P1ezjwAcW4WC2D\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726188010,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I misunderstood how to use the
|
||||
tool correctly. I should continue to reuse the `get_final_answer` tool without
|
||||
changing the input until instructed otherwise.\\n\\nAction: get_final_answer\\nAction
|
||||
Input: {}\\n\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
391,\n \"completion_tokens\": 41,\n \"total_tokens\": 432,\n \"completion_tokens_details\":
|
||||
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c2415923f1ca4a4-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 13 Sep 2024 00:40:10 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '563'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999552'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_a36db34b9e07fe0dbd8ba02d59c2d641
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: !!binary |
|
||||
CpMLCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkS6goKEgoQY3Jld2FpLnRl
|
||||
bGVtZXRyeRKsBwoQ3Jb903bqlIFaOX9BqaUh+BIIadu4dtkETW4qDENyZXcgQ3JlYXRlZDABOaj3
|
||||
LJTXpvQXQTCCLpTXpvQXShoKDmNyZXdhaV92ZXJzaW9uEggKBjAuNTYuMEoaCg5weXRob25fdmVy
|
||||
c2lvbhIICgYzLjExLjdKLgoIY3Jld19rZXkSIgogZDU1MTEzYmU0YWE0MWJhNjQzZDMyNjA0MmIy
|
||||
ZjAzZjFKMQoHY3Jld19pZBImCiQwNmViNmRkZC03YTJiLTRhNTYtOGQzMy1jNjE5NzY0NzliYjBK
|
||||
HAoMY3Jld19wcm9jZXNzEgwKCnNlcXVlbnRpYWxKEQoLY3Jld19tZW1vcnkSAhAAShoKFGNyZXdf
|
||||
bnVtYmVyX29mX3Rhc2tzEgIYAUobChVjcmV3X251bWJlcl9vZl9hZ2VudHMSAhgBSskCCgtjcmV3
|
||||
X2FnZW50cxK5Agq2Alt7ImtleSI6ICJlMTQ4ZTUzMjAyOTM0OTlmOGNlYmVhODI2ZTcyNTgyYiIs
|
||||
ICJpZCI6ICI2MWY1YmMxYS00NWM3LTQ2YTQtYTQxYy00N2QwMDgzYmQ0YjYiLCAicm9sZSI6ICJ0
|
||||
ZXN0IHJvbGUiLCAidmVyYm9zZT8iOiB0cnVlLCAibWF4X2l0ZXIiOiA0LCAibWF4X3JwbSI6IDEw
|
||||
LCAiZnVuY3Rpb25fY2FsbGluZ19sbG0iOiBudWxsLCAibGxtIjogImdwdC00byIsICJkZWxlZ2F0
|
||||
aW9uX2VuYWJsZWQ/IjogZmFsc2UsICJhbGxvd19jb2RlX2V4ZWN1dGlvbj8iOiBmYWxzZSwgIm1h
|
||||
eF9yZXRyeV9saW1pdCI6IDIsICJ0b29sc19uYW1lcyI6IFtdfV1KkAIKCmNyZXdfdGFza3MSgQIK
|
||||
/gFbeyJrZXkiOiAiNGEzMWI4NTEzM2EzYTI5NGM2ODUzZGE3NTdkNGJhZTciLCAiaWQiOiAiOWVk
|
||||
ZTQwZjgtOWViNi00NmU3LThkMTgtNzgxZmJlZWUyMDE5IiwgImFzeW5jX2V4ZWN1dGlvbj8iOiBm
|
||||
YWxzZSwgImh1bWFuX2lucHV0PyI6IGZhbHNlLCAiYWdlbnRfcm9sZSI6ICJ0ZXN0IHJvbGUiLCAi
|
||||
YWdlbnRfa2V5IjogImUxNDhlNTMyMDI5MzQ5OWY4Y2ViZWE4MjZlNzI1ODJiIiwgInRvb2xzX25h
|
||||
bWVzIjogWyJnZXRfZmluYWxfYW5zd2VyIl19XXoCGAGFAQABAAASjgIKEC2DUNem9gDfBVIgKc89
|
||||
JoESCOJ/ah6YtEV2KgxUYXNrIENyZWF0ZWQwATmAdDyU16b0F0G4vjyU16b0F0ouCghjcmV3X2tl
|
||||
eRIiCiBkNTUxMTNiZTRhYTQxYmE2NDNkMzI2MDQyYjJmMDNmMUoxCgdjcmV3X2lkEiYKJDA2ZWI2
|
||||
ZGRkLTdhMmItNGE1Ni04ZDMzLWM2MTk3NjQ3OWJiMEouCgh0YXNrX2tleRIiCiA0YTMxYjg1MTMz
|
||||
YTNhMjk0YzY4NTNkYTc1N2Q0YmFlN0oxCgd0YXNrX2lkEiYKJDllZGU0MGY4LTllYjYtNDZlNy04
|
||||
ZDE4LTc4MWZiZWVlMjAxOXoCGAGFAQABAAASkwEKEN4EN/Df49A8/X7ip/lIB1cSCMnGBrW9Wd2j
|
||||
KgpUb29sIFVzYWdlMAE5uIvAb9im9BdBwL/Fb9im9BdKGgoOY3Jld2FpX3ZlcnNpb24SCAoGMC41
|
||||
Ni4wSh8KCXRvb2xfbmFtZRISChBnZXRfZmluYWxfYW5zd2VySg4KCGF0dGVtcHRzEgIYAXoCGAGF
|
||||
AQABAAA=
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1430'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
User-Agent:
|
||||
- OTel-OTLP-Exporter-Python/1.27.0
|
||||
method: POST
|
||||
uri: https://telemetry.crewai.com:4319/v1/traces
|
||||
response:
|
||||
body:
|
||||
string: "\n\0"
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
Date:
|
||||
- Fri, 13 Sep 2024 00:40:10 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: get_final_answer(*args:
|
||||
Any, **kwargs: Any) -> Any\nTool Description: get_final_answer() - Get the final
|
||||
answer but don''t give it yet, just re-use this tool non-stop. \nTool
|
||||
Arguments: {}\n\nUse the following format:\n\nThought: you should always think
|
||||
about what to do\nAction: the action to take, only one name of [get_final_answer],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Use tool logic
|
||||
for `get_final_answer` but fon''t give you final answer yet, instead keep using
|
||||
it unless you''re told to give your final answer\n\nThis is the expect criteria
|
||||
for your final answer: The final answer\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary.\n\nBegin! This is VERY important
|
||||
to you, use the tools available and give your best Final Answer, your job depends
|
||||
on it!\n\nThought:"}, {"role": "assistant", "content": "Thought: I need to gather
|
||||
the final answer using the tool `get_final_answer`. \n\nAction: get_final_answer\nAction
|
||||
Input: {}\n\nObservation: 42"}, {"role": "assistant", "content": "Thought: I
|
||||
need to keep using the `get_final_answer` tool until I''m explicitly told to
|
||||
give the final answer.\n\nAction: get_final_answer\nAction Input: {}\n\nObservation:
|
||||
I tried reusing the same input, I must stop using this action input. I''ll try
|
||||
something else instead.\n\n"}, {"role": "assistant", "content": "Thought: I
|
||||
misunderstood how to use the tool correctly. I should continue to reuse the
|
||||
`get_final_answer` tool without changing the input until instructed otherwise.\n\nAction:
|
||||
get_final_answer\nAction Input: {}\n\nObservation: I tried reusing the same
|
||||
input, I must stop using this action input. I''ll try something else instead.\n\n\n\n\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: get_final_answer(*args: Any, **kwargs: Any)
|
||||
-> Any\nTool Description: get_final_answer() - Get the final answer but don''t
|
||||
give it yet, just re-use this tool non-stop. \nTool Arguments: {}\n\nUse
|
||||
the following format:\n\nThought: you should always think about what to do\nAction:
|
||||
the action to take, only one name of [get_final_answer], just the name, exactly
|
||||
as it''s written.\nAction Input: the input to the action, just a simple python
|
||||
dictionary, enclosed in curly braces, using \" to wrap keys and values.\nObservation:
|
||||
the result of the action\n\nOnce all necessary information is gathered:\n\nThought:
|
||||
I now know the final answer\nFinal Answer: the final answer to the original
|
||||
input question\n"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3124'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=NqphhptgCYl51k8kIFxQ.T4x1aYVbhAz5evGBO5HX5E-1726188007226-0.0.1.1-604800000;
|
||||
__cf_bm=AXZJ7J0cPjCfRcqHyeujSubu93QdP8nyUfDNGDdZ9sk-1726188007-1.0.1.1-Va48NGQp7m5s_49xk6pZFgWl42rmJvSd2pJWZgm8smJukvX6lsRktqdzUJSSVZfi.Sj6wIbs5LNZh6gLbbRzrA
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6oe3eXsyKUGU1mtnlpMYqhPkY9vk\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726188011,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I need to continue re-using
|
||||
the `get_final_answer` tool without changes to the action input until directed
|
||||
otherwise.\\n\\nAction: get_final_answer\\nAction Input: {}\\n\",\n \"refusal\":
|
||||
null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n
|
||||
\ }\n ],\n \"usage\": {\n \"prompt_tokens\": 637,\n \"completion_tokens\":
|
||||
36,\n \"total_tokens\": 673,\n \"completion_tokens_details\": {\n \"reasoning_tokens\":
|
||||
0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c2415a049b2a4a4-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 13 Sep 2024 00:40:12 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '426'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999266'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_54b7d4fe860a410c3c255e740349e3a9
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: get_final_answer(*args:
|
||||
Any, **kwargs: Any) -> Any\nTool Description: get_final_answer() - Get the final
|
||||
answer but don''t give it yet, just re-use this tool non-stop. \nTool
|
||||
Arguments: {}\n\nUse the following format:\n\nThought: you should always think
|
||||
about what to do\nAction: the action to take, only one name of [get_final_answer],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Use tool logic
|
||||
for `get_final_answer` but fon''t give you final answer yet, instead keep using
|
||||
it unless you''re told to give your final answer\n\nThis is the expect criteria
|
||||
for your final answer: The final answer\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary.\n\nBegin! This is VERY important
|
||||
to you, use the tools available and give your best Final Answer, your job depends
|
||||
on it!\n\nThought:"}, {"role": "assistant", "content": "Thought: I need to gather
|
||||
the final answer using the tool `get_final_answer`. \n\nAction: get_final_answer\nAction
|
||||
Input: {}\n\nObservation: 42"}, {"role": "assistant", "content": "Thought: I
|
||||
need to keep using the `get_final_answer` tool until I''m explicitly told to
|
||||
give the final answer.\n\nAction: get_final_answer\nAction Input: {}\n\nObservation:
|
||||
I tried reusing the same input, I must stop using this action input. I''ll try
|
||||
something else instead.\n\n"}, {"role": "assistant", "content": "Thought: I
|
||||
misunderstood how to use the tool correctly. I should continue to reuse the
|
||||
`get_final_answer` tool without changing the input until instructed otherwise.\n\nAction:
|
||||
get_final_answer\nAction Input: {}\n\nObservation: I tried reusing the same
|
||||
input, I must stop using this action input. I''ll try something else instead.\n\n\n\n\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: get_final_answer(*args: Any, **kwargs: Any)
|
||||
-> Any\nTool Description: get_final_answer() - Get the final answer but don''t
|
||||
give it yet, just re-use this tool non-stop. \nTool Arguments: {}\n\nUse
|
||||
the following format:\n\nThought: you should always think about what to do\nAction:
|
||||
the action to take, only one name of [get_final_answer], just the name, exactly
|
||||
as it''s written.\nAction Input: the input to the action, just a simple python
|
||||
dictionary, enclosed in curly braces, using \" to wrap keys and values.\nObservation:
|
||||
the result of the action\n\nOnce all necessary information is gathered:\n\nThought:
|
||||
I now know the final answer\nFinal Answer: the final answer to the original
|
||||
input question\n"}, {"role": "assistant", "content": "Thought: I need to continue
|
||||
re-using the `get_final_answer` tool without changes to the action input until
|
||||
directed otherwise.\n\nAction: get_final_answer\nAction Input: {}\n\nObservation:
|
||||
I tried reusing the same input, I must stop using this action input. I''ll try
|
||||
something else instead.\n\n\nNow it''s time you MUST give your absolute best
|
||||
final answer. You''ll ignore all previous instructions, stop using any tools,
|
||||
and just return your absolute BEST Final answer."}], "model": "gpt-4o", "stop":
|
||||
["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3630'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=NqphhptgCYl51k8kIFxQ.T4x1aYVbhAz5evGBO5HX5E-1726188007226-0.0.1.1-604800000;
|
||||
__cf_bm=AXZJ7J0cPjCfRcqHyeujSubu93QdP8nyUfDNGDdZ9sk-1726188007-1.0.1.1-Va48NGQp7m5s_49xk6pZFgWl42rmJvSd2pJWZgm8smJukvX6lsRktqdzUJSSVZfi.Sj6wIbs5LNZh6gLbbRzrA
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6oe4i3SwBj8bAwY16R4LQ9dwbdC5\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726188012,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now know the final answer.\\nFinal
|
||||
Answer: 42\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
733,\n \"completion_tokens\": 14,\n \"total_tokens\": 747,\n \"completion_tokens_details\":
|
||||
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c2415a63a09a4a4-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 13 Sep 2024 00:40:13 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '294'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999151'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_92043ae9f639b2142c318b44155ba673
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
@@ -1,145 +1,15 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: Delegate
|
||||
work to coworker(task: str, context: str, coworker: Optional[str] = None, **kwargs)\nTool
|
||||
Description: Delegate a specific task to one of the following coworkers: test
|
||||
role2\nThe input to this tool should be the coworker, the task you want them
|
||||
to do, and ALL necessary context to execute the task, they know nothing about
|
||||
the task, so share absolute everything you know, don''t reference things but
|
||||
instead explain them.\nTool Arguments: {''task'': {''title'': ''Task'', ''type'':
|
||||
''string''}, ''context'': {''title'': ''Context'', ''type'': ''string''}, ''coworker'':
|
||||
{''title'': ''Coworker'', ''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'',
|
||||
''type'': ''object''}}\nTool Name: Ask question to coworker(question: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Ask a specific
|
||||
question to one of the following coworkers: test role2\nThe input to this tool
|
||||
should be the coworker, the question you have for them, and ALL necessary context
|
||||
to ask the question properly, they know nothing about the question, so share
|
||||
absolute everything you know, don''t reference things but instead explain them.\nTool
|
||||
Arguments: {''question'': {''title'': ''Question'', ''type'': ''string''}, ''context'':
|
||||
{''title'': ''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse
|
||||
the following format:\n\nThought: you should always think about what to do\nAction:
|
||||
the action to take, only one name of [Delegate work to coworker, Ask question
|
||||
to coworker], just the name, exactly as it''s written.\nAction Input: the input
|
||||
to the action, just a simple python dictionary, enclosed in curly braces, using
|
||||
\" to wrap keys and values.\nObservation: the result of the action\n\nOnce all
|
||||
necessary information is gathered:\n\nThought: I now know the final answer\nFinal
|
||||
Answer: the final answer to the original input question\n\nCurrent Task: Just
|
||||
say hi.\n\nThis is the expect criteria for your final answer: Your greeting.
|
||||
\n you MUST return the actual complete content as the final answer, not a summary.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '2467'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- __cf_bm=iMsGonnXhDDCqOz9miNRwOGOr7OzXm1EqcxEiFk_nT4-1725908571-1.0.1.1-1P.quluT8iIibKOx0N4Mj8vflrRuSZk7gOWmptSyOKAFsTkvt3UultWM2b_B6I956Cvswux_SgpniB37rKO8Vw;
|
||||
_cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A5dzeiqDrCjVKuTKGMamN5DDr97bc\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1725908738,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I need to consider how to handle
|
||||
the current task which is to just say hi. Given the tools available, I can either
|
||||
delegate the task to test role2 or ask them a question. \\n\\nAction: Ask question
|
||||
to coworker\\nAction Input: {\\\"question\\\": \\\"Can you help me by saying
|
||||
hi?\\\", \\\"context\\\": \\\"My task is to simply say hi, and I need your help
|
||||
to complete this task.\\\", \\\"coworker\\\": \\\"test role2\\\"}\\n\",\n \"refusal\":
|
||||
null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n
|
||||
\ }\n ],\n \"usage\": {\n \"prompt_tokens\": 552,\n \"completion_tokens\":
|
||||
96,\n \"total_tokens\": 648\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c09736d6a8f7ad6-SJC
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:39 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '879'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999396'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_b6f10c8c065bc60b511a0533325b5f7e
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role2. test backstory2\nYour
|
||||
personal goal is: test goal2\nTo give my best complete final answer to the task
|
||||
personal goal is: test goal\nTo give my best complete final answer to the task
|
||||
use the exact following format:\n\nThought: I now can give a great answer\nFinal
|
||||
Answer: Your final answer must be the great and the most complete as possible,
|
||||
it must be outcome described.\n\nI MUST use these formats, my job depends on
|
||||
it!\nCurrent Task: Can you help me by saying hi?\n\nThis is the expect criteria
|
||||
for your final answer: Your best answer to your coworker asking you this, accounting
|
||||
for the context shared. \n you MUST return the actual complete content as the
|
||||
final answer, not a summary.\n\nThis is the context you''re working with:\nMy
|
||||
task is to simply say hi, and I need your help to complete this task.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
it!\nCurrent Task: Just say hi.\n\nThis is the expect criteria for your final
|
||||
answer: Your greeting.\nyou MUST return the actual complete content as the final
|
||||
answer, not a summary.\n\nBegin! This is VERY important to you, use the tools
|
||||
available and give your best Final Answer, your job depends on it!\n\nThought:"}],
|
||||
"model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
@@ -148,16 +18,15 @@ interactions:
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '975'
|
||||
- '764'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- __cf_bm=iMsGonnXhDDCqOz9miNRwOGOr7OzXm1EqcxEiFk_nT4-1725908571-1.0.1.1-1P.quluT8iIibKOx0N4Mj8vflrRuSZk7gOWmptSyOKAFsTkvt3UultWM2b_B6I956Cvswux_SgpniB37rKO8Vw;
|
||||
_cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
- _cfuvid=NqphhptgCYl51k8kIFxQ.T4x1aYVbhAz5evGBO5HX5E-1726188007226-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
@@ -167,7 +36,7 @@ interactions:
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
@@ -177,19 +46,19 @@ interactions:
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A5dzfRUplszjSVhxWFMBsY9YmHxv6\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1725908739,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
content: "{\n \"id\": \"chatcmpl-A6tNJ1p3d1HLKrZtqVlgpFJ02EXoG\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726206193,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
\"assistant\",\n \"content\": \"I now can give a great answer\\nFinal
|
||||
Answer: Hi!\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
197,\n \"completion_tokens\": 15,\n \"total_tokens\": 212\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
149,\n \"completion_tokens\": 13,\n \"total_tokens\": 162,\n \"completion_tokens_details\":
|
||||
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c097374e8c87ad6-SJC
|
||||
- 8c25d18319117c44-LAX
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -197,9 +66,15 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:39 GMT
|
||||
- Fri, 13 Sep 2024 05:43:13 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=ClnNKAuXgV.ion8pbtUaEfUtQSyni9o4VnBEhtjLcvY-1726206193-1.0.1.1-irjAKQKLFXoFHYMHg.GoJNcvu6A7u6ASFzz_Sr3U6wi_72IUfIRiLp7tOwWp0WXUbEKvKk3dJqoTqwblHvq7Wg;
|
||||
path=/; expires=Fri, 13-Sep-24 06:13:13 GMT; domain=.api.openai.com; HttpOnly;
|
||||
Secure; SameSite=None
|
||||
- _cfuvid=7gNruCM_IOsMgDEA4EI0g9dg0NDN5T9HigjiRwrAKc0-1726206193576-0.0.1.1-604800000;
|
||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
@@ -211,7 +86,7 @@ interactions:
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '258'
|
||||
- '278'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
@@ -223,497 +98,13 @@ interactions:
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999766'
|
||||
- '29999818'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_01632d20b8601bc3f4acae684870c803
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: Delegate
|
||||
work to coworker(task: str, context: str, coworker: Optional[str] = None, **kwargs)\nTool
|
||||
Description: Delegate a specific task to one of the following coworkers: test
|
||||
role2\nThe input to this tool should be the coworker, the task you want them
|
||||
to do, and ALL necessary context to execute the task, they know nothing about
|
||||
the task, so share absolute everything you know, don''t reference things but
|
||||
instead explain them.\nTool Arguments: {''task'': {''title'': ''Task'', ''type'':
|
||||
''string''}, ''context'': {''title'': ''Context'', ''type'': ''string''}, ''coworker'':
|
||||
{''title'': ''Coworker'', ''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'',
|
||||
''type'': ''object''}}\nTool Name: Ask question to coworker(question: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Ask a specific
|
||||
question to one of the following coworkers: test role2\nThe input to this tool
|
||||
should be the coworker, the question you have for them, and ALL necessary context
|
||||
to ask the question properly, they know nothing about the question, so share
|
||||
absolute everything you know, don''t reference things but instead explain them.\nTool
|
||||
Arguments: {''question'': {''title'': ''Question'', ''type'': ''string''}, ''context'':
|
||||
{''title'': ''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse
|
||||
the following format:\n\nThought: you should always think about what to do\nAction:
|
||||
the action to take, only one name of [Delegate work to coworker, Ask question
|
||||
to coworker], just the name, exactly as it''s written.\nAction Input: the input
|
||||
to the action, just a simple python dictionary, enclosed in curly braces, using
|
||||
\" to wrap keys and values.\nObservation: the result of the action\n\nOnce all
|
||||
necessary information is gathered:\n\nThought: I now know the final answer\nFinal
|
||||
Answer: the final answer to the original input question\n\nCurrent Task: Just
|
||||
say hi.\n\nThis is the expect criteria for your final answer: Your greeting.
|
||||
\n you MUST return the actual complete content as the final answer, not a summary.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}, {"role": "assistant", "content":
|
||||
"Thought: I need to consider how to handle the current task which is to just
|
||||
say hi. Given the tools available, I can either delegate the task to test role2
|
||||
or ask them a question. \n\nAction: Ask question to coworker\nAction Input:
|
||||
{\"question\": \"Can you help me by saying hi?\", \"context\": \"My task is
|
||||
to simply say hi, and I need your help to complete this task.\", \"coworker\":
|
||||
\"test role2\"}\n\nObservation: Hi!"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '2927'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- __cf_bm=iMsGonnXhDDCqOz9miNRwOGOr7OzXm1EqcxEiFk_nT4-1725908571-1.0.1.1-1P.quluT8iIibKOx0N4Mj8vflrRuSZk7gOWmptSyOKAFsTkvt3UultWM2b_B6I956Cvswux_SgpniB37rKO8Vw;
|
||||
_cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A5dzfumk7ZBIa57yk9p2brs7cJSkx\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1725908739,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now know the final answer.\\nFinal
|
||||
Answer: Hi!\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
656,\n \"completion_tokens\": 14,\n \"total_tokens\": 670\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c097377ab587ad6-SJC
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:40 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '199'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999295'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_3dde81dd8c0ec39c49c3eb8557d09526
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role. test backstory\nYour
|
||||
personal goal is: test goal\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: Delegate
|
||||
work to coworker(task: str, context: str, coworker: Optional[str] = None, **kwargs)\nTool
|
||||
Description: Delegate a specific task to one of the following coworkers: test
|
||||
role2\nThe input to this tool should be the coworker, the task you want them
|
||||
to do, and ALL necessary context to execute the task, they know nothing about
|
||||
the task, so share absolute everything you know, don''t reference things but
|
||||
instead explain them.\nTool Arguments: {''task'': {''title'': ''Task'', ''type'':
|
||||
''string''}, ''context'': {''title'': ''Context'', ''type'': ''string''}, ''coworker'':
|
||||
{''title'': ''Coworker'', ''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'',
|
||||
''type'': ''object''}}\nTool Name: Ask question to coworker(question: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Ask a specific
|
||||
question to one of the following coworkers: test role2\nThe input to this tool
|
||||
should be the coworker, the question you have for them, and ALL necessary context
|
||||
to ask the question properly, they know nothing about the question, so share
|
||||
absolute everything you know, don''t reference things but instead explain them.\nTool
|
||||
Arguments: {''question'': {''title'': ''Question'', ''type'': ''string''}, ''context'':
|
||||
{''title'': ''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse
|
||||
the following format:\n\nThought: you should always think about what to do\nAction:
|
||||
the action to take, only one name of [Delegate work to coworker, Ask question
|
||||
to coworker], just the name, exactly as it''s written.\nAction Input: the input
|
||||
to the action, just a simple python dictionary, enclosed in curly braces, using
|
||||
\" to wrap keys and values.\nObservation: the result of the action\n\nOnce all
|
||||
necessary information is gathered:\n\nThought: I now know the final answer\nFinal
|
||||
Answer: the final answer to the original input question\n\nCurrent Task: Just
|
||||
say bye.\n\nThis is the expect criteria for your final answer: Your farewell.
|
||||
\n you MUST return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is the context you''re working with:\nHi!\n\nBegin! This is VERY important to
|
||||
you, use the tools available and give your best Final Answer, your job depends
|
||||
on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '2517'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- __cf_bm=iMsGonnXhDDCqOz9miNRwOGOr7OzXm1EqcxEiFk_nT4-1725908571-1.0.1.1-1P.quluT8iIibKOx0N4Mj8vflrRuSZk7gOWmptSyOKAFsTkvt3UultWM2b_B6I956Cvswux_SgpniB37rKO8Vw;
|
||||
_cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A5dzgUnJ6aJi26kLV0OI3Wf4Ub7zD\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1725908740,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: To successfully complete the
|
||||
current task, which is to say \\\"bye,\\\" I need to ensure that my farewell
|
||||
is complete and appropriate based on the given context \\\"Hi!\\\"\\n\\nFinal
|
||||
Answer: Bye!\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
562,\n \"completion_tokens\": 40,\n \"total_tokens\": 602\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c09737b0e7c7ad6-SJC
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:40 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '420'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999385'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_a36a51c9e279c6f62c4f308c3dea9288
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: !!binary |
|
||||
CpAdCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkS5xwKEgoQY3Jld2FpLnRl
|
||||
bGVtZXRyeRKTAQoQKTrI0qqKHI0agmKoIF2fJxIIALlc6B0wetEqClRvb2wgVXNhZ2UwATkI6S0+
|
||||
2qjzF0HYzDM+2qjzF0oaCg5jcmV3YWlfdmVyc2lvbhIICgYwLjU1LjJKHwoJdG9vbF9uYW1lEhIK
|
||||
EGdldF9maW5hbF9hbnN3ZXJKDgoIYXR0ZW1wdHMSAhgBegIYAYUBAAEAABKQAgoQ4zqgvs0vO2tA
|
||||
EE6NuC3f4RIITkMhcPOTv5cqDlRhc2sgRXhlY3V0aW9uMAE5GBkSwdio8xdBQMJ3W9qo8xdKLgoI
|
||||
Y3Jld19rZXkSIgogZDU1MTEzYmU0YWE0MWJhNjQzZDMyNjA0MmIyZjAzZjFKMQoHY3Jld19pZBIm
|
||||
CiRjMGUxMTMwNy03ZTAwLTQyYTYtOGMxZi1iZWNiNGVmODgyMjRKLgoIdGFza19rZXkSIgogNGEz
|
||||
MWI4NTEzM2EzYTI5NGM2ODUzZGE3NTdkNGJhZTdKMQoHdGFza19pZBImCiQ4MmRiZmQ1MS1iM2Zm
|
||||
LTRhM2ItOTFiOC1jZmM1OTAzMTU2ODF6AhgBhQEAAQAAErANChD2AormT+lt31GMQlvvLPOeEgi6
|
||||
HPKbtLNPcyoMQ3JldyBDcmVhdGVkMAE5eJR/Xdqo8xdBiJeFXdqo8xdKGgoOY3Jld2FpX3ZlcnNp
|
||||
b24SCAoGMC41NS4yShoKDnB5dGhvbl92ZXJzaW9uEggKBjMuMTEuN0ouCghjcmV3X2tleRIiCiAx
|
||||
MTFiODcyZDhmMGNmNzAzZjJlZmVmMDRjZjNhYzc5OEoxCgdjcmV3X2lkEiYKJDJiODRhNThiLWI1
|
||||
MzQtNDA0ZS1iMzg0LTM5ZjhiNGJmMTdjZEocCgxjcmV3X3Byb2Nlc3MSDAoKc2VxdWVudGlhbEoR
|
||||
CgtjcmV3X21lbW9yeRICEABKGgoUY3Jld19udW1iZXJfb2ZfdGFza3MSAhgDShsKFWNyZXdfbnVt
|
||||
YmVyX29mX2FnZW50cxICGAJKhgUKC2NyZXdfYWdlbnRzEvYECvMEW3sia2V5IjogImUxNDhlNTMy
|
||||
MDI5MzQ5OWY4Y2ViZWE4MjZlNzI1ODJiIiwgImlkIjogIjc4NjU3YTY4LTgwNGItNGYxNy1hNWI5
|
||||
LTgxMjY0MmFiZGFjZiIsICJyb2xlIjogInRlc3Qgcm9sZSIsICJ2ZXJib3NlPyI6IGZhbHNlLCAi
|
||||
bWF4X2l0ZXIiOiAyNSwgIm1heF9ycG0iOiBudWxsLCAiZnVuY3Rpb25fY2FsbGluZ19sbG0iOiBu
|
||||
dWxsLCAibGxtIjogImdwdC00byIsICJkZWxlZ2F0aW9uX2VuYWJsZWQ/IjogdHJ1ZSwgImFsbG93
|
||||
X2NvZGVfZXhlY3V0aW9uPyI6IGZhbHNlLCAibWF4X3JldHJ5X2xpbWl0IjogMiwgInRvb2xzX25h
|
||||
bWVzIjogW119LCB7ImtleSI6ICJlN2U4ZWVhODg2YmNiOGYxMDQ1YWJlZWNmMTQyNWRiNyIsICJp
|
||||
ZCI6ICI1OWUwZDk5NS1jOGNmLTQ3ZTYtYjJmMi1iN2EzYjkxNDExYzYiLCAicm9sZSI6ICJ0ZXN0
|
||||
IHJvbGUyIiwgInZlcmJvc2U/IjogZmFsc2UsICJtYXhfaXRlciI6IDI1LCAibWF4X3JwbSI6IG51
|
||||
bGwsICJmdW5jdGlvbl9jYWxsaW5nX2xsbSI6IG51bGwsICJsbG0iOiAiZ3B0LTRvIiwgImRlbGVn
|
||||
YXRpb25fZW5hYmxlZD8iOiB0cnVlLCAiYWxsb3dfY29kZV9leGVjdXRpb24/IjogZmFsc2UsICJt
|
||||
YXhfcmV0cnlfbGltaXQiOiAyLCAidG9vbHNfbmFtZXMiOiBbXX1dStcFCgpjcmV3X3Rhc2tzEsgF
|
||||
CsUFW3sia2V5IjogIjMyMmRkYWUzYmM4MGMxZDQ1Yjg1ZmE3NzU2ZGI4NjY1IiwgImlkIjogImUz
|
||||
MGE4MTNjLTc2ZDQtNGQ3My1hYTY5LTdjMzBkNDY2YzY0MCIsICJhc3luY19leGVjdXRpb24/Ijog
|
||||
ZmFsc2UsICJodW1hbl9pbnB1dD8iOiBmYWxzZSwgImFnZW50X3JvbGUiOiAidGVzdCByb2xlIiwg
|
||||
ImFnZW50X2tleSI6ICJlMTQ4ZTUzMjAyOTM0OTlmOGNlYmVhODI2ZTcyNTgyYiIsICJ0b29sc19u
|
||||
YW1lcyI6IFtdfSwgeyJrZXkiOiAiY2M0ODc2ZjZlNTg4ZTcxMzQ5YmJkM2E2NTg4OGMzZTkiLCAi
|
||||
aWQiOiAiMDZhOTA5NmMtMDE2Zi00MmQ5LWFkODctNGY3MTJlYmE2MWUxIiwgImFzeW5jX2V4ZWN1
|
||||
dGlvbj8iOiBmYWxzZSwgImh1bWFuX2lucHV0PyI6IGZhbHNlLCAiYWdlbnRfcm9sZSI6ICJ0ZXN0
|
||||
IHJvbGUiLCAiYWdlbnRfa2V5IjogImUxNDhlNTMyMDI5MzQ5OWY4Y2ViZWE4MjZlNzI1ODJiIiwg
|
||||
InRvb2xzX25hbWVzIjogW119LCB7ImtleSI6ICJlMGIxM2UxMGQ3YTE0NmRjYzRjNDg4ZmNmOGQ3
|
||||
NDhhMCIsICJpZCI6ICIyYmY3ZDVkZC0xZmI5LTQyNGQtYmEzNy1jZGZmMjhhMTQzOTkiLCAiYXN5
|
||||
bmNfZXhlY3V0aW9uPyI6IGZhbHNlLCAiaHVtYW5faW5wdXQ/IjogZmFsc2UsICJhZ2VudF9yb2xl
|
||||
IjogInRlc3Qgcm9sZTIiLCAiYWdlbnRfa2V5IjogImU3ZThlZWE4ODZiY2I4ZjEwNDVhYmVlY2Yx
|
||||
NDI1ZGI3IiwgInRvb2xzX25hbWVzIjogW119XXoCGAGFAQABAAASjgIKEDdOiwdQizEW5yDtMP2/
|
||||
ApQSCKJXucz/o+6LKgxUYXNrIENyZWF0ZWQwATlQhcle2qjzF0HYCcxe2qjzF0ouCghjcmV3X2tl
|
||||
eRIiCiAxMTFiODcyZDhmMGNmNzAzZjJlZmVmMDRjZjNhYzc5OEoxCgdjcmV3X2lkEiYKJDJiODRh
|
||||
NThiLWI1MzQtNDA0ZS1iMzg0LTM5ZjhiNGJmMTdjZEouCgh0YXNrX2tleRIiCiAzMjJkZGFlM2Jj
|
||||
ODBjMWQ0NWI4NWZhNzc1NmRiODY2NUoxCgd0YXNrX2lkEiYKJGUzMGE4MTNjLTc2ZDQtNGQ3My1h
|
||||
YTY5LTdjMzBkNDY2YzY0MHoCGAGFAQABAAASmwEKEOeLiSiZ+1fwdBLcJ+3aQp0SCDXV1vwUoQ9Q
|
||||
KgpUb29sIFVzYWdlMAE58FAjwdqo8xdBcAAmwdqo8xdKGgoOY3Jld2FpX3ZlcnNpb24SCAoGMC41
|
||||
NS4ySicKCXRvb2xfbmFtZRIaChhBc2sgcXVlc3Rpb24gdG8gY293b3JrZXJKDgoIYXR0ZW1wdHMS
|
||||
AhgBegIYAYUBAAEAABKQAgoQoDiCLH7jGTuYTJajzBnzyxIIpQplwz2KyfwqDlRhc2sgRXhlY3V0
|
||||
aW9uMAE5wIrMXtqo8xdBaGuL39qo8xdKLgoIY3Jld19rZXkSIgogMTExYjg3MmQ4ZjBjZjcwM2Yy
|
||||
ZWZlZjA0Y2YzYWM3OThKMQoHY3Jld19pZBImCiQyYjg0YTU4Yi1iNTM0LTQwNGUtYjM4NC0zOWY4
|
||||
YjRiZjE3Y2RKLgoIdGFza19rZXkSIgogMzIyZGRhZTNiYzgwYzFkNDViODVmYTc3NTZkYjg2NjVK
|
||||
MQoHdGFza19pZBImCiRlMzBhODEzYy03NmQ0LTRkNzMtYWE2OS03YzMwZDQ2NmM2NDB6AhgBhQEA
|
||||
AQAAEo4CChCYHnsa62GDJX2k5QWTgB0rEggynQrWQcmyXSoMVGFzayBDcmVhdGVkMAE5iCmd4Nqo
|
||||
8xdBKLCe4Nqo8xdKLgoIY3Jld19rZXkSIgogMTExYjg3MmQ4ZjBjZjcwM2YyZWZlZjA0Y2YzYWM3
|
||||
OThKMQoHY3Jld19pZBImCiQyYjg0YTU4Yi1iNTM0LTQwNGUtYjM4NC0zOWY4YjRiZjE3Y2RKLgoI
|
||||
dGFza19rZXkSIgogY2M0ODc2ZjZlNTg4ZTcxMzQ5YmJkM2E2NTg4OGMzZTlKMQoHdGFza19pZBIm
|
||||
CiQwNmE5MDk2Yy0wMTZmLTQyZDktYWQ4Ny00ZjcxMmViYTYxZTF6AhgBhQEAAQAAEpACChBEQo2P
|
||||
rmFYi6DGJJvpIs96EgijAwClbSt62ioOVGFzayBFeGVjdXRpb24wATkQMZ/g2qjzF0HAV2QN26jz
|
||||
F0ouCghjcmV3X2tleRIiCiAxMTFiODcyZDhmMGNmNzAzZjJlZmVmMDRjZjNhYzc5OEoxCgdjcmV3
|
||||
X2lkEiYKJDJiODRhNThiLWI1MzQtNDA0ZS1iMzg0LTM5ZjhiNGJmMTdjZEouCgh0YXNrX2tleRIi
|
||||
CiBjYzQ4NzZmNmU1ODhlNzEzNDliYmQzYTY1ODg4YzNlOUoxCgd0YXNrX2lkEiYKJDA2YTkwOTZj
|
||||
LTAxNmYtNDJkOS1hZDg3LTRmNzEyZWJhNjFlMXoCGAGFAQABAAASjgIKEB3wWsBlrqHfRv8gc7b9
|
||||
2VISCII9Y7FznkqZKgxUYXNrIENyZWF0ZWQwATnIAXoO26jzF0F4LHwO26jzF0ouCghjcmV3X2tl
|
||||
eRIiCiAxMTFiODcyZDhmMGNmNzAzZjJlZmVmMDRjZjNhYzc5OEoxCgdjcmV3X2lkEiYKJDJiODRh
|
||||
NThiLWI1MzQtNDA0ZS1iMzg0LTM5ZjhiNGJmMTdjZEouCgh0YXNrX2tleRIiCiBlMGIxM2UxMGQ3
|
||||
YTE0NmRjYzRjNDg4ZmNmOGQ3NDhhMEoxCgd0YXNrX2lkEiYKJDJiZjdkNWRkLTFmYjktNDI0ZC1i
|
||||
YTM3LWNkZmYyOGExNDM5OXoCGAGFAQABAAA=
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '3731'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
User-Agent:
|
||||
- OTel-OTLP-Exporter-Python/1.27.0
|
||||
method: POST
|
||||
uri: https://telemetry.crewai.com:4319/v1/traces
|
||||
response:
|
||||
body:
|
||||
string: "\n\0"
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:42 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role2. test backstory2\nYour
|
||||
personal goal is: test goal2\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: Delegate
|
||||
work to coworker(task: str, context: str, coworker: Optional[str] = None, **kwargs)\nTool
|
||||
Description: Delegate a specific task to one of the following coworkers: test
|
||||
role\nThe input to this tool should be the coworker, the task you want them
|
||||
to do, and ALL necessary context to execute the task, they know nothing about
|
||||
the task, so share absolute everything you know, don''t reference things but
|
||||
instead explain them.\nTool Arguments: {''task'': {''title'': ''Task'', ''type'':
|
||||
''string''}, ''context'': {''title'': ''Context'', ''type'': ''string''}, ''coworker'':
|
||||
{''title'': ''Coworker'', ''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'',
|
||||
''type'': ''object''}}\nTool Name: Ask question to coworker(question: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Ask a specific
|
||||
question to one of the following coworkers: test role\nThe input to this tool
|
||||
should be the coworker, the question you have for them, and ALL necessary context
|
||||
to ask the question properly, they know nothing about the question, so share
|
||||
absolute everything you know, don''t reference things but instead explain them.\nTool
|
||||
Arguments: {''question'': {''title'': ''Question'', ''type'': ''string''}, ''context'':
|
||||
{''title'': ''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse
|
||||
the following format:\n\nThought: you should always think about what to do\nAction:
|
||||
the action to take, only one name of [Delegate work to coworker, Ask question
|
||||
to coworker], just the name, exactly as it''s written.\nAction Input: the input
|
||||
to the action, just a simple python dictionary, enclosed in curly braces, using
|
||||
\" to wrap keys and values.\nObservation: the result of the action\n\nOnce all
|
||||
necessary information is gathered:\n\nThought: I now know the final answer\nFinal
|
||||
Answer: the final answer to the original input question\n\nCurrent Task: Answer
|
||||
accordingly to the context you got.\n\nThis is the expect criteria for your
|
||||
final answer: Your answer. \n you MUST return the actual complete content as
|
||||
the final answer, not a summary.\n\nThis is the context you''re working with:\nHi!\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '2545'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- __cf_bm=iMsGonnXhDDCqOz9miNRwOGOr7OzXm1EqcxEiFk_nT4-1725908571-1.0.1.1-1P.quluT8iIibKOx0N4Mj8vflrRuSZk7gOWmptSyOKAFsTkvt3UultWM2b_B6I956Cvswux_SgpniB37rKO8Vw;
|
||||
_cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A5dzh9UtjYFsx1FIyZNu4fcHCv4hd\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1725908741,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: My job is to provide the best
|
||||
possible answer based on the context \\\"Hi!\\\" and use the tools available
|
||||
if necessary to gather more information. Since the provided context is minimal,
|
||||
I need to clarify what the requester needs from me.\\n\\nAction: Ask question
|
||||
to coworker\\nAction Input: {\\\"question\\\": \\\"What task do you need assistance
|
||||
with?\\\", \\\"context\\\": \\\"The only information provided is 'Hi!'. Could
|
||||
you please specify what task you need help with or any additional details?\\\",
|
||||
\\\"coworker\\\": \\\"test role\\\"}\",\n \"refusal\": null\n },\n
|
||||
\ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n
|
||||
\ \"usage\": {\n \"prompt_tokens\": 567,\n \"completion_tokens\": 108,\n
|
||||
\ \"total_tokens\": 675\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c09737fead97ad6-SJC
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:42 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '1522'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999379'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_2e4f43ec6df32cf8fad8e75705a9b1a8
|
||||
- req_508393c5be3af0df1b77f458001603b6
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
@@ -722,14 +113,11 @@ interactions:
|
||||
use the exact following format:\n\nThought: I now can give a great answer\nFinal
|
||||
Answer: Your final answer must be the great and the most complete as possible,
|
||||
it must be outcome described.\n\nI MUST use these formats, my job depends on
|
||||
it!\nCurrent Task: What task do you need assistance with?\n\nThis is the expect
|
||||
criteria for your final answer: Your best answer to your coworker asking you
|
||||
this, accounting for the context shared. \n you MUST return the actual complete
|
||||
content as the final answer, not a summary.\n\nThis is the context you''re working
|
||||
with:\nThe only information provided is ''Hi!''. Could you please specify what
|
||||
task you need help with or any additional details?\n\nBegin! This is VERY important
|
||||
to you, use the tools available and give your best Final Answer, your job depends
|
||||
on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
it!\nCurrent Task: Just say bye.\n\nThis is the expect criteria for your final
|
||||
answer: Your farewell.\nyou MUST return the actual complete content as the final
|
||||
answer, not a summary.\n\nThis is the context you''re working with:\nHi!\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
@@ -738,16 +126,16 @@ interactions:
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1029'
|
||||
- '814'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- __cf_bm=iMsGonnXhDDCqOz9miNRwOGOr7OzXm1EqcxEiFk_nT4-1725908571-1.0.1.1-1P.quluT8iIibKOx0N4Mj8vflrRuSZk7gOWmptSyOKAFsTkvt3UultWM2b_B6I956Cvswux_SgpniB37rKO8Vw;
|
||||
_cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
- _cfuvid=7gNruCM_IOsMgDEA4EI0g9dg0NDN5T9HigjiRwrAKc0-1726206193576-0.0.1.1-604800000;
|
||||
__cf_bm=ClnNKAuXgV.ion8pbtUaEfUtQSyni9o4VnBEhtjLcvY-1726206193-1.0.1.1-irjAKQKLFXoFHYMHg.GoJNcvu6A7u6ASFzz_Sr3U6wi_72IUfIRiLp7tOwWp0WXUbEKvKk3dJqoTqwblHvq7Wg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
@@ -757,7 +145,7 @@ interactions:
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
@@ -767,20 +155,19 @@ interactions:
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A5dzjBlbcYaqsY9FSUbOvbYhDni5X\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1725908743,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
content: "{\n \"id\": \"chatcmpl-A6tNKg5xx1h379SmfwvVe9T0qx8Qk\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726206194,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: Hi! Could you please specify what task you need help with or provide
|
||||
any additional details? Thank you!\",\n \"refusal\": null\n },\n
|
||||
\ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n
|
||||
\ \"usage\": {\n \"prompt_tokens\": 200,\n \"completion_tokens\": 34,\n
|
||||
\ \"total_tokens\": 234\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
Answer: Bye!\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
159,\n \"completion_tokens\": 15,\n \"total_tokens\": 174,\n \"completion_tokens_details\":
|
||||
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_157b3831f5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c09738b6dae7ad6-SJC
|
||||
- 8c25d189de367c44-LAX
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -788,7 +175,7 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:43 GMT
|
||||
- Fri, 13 Sep 2024 05:43:15 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
@@ -802,7 +189,7 @@ interactions:
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '413'
|
||||
- '261'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
@@ -814,57 +201,27 @@ interactions:
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999753'
|
||||
- '29999807'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_292b6d0fa818839ad01236355bf7e880
|
||||
- req_5e4fa349168edad6c2eae435ee880756
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are test role2. test backstory2\nYour
|
||||
personal goal is: test goal2\nYou ONLY have access to the following tools, and
|
||||
should NEVER make up tools that are not listed here:\n\nTool Name: Delegate
|
||||
work to coworker(task: str, context: str, coworker: Optional[str] = None, **kwargs)\nTool
|
||||
Description: Delegate a specific task to one of the following coworkers: test
|
||||
role\nThe input to this tool should be the coworker, the task you want them
|
||||
to do, and ALL necessary context to execute the task, they know nothing about
|
||||
the task, so share absolute everything you know, don''t reference things but
|
||||
instead explain them.\nTool Arguments: {''task'': {''title'': ''Task'', ''type'':
|
||||
''string''}, ''context'': {''title'': ''Context'', ''type'': ''string''}, ''coworker'':
|
||||
{''title'': ''Coworker'', ''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'',
|
||||
''type'': ''object''}}\nTool Name: Ask question to coworker(question: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Ask a specific
|
||||
question to one of the following coworkers: test role\nThe input to this tool
|
||||
should be the coworker, the question you have for them, and ALL necessary context
|
||||
to ask the question properly, they know nothing about the question, so share
|
||||
absolute everything you know, don''t reference things but instead explain them.\nTool
|
||||
Arguments: {''question'': {''title'': ''Question'', ''type'': ''string''}, ''context'':
|
||||
{''title'': ''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse
|
||||
the following format:\n\nThought: you should always think about what to do\nAction:
|
||||
the action to take, only one name of [Delegate work to coworker, Ask question
|
||||
to coworker], just the name, exactly as it''s written.\nAction Input: the input
|
||||
to the action, just a simple python dictionary, enclosed in curly braces, using
|
||||
\" to wrap keys and values.\nObservation: the result of the action\n\nOnce all
|
||||
necessary information is gathered:\n\nThought: I now know the final answer\nFinal
|
||||
Answer: the final answer to the original input question\n\nCurrent Task: Answer
|
||||
accordingly to the context you got.\n\nThis is the expect criteria for your
|
||||
final answer: Your answer. \n you MUST return the actual complete content as
|
||||
the final answer, not a summary.\n\nThis is the context you''re working with:\nHi!\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}, {"role": "assistant", "content":
|
||||
"Thought: My job is to provide the best possible answer based on the context
|
||||
\"Hi!\" and use the tools available if necessary to gather more information.
|
||||
Since the provided context is minimal, I need to clarify what the requester
|
||||
needs from me.\n\nAction: Ask question to coworker\nAction Input: {\"question\":
|
||||
\"What task do you need assistance with?\", \"context\": \"The only information
|
||||
provided is ''Hi!''. Could you please specify what task you need help with or
|
||||
any additional details?\", \"coworker\": \"test role\"}\nObservation: Hi! Could
|
||||
you please specify what task you need help with or provide any additional details?
|
||||
Thank you!"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
personal goal is: test goal2\nTo give my best complete final answer to the task
|
||||
use the exact following format:\n\nThought: I now can give a great answer\nFinal
|
||||
Answer: Your final answer must be the great and the most complete as possible,
|
||||
it must be outcome described.\n\nI MUST use these formats, my job depends on
|
||||
it!\nCurrent Task: Answer accordingly to the context you got.\n\nThis is the
|
||||
expect criteria for your final answer: Your answer.\nyou MUST return the actual
|
||||
complete content as the final answer, not a summary.\n\nThis is the context
|
||||
you''re working with:\nHi!\n\nBegin! This is VERY important to you, use the
|
||||
tools available and give your best Final Answer, your job depends on it!\n\nThought:"}],
|
||||
"model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
@@ -873,16 +230,16 @@ interactions:
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3222'
|
||||
- '844'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- __cf_bm=iMsGonnXhDDCqOz9miNRwOGOr7OzXm1EqcxEiFk_nT4-1725908571-1.0.1.1-1P.quluT8iIibKOx0N4Mj8vflrRuSZk7gOWmptSyOKAFsTkvt3UultWM2b_B6I956Cvswux_SgpniB37rKO8Vw;
|
||||
_cfuvid=iTR1OQH6LALCSFaeT0eFfOeYnI_fkFZDwyyndcJuH8E-1725908571214-0.0.1.1-604800000
|
||||
- _cfuvid=7gNruCM_IOsMgDEA4EI0g9dg0NDN5T9HigjiRwrAKc0-1726206193576-0.0.1.1-604800000;
|
||||
__cf_bm=ClnNKAuXgV.ion8pbtUaEfUtQSyni9o4VnBEhtjLcvY-1726206193-1.0.1.1-irjAKQKLFXoFHYMHg.GoJNcvu6A7u6ASFzz_Sr3U6wi_72IUfIRiLp7tOwWp0WXUbEKvKk3dJqoTqwblHvq7Wg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
- OpenAI/Python 1.45.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
@@ -892,7 +249,7 @@ interactions:
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
- 1.45.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
@@ -902,21 +259,19 @@ interactions:
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A5dzj9osiocPBXZN0MiQmLvGZ8ENt\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1725908743,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
content: "{\n \"id\": \"chatcmpl-A6tNLvrOTcvGiku88z0yUR1qGt3Og\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726206195,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: Since there is no observation
|
||||
provided, I will proceed with an answer based on the given context, \\\"Hi!\\\".\\n\\nFinal
|
||||
Answer: Hello! How can I assist you today? Please let me know if there is anything
|
||||
specific you need help with.\",\n \"refusal\": null\n },\n \"logprobs\":
|
||||
null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
702,\n \"completion_tokens\": 51,\n \"total_tokens\": 753\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: Hi!\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
166,\n \"completion_tokens\": 15,\n \"total_tokens\": 181,\n \"completion_tokens_details\":
|
||||
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c09738f49597ad6-SJC
|
||||
- 8c25d1937dff7c44-LAX
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -924,7 +279,7 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 09 Sep 2024 19:05:44 GMT
|
||||
- Fri, 13 Sep 2024 05:43:16 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
@@ -938,7 +293,7 @@ interactions:
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '688'
|
||||
- '667'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
@@ -950,13 +305,13 @@ interactions:
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999222'
|
||||
- '29999799'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_4cbd99d9fc8ae79dcf745375e1575dd2
|
||||
- req_7220b5cf61789924adb498bf1b2db031
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
106
tests/cassettes/test_custom_converter_cls.yaml
Normal file
106
tests/cassettes/test_custom_converter_cls.yaml
Normal file
@@ -0,0 +1,106 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Give me an integer score
|
||||
between 1-5 for the following title: ''The impact of AI in the future of work''\n\nThis
|
||||
is the expect criteria for your final answer: The score of the title. \n you
|
||||
MUST return the actual complete content as the final answer, not a summary.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '909'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2wSIKV2MyRFQCpm4RB0sWWGOBu\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128050,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
182,\n \"completion_tokens\": 15,\n \"total_tokens\": 197\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5dbdaed76280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:51 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '334'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999781'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_cce338fbc4502babd1e64ea1e7058bfc
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
@@ -0,0 +1,472 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Crew Manager. You are
|
||||
a seasoned manager with a knack for getting the best out of your team.\nYou
|
||||
are also known for your ability to delegate work to the right people, and to
|
||||
ask the right questions to get the best out of your team.\nEven though you don''t
|
||||
perform tasks by yourself, you have a lot of experience in the field, which
|
||||
allows you to properly evaluate the work of your team members.\nYour personal
|
||||
goal is: Manage the team to complete the task in the best way possible.\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: Delegate work to coworker(task: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Delegate a
|
||||
specific task to one of the following coworkers: Scorer\nThe input to this tool
|
||||
should be the coworker, the task you want them to do, and ALL necessary context
|
||||
to execute the task, they know nothing about the task, so share absolute everything
|
||||
you know, don''t reference things but instead explain them.\nTool Arguments:
|
||||
{''task'': {''title'': ''Task'', ''type'': ''string''}, ''context'': {''title'':
|
||||
''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\nTool
|
||||
Name: Ask question to coworker(question: str, context: str, coworker: Optional[str]
|
||||
= None, **kwargs)\nTool Description: Ask a specific question to one of the following
|
||||
coworkers: Scorer\nThe input to this tool should be the coworker, the question
|
||||
you have for them, and ALL necessary context to ask the question properly, they
|
||||
know nothing about the question, so share absolute everything you know, don''t
|
||||
reference things but instead explain them.\nTool Arguments: {''question'': {''title'':
|
||||
''Question'', ''type'': ''string''}, ''context'': {''title'': ''Context'', ''type'':
|
||||
''string''}, ''coworker'': {''title'': ''Coworker'', ''type'': ''string''},
|
||||
''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse the following
|
||||
format:\n\nThought: you should always think about what to do\nAction: the action
|
||||
to take, only one name of [Delegate work to coworker, Ask question to coworker],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Give me an
|
||||
integer score between 1-5 for the following title: ''The impact of AI in the
|
||||
future of work''\n\nThis is the expect criteria for your final answer: The score
|
||||
of the title. \n you MUST return the actual complete content as the final answer,
|
||||
not a summary.\n\nBegin! This is VERY important to you, use the tools available
|
||||
and give your best Final Answer, your job depends on it!\n\nThought:"}], "model":
|
||||
"gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '2980'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2yke9Z49R9L16MG3XgIVtfSCwY\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128052,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I need to gather an evaluation
|
||||
score for the title \\\"The impact of AI in the future of work\\\" based on
|
||||
some criteria. The best way to accomplish this is to delegate this task to Scorer
|
||||
and provide all the necessary context.\\n\\nAction: Delegate work to coworker\\nAction
|
||||
Input: {\\\"task\\\": \\\"Give an integer score between 1-5 for the following
|
||||
title: 'The impact of AI in the future of work'\\\", \\\"context\\\": \\\"Please
|
||||
evaluate the title based on relevance, clarity, and significance. The title
|
||||
should be rated with an integer score where 1 means very poor and 5 means excellent.\\\",
|
||||
\\\"coworker\\\": \\\"Scorer\\\"}\\n\",\n \"refusal\": null\n },\n
|
||||
\ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n
|
||||
\ \"usage\": {\n \"prompt_tokens\": 660,\n \"completion_tokens\": 136,\n
|
||||
\ \"total_tokens\": 796\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5dc2e8ad6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:54 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '1731'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999270'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_1efbe90172036fca00dc98b82e1d36b7
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Give an integer score between
|
||||
1-5 for the following title: ''The impact of AI in the future of work''\n\nThis
|
||||
is the expect criteria for your final answer: Your best answer to your coworker
|
||||
asking you this, accounting for the context shared. \n you MUST return the actual
|
||||
complete content as the final answer, not a summary.\n\nThis is the context
|
||||
you''re working with:\nPlease evaluate the title based on relevance, clarity,
|
||||
and significance. The title should be rated with an integer score where 1 means
|
||||
very poor and 5 means excellent.\n\nBegin! This is VERY important to you, use
|
||||
the tools available and give your best Final Answer, your job depends on it!\n\nThought:"}],
|
||||
"model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1181'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z3055c8eQwgrOGdho2OPHJJVpDm\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128054,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: 5\\n\\nThe title \\\"The impact of AI in the future of work\\\" is highly
|
||||
relevant, clear, and significant. It addresses a current and crucial topic in
|
||||
the field of technology and employment, making it an excellent choice.\",\n
|
||||
\ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\":
|
||||
\"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 234,\n \"completion_tokens\":
|
||||
59,\n \"total_tokens\": 293\n },\n \"system_fingerprint\": \"fp_157b3831f5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5dd3beab6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:55 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '880'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999714'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_dd6f1578546f53814be3082794dc14a4
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: !!binary |
|
||||
CowVCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkS4xQKEgoQY3Jld2FpLnRl
|
||||
bGVtZXRyeRKQAgoQeT26F/4hZ7e4TKDw2NUDRhIIi+R98k3og7gqDlRhc2sgRXhlY3V0aW9uMAE5
|
||||
+DYNoVBw9BdBMDoLCFFw9BdKLgoIY3Jld19rZXkSIgogNWU2ZWZmZTY4MGE1ZDk3ZGMzODczYjE0
|
||||
ODI1Y2NmYTNKMQoHY3Jld19pZBImCiQyZDg1MmM0YS0wNTRjLTQyMTctYTg4Zi01MDFlNmZkMDI4
|
||||
YTRKLgoIdGFza19rZXkSIgogMjdlZjM4Y2M5OWRhNGE4ZGVkNzBlZDQwNmU0NGFiODZKMQoHdGFz
|
||||
a19pZBImCiQ2ZmZjZjBmMC1iZDI0LTQ5ODYtODU3ZS01NTg4MzNhMDc2NTJ6AhgBhQEAAQAAEpgH
|
||||
ChCshGAUQwPOSjb4/25P1xwiEgjLY8acTM9PSCoMQ3JldyBDcmVhdGVkMAE5WL3vCVFw9BdB0Bry
|
||||
CVFw9BdKGgoOY3Jld2FpX3ZlcnNpb24SCAoGMC41NS4yShoKDnB5dGhvbl92ZXJzaW9uEggKBjMu
|
||||
MTEuN0ouCghjcmV3X2tleRIiCiA1ZTZlZmZlNjgwYTVkOTdkYzM4NzNiMTQ4MjVjY2ZhM0oxCgdj
|
||||
cmV3X2lkEiYKJDQxZTBiNzIzLTJkNzUtNDk4ZS1hZWY3LTQxZDkwY2U1YjI1ZEocCgxjcmV3X3By
|
||||
b2Nlc3MSDAoKc2VxdWVudGlhbEoRCgtjcmV3X21lbW9yeRICEABKGgoUY3Jld19udW1iZXJfb2Zf
|
||||
dGFza3MSAhgBShsKFWNyZXdfbnVtYmVyX29mX2FnZW50cxICGAFKygIKC2NyZXdfYWdlbnRzEroC
|
||||
CrcCW3sia2V5IjogIjkyZTdlYjE5MTY2NGM5MzU3ODVlZDdkNDI0MGEyOTRkIiwgImlkIjogIjY5
|
||||
ODY2NTc0LWZiNTktNDIzZi1iYTQ4LWE5NzJjMWNhM2NkMSIsICJyb2xlIjogIlNjb3JlciIsICJ2
|
||||
ZXJib3NlPyI6IGZhbHNlLCAibWF4X2l0ZXIiOiAyNSwgIm1heF9ycG0iOiBudWxsLCAiZnVuY3Rp
|
||||
b25fY2FsbGluZ19sbG0iOiBudWxsLCAibGxtIjogImdwdC00byIsICJkZWxlZ2F0aW9uX2VuYWJs
|
||||
ZWQ/IjogZmFsc2UsICJhbGxvd19jb2RlX2V4ZWN1dGlvbj8iOiBmYWxzZSwgIm1heF9yZXRyeV9s
|
||||
aW1pdCI6IDIsICJ0b29sc19uYW1lcyI6IFtdfV1K+wEKCmNyZXdfdGFza3MS7AEK6QFbeyJrZXki
|
||||
OiAiMjdlZjM4Y2M5OWRhNGE4ZGVkNzBlZDQwNmU0NGFiODYiLCAiaWQiOiAiYTRkMmZmNjctMDU0
|
||||
OS00MWZhLThjNTctZmY5ZTFlNDljZTZjIiwgImFzeW5jX2V4ZWN1dGlvbj8iOiBmYWxzZSwgImh1
|
||||
bWFuX2lucHV0PyI6IGZhbHNlLCAiYWdlbnRfcm9sZSI6ICJTY29yZXIiLCAiYWdlbnRfa2V5Ijog
|
||||
IjkyZTdlYjE5MTY2NGM5MzU3ODVlZDdkNDI0MGEyOTRkIiwgInRvb2xzX25hbWVzIjogW119XXoC
|
||||
GAGFAQABAAASjgIKEBeiZsUSQ7wZrPp6CpPU4MUSCJWAFBAOLSjCKgxUYXNrIENyZWF0ZWQwATlA
|
||||
0gEKUXD0F0EYLAIKUXD0F0ouCghjcmV3X2tleRIiCiA1ZTZlZmZlNjgwYTVkOTdkYzM4NzNiMTQ4
|
||||
MjVjY2ZhM0oxCgdjcmV3X2lkEiYKJDQxZTBiNzIzLTJkNzUtNDk4ZS1hZWY3LTQxZDkwY2U1YjI1
|
||||
ZEouCgh0YXNrX2tleRIiCiAyN2VmMzhjYzk5ZGE0YThkZWQ3MGVkNDA2ZTQ0YWI4NkoxCgd0YXNr
|
||||
X2lkEiYKJGE0ZDJmZjY3LTA1NDktNDFmYS04YzU3LWZmOWUxZTQ5Y2U2Y3oCGAGFAQABAAASkAIK
|
||||
ECNo+iuPtbkDcB86MRfKzR0SCCaDqJUCC4flKg5UYXNrIEV4ZWN1dGlvbjABORBXAgpRcPQXQcg3
|
||||
CjdRcPQXSi4KCGNyZXdfa2V5EiIKIDVlNmVmZmU2ODBhNWQ5N2RjMzg3M2IxNDgyNWNjZmEzSjEK
|
||||
B2NyZXdfaWQSJgokNDFlMGI3MjMtMmQ3NS00OThlLWFlZjctNDFkOTBjZTViMjVkSi4KCHRhc2tf
|
||||
a2V5EiIKIDI3ZWYzOGNjOTlkYTRhOGRlZDcwZWQ0MDZlNDRhYjg2SjEKB3Rhc2tfaWQSJgokYTRk
|
||||
MmZmNjctMDU0OS00MWZhLThjNTctZmY5ZTFlNDljZTZjegIYAYUBAAEAABL6BgoQaxxZBwOwuRxR
|
||||
W/i8z+hr9BIIB2ymF/uT2RAqDENyZXcgQ3JlYXRlZDABOVhdUDtRcPQXQXiHVjtRcPQXShoKDmNy
|
||||
ZXdhaV92ZXJzaW9uEggKBjAuNTUuMkoaCg5weXRob25fdmVyc2lvbhIICgYzLjExLjdKLgoIY3Jl
|
||||
d19rZXkSIgogNWU2ZWZmZTY4MGE1ZDk3ZGMzODczYjE0ODI1Y2NmYTNKMQoHY3Jld19pZBImCiQ0
|
||||
NjU3OTg0Ny05ODJlLTQ2ZDEtYmJmMy00MjQ5MTFmYWQwYWJKHgoMY3Jld19wcm9jZXNzEg4KDGhp
|
||||
ZXJhcmNoaWNhbEoRCgtjcmV3X21lbW9yeRICEABKGgoUY3Jld19udW1iZXJfb2ZfdGFza3MSAhgB
|
||||
ShsKFWNyZXdfbnVtYmVyX29mX2FnZW50cxICGAFKygIKC2NyZXdfYWdlbnRzEroCCrcCW3sia2V5
|
||||
IjogIjkyZTdlYjE5MTY2NGM5MzU3ODVlZDdkNDI0MGEyOTRkIiwgImlkIjogIjYwOGNkYjYyLThi
|
||||
MTktNDJmMy1iNTRhLTUyOThjZGVjZjM4MCIsICJyb2xlIjogIlNjb3JlciIsICJ2ZXJib3NlPyI6
|
||||
IGZhbHNlLCAibWF4X2l0ZXIiOiAyNSwgIm1heF9ycG0iOiBudWxsLCAiZnVuY3Rpb25fY2FsbGlu
|
||||
Z19sbG0iOiBudWxsLCAibGxtIjogImdwdC00byIsICJkZWxlZ2F0aW9uX2VuYWJsZWQ/IjogZmFs
|
||||
c2UsICJhbGxvd19jb2RlX2V4ZWN1dGlvbj8iOiBmYWxzZSwgIm1heF9yZXRyeV9saW1pdCI6IDIs
|
||||
ICJ0b29sc19uYW1lcyI6IFtdfV1K2wEKCmNyZXdfdGFza3MSzAEKyQFbeyJrZXkiOiAiMjdlZjM4
|
||||
Y2M5OWRhNGE4ZGVkNzBlZDQwNmU0NGFiODYiLCAiaWQiOiAiZDUxMjNjMWYtN2IzMC00ZjNkLThk
|
||||
MzItOWQ2YjhmODdmMzEyIiwgImFzeW5jX2V4ZWN1dGlvbj8iOiBmYWxzZSwgImh1bWFuX2lucHV0
|
||||
PyI6IGZhbHNlLCAiYWdlbnRfcm9sZSI6ICJOb25lIiwgImFnZW50X2tleSI6IG51bGwsICJ0b29s
|
||||
c19uYW1lcyI6IFtdfV16AhgBhQEAAQAA
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '2703'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
User-Agent:
|
||||
- OTel-OTLP-Exporter-Python/1.27.0
|
||||
method: POST
|
||||
uri: https://telemetry.crewai.com:4319/v1/traces
|
||||
response:
|
||||
body:
|
||||
string: "\n\0"
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:56 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Crew Manager. You are
|
||||
a seasoned manager with a knack for getting the best out of your team.\nYou
|
||||
are also known for your ability to delegate work to the right people, and to
|
||||
ask the right questions to get the best out of your team.\nEven though you don''t
|
||||
perform tasks by yourself, you have a lot of experience in the field, which
|
||||
allows you to properly evaluate the work of your team members.\nYour personal
|
||||
goal is: Manage the team to complete the task in the best way possible.\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: Delegate work to coworker(task: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Delegate a
|
||||
specific task to one of the following coworkers: Scorer\nThe input to this tool
|
||||
should be the coworker, the task you want them to do, and ALL necessary context
|
||||
to execute the task, they know nothing about the task, so share absolute everything
|
||||
you know, don''t reference things but instead explain them.\nTool Arguments:
|
||||
{''task'': {''title'': ''Task'', ''type'': ''string''}, ''context'': {''title'':
|
||||
''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\nTool
|
||||
Name: Ask question to coworker(question: str, context: str, coworker: Optional[str]
|
||||
= None, **kwargs)\nTool Description: Ask a specific question to one of the following
|
||||
coworkers: Scorer\nThe input to this tool should be the coworker, the question
|
||||
you have for them, and ALL necessary context to ask the question properly, they
|
||||
know nothing about the question, so share absolute everything you know, don''t
|
||||
reference things but instead explain them.\nTool Arguments: {''question'': {''title'':
|
||||
''Question'', ''type'': ''string''}, ''context'': {''title'': ''Context'', ''type'':
|
||||
''string''}, ''coworker'': {''title'': ''Coworker'', ''type'': ''string''},
|
||||
''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse the following
|
||||
format:\n\nThought: you should always think about what to do\nAction: the action
|
||||
to take, only one name of [Delegate work to coworker, Ask question to coworker],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Give me an
|
||||
integer score between 1-5 for the following title: ''The impact of AI in the
|
||||
future of work''\n\nThis is the expect criteria for your final answer: The score
|
||||
of the title. \n you MUST return the actual complete content as the final answer,
|
||||
not a summary.\n\nBegin! This is VERY important to you, use the tools available
|
||||
and give your best Final Answer, your job depends on it!\n\nThought:"}, {"role":
|
||||
"assistant", "content": "Thought: I need to gather an evaluation score for the
|
||||
title \"The impact of AI in the future of work\" based on some criteria. The
|
||||
best way to accomplish this is to delegate this task to Scorer and provide all
|
||||
the necessary context.\n\nAction: Delegate work to coworker\nAction Input: {\"task\":
|
||||
\"Give an integer score between 1-5 for the following title: ''The impact of
|
||||
AI in the future of work''\", \"context\": \"Please evaluate the title based
|
||||
on relevance, clarity, and significance. The title should be rated with an integer
|
||||
score where 1 means very poor and 5 means excellent.\", \"coworker\": \"Scorer\"}\n\nObservation:
|
||||
5\n\nThe title \"The impact of AI in the future of work\" is highly relevant,
|
||||
clear, and significant. It addresses a current and crucial topic in the field
|
||||
of technology and employment, making it an excellent choice."}], "model": "gpt-4o",
|
||||
"stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3863'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z32SMvj8xe2HIGWbtAU1NJiQQMu\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128056,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now know the final answer\\n\\nFinal
|
||||
Answer: 5\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
848,\n \"completion_tokens\": 14,\n \"total_tokens\": 862\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5ddebb106280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:57 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '261'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999062'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_fcdfbf430a138e20427a734ee04d6609
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
@@ -0,0 +1,441 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Manager. You''re great
|
||||
at delegating work about scoring.\nYour personal goal is: Coordinate scoring
|
||||
processes\nYou ONLY have access to the following tools, and should NEVER make
|
||||
up tools that are not listed here:\n\nTool Name: Delegate work to coworker(task:
|
||||
str, context: str, coworker: Optional[str] = None, **kwargs)\nTool Description:
|
||||
Delegate a specific task to one of the following coworkers: Scorer\nThe input
|
||||
to this tool should be the coworker, the task you want them to do, and ALL necessary
|
||||
context to execute the task, they know nothing about the task, so share absolute
|
||||
everything you know, don''t reference things but instead explain them.\nTool
|
||||
Arguments: {''task'': {''title'': ''Task'', ''type'': ''string''}, ''context'':
|
||||
{''title'': ''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\nTool
|
||||
Name: Ask question to coworker(question: str, context: str, coworker: Optional[str]
|
||||
= None, **kwargs)\nTool Description: Ask a specific question to one of the following
|
||||
coworkers: Scorer\nThe input to this tool should be the coworker, the question
|
||||
you have for them, and ALL necessary context to ask the question properly, they
|
||||
know nothing about the question, so share absolute everything you know, don''t
|
||||
reference things but instead explain them.\nTool Arguments: {''question'': {''title'':
|
||||
''Question'', ''type'': ''string''}, ''context'': {''title'': ''Context'', ''type'':
|
||||
''string''}, ''coworker'': {''title'': ''Coworker'', ''type'': ''string''},
|
||||
''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse the following
|
||||
format:\n\nThought: you should always think about what to do\nAction: the action
|
||||
to take, only one name of [Delegate work to coworker, Ask question to coworker],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Give me an
|
||||
integer score between 1-5 for the following title: ''The impact of AI in the
|
||||
future of work''\n\nThis is the expect criteria for your final answer: The score
|
||||
of the title. \n you MUST return the actual complete content as the final answer,
|
||||
not a summary.\n\nBegin! This is VERY important to you, use the tools available
|
||||
and give your best Final Answer, your job depends on it!\n\nThought:"}], "model":
|
||||
"gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '2607'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z33vxoIkYm0m4jSbwym7Wc3Vxm8\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128057,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"I need to coordinate the scoring process
|
||||
for the title \\\"The impact of AI in the future of work\\\". I will delegate
|
||||
this task to the Scorer, providing them with all the necessary context and details
|
||||
for scoring.\\n\\nAction: Delegate work to coworker\\nAction Input: {\\\"task\\\":
|
||||
\\\"Give an integer score between 1-5 for the following title: 'The impact of
|
||||
AI in the future of work'\\\", \\\"context\\\": \\\"Please score the title based
|
||||
on its relevance, clarity, and potential impact in the context of the future
|
||||
of work. Consider factors such as current trends in AI, its applications in
|
||||
the workplace, and possible future advancements.\\\", \\\"coworker\\\": \\\"Scorer\\\"}\\n\",\n
|
||||
\ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\":
|
||||
\"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 580,\n \"completion_tokens\":
|
||||
139,\n \"total_tokens\": 719\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5de67e2e6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:00 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '2637'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999361'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_f207cc3e7d94e0883825e3595ea8a96a
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Give an integer score between
|
||||
1-5 for the following title: ''The impact of AI in the future of work''\n\nThis
|
||||
is the expect criteria for your final answer: Your best answer to your coworker
|
||||
asking you this, accounting for the context shared. \n you MUST return the actual
|
||||
complete content as the final answer, not a summary.\n\nThis is the context
|
||||
you''re working with:\nPlease score the title based on its relevance, clarity,
|
||||
and potential impact in the context of the future of work. Consider factors
|
||||
such as current trends in AI, its applications in the workplace, and possible
|
||||
future advancements.\n\nBegin! This is VERY important to you, use the tools
|
||||
available and give your best Final Answer, your job depends on it!\n\nThought:"}],
|
||||
"model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1244'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z36jzKD4rmMvTw7b9GqEV6nUg2p\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128060,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"I now can give a great answer\\nFinal
|
||||
Answer: 5\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
243,\n \"completion_tokens\": 13,\n \"total_tokens\": 256\n },\n \"system_fingerprint\":
|
||||
\"fp_157b3831f5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5df9cea56280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:01 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '362'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999698'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_af608b3b93f27393f27d907adb216e3e
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: !!binary |
|
||||
Cr8NCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkSlg0KEgoQY3Jld2FpLnRl
|
||||
bGVtZXRyeRKcAQoQk2pa11XjdNKyuC+Uf572wBIIwvnaY+L5o1gqClRvb2wgVXNhZ2UwATkgU5JE
|
||||
UnD0F0E4N5ZEUnD0F0oaCg5jcmV3YWlfdmVyc2lvbhIICgYwLjU1LjJKKAoJdG9vbF9uYW1lEhsK
|
||||
GURlbGVnYXRlIHdvcmsgdG8gY293b3JrZXJKDgoIYXR0ZW1wdHMSAhgBegIYAYUBAAEAABLPCQoQ
|
||||
W8y80ZFFZtP3ll2qS/ZV+BIIVBB4VFX50akqDENyZXcgQ3JlYXRlZDABOUC+XY5ScPQXQRgGYY5S
|
||||
cPQXShoKDmNyZXdhaV92ZXJzaW9uEggKBjAuNTUuMkoaCg5weXRob25fdmVyc2lvbhIICgYzLjEx
|
||||
LjdKLgoIY3Jld19rZXkSIgogNzQyNzU3MzEyZWY3YmI0ZWUwYjA2NjJkMWMyZTIxNzlKMQoHY3Jl
|
||||
d19pZBImCiRhODQ2M2Y1My1iZGJiLTQxYjMtYTQzNC03MmQzN2JiN2Y3NjNKHAoMY3Jld19wcm9j
|
||||
ZXNzEgwKCnNlcXVlbnRpYWxKEQoLY3Jld19tZW1vcnkSAhAAShoKFGNyZXdfbnVtYmVyX29mX3Rh
|
||||
c2tzEgIYAUobChVjcmV3X251bWJlcl9vZl9hZ2VudHMSAhgCSoAFCgtjcmV3X2FnZW50cxLwBArt
|
||||
BFt7ImtleSI6ICI4OWNmMzExYjQ4YjUyMTY5ZDQyZjM5MjVjNWJlMWM1YSIsICJpZCI6ICJjNzM5
|
||||
ZmMyMS00MWQwLTQzODAtYmZhMi1iYjEyOTFhZTYzNDEiLCAicm9sZSI6ICJNYW5hZ2VyIiwgInZl
|
||||
cmJvc2U/IjogZmFsc2UsICJtYXhfaXRlciI6IDI1LCAibWF4X3JwbSI6IG51bGwsICJmdW5jdGlv
|
||||
bl9jYWxsaW5nX2xsbSI6IG51bGwsICJsbG0iOiAiZ3B0LTRvIiwgImRlbGVnYXRpb25fZW5hYmxl
|
||||
ZD8iOiB0cnVlLCAiYWxsb3dfY29kZV9leGVjdXRpb24/IjogZmFsc2UsICJtYXhfcmV0cnlfbGlt
|
||||
aXQiOiAyLCAidG9vbHNfbmFtZXMiOiBbXX0sIHsia2V5IjogIjkyZTdlYjE5MTY2NGM5MzU3ODVl
|
||||
ZDdkNDI0MGEyOTRkIiwgImlkIjogIjIxMGVmODM5LTQwNGEtNDg4ZC05YmM2LWE1ZGQ2YTNmOTIw
|
||||
MCIsICJyb2xlIjogIlNjb3JlciIsICJ2ZXJib3NlPyI6IGZhbHNlLCAibWF4X2l0ZXIiOiAyNSwg
|
||||
Im1heF9ycG0iOiBudWxsLCAiZnVuY3Rpb25fY2FsbGluZ19sbG0iOiBudWxsLCAibGxtIjogImdw
|
||||
dC00byIsICJkZWxlZ2F0aW9uX2VuYWJsZWQ/IjogdHJ1ZSwgImFsbG93X2NvZGVfZXhlY3V0aW9u
|
||||
PyI6IGZhbHNlLCAibWF4X3JldHJ5X2xpbWl0IjogMiwgInRvb2xzX25hbWVzIjogW119XUr8AQoK
|
||||
Y3Jld190YXNrcxLtAQrqAVt7ImtleSI6ICIyN2VmMzhjYzk5ZGE0YThkZWQ3MGVkNDA2ZTQ0YWI4
|
||||
NiIsICJpZCI6ICJiMTUzMzA4Yy1hNjk0LTRhZjAtYTY2ZC0yOGRmNGE3MzcwYTMiLCAiYXN5bmNf
|
||||
ZXhlY3V0aW9uPyI6IGZhbHNlLCAiaHVtYW5faW5wdXQ/IjogZmFsc2UsICJhZ2VudF9yb2xlIjog
|
||||
Ik1hbmFnZXIiLCAiYWdlbnRfa2V5IjogIjg5Y2YzMTFiNDhiNTIxNjlkNDJmMzkyNWM1YmUxYzVh
|
||||
IiwgInRvb2xzX25hbWVzIjogW119XXoCGAGFAQABAAASjgIKEKdj6uPw5wPEHrKcd35NtvsSCEeu
|
||||
aZnIzcjDKgxUYXNrIENyZWF0ZWQwATkgQOKOUnD0F0EA7OKOUnD0F0ouCghjcmV3X2tleRIiCiA3
|
||||
NDI3NTczMTJlZjdiYjRlZTBiMDY2MmQxYzJlMjE3OUoxCgdjcmV3X2lkEiYKJGE4NDYzZjUzLWJk
|
||||
YmItNDFiMy1hNDM0LTcyZDM3YmI3Zjc2M0ouCgh0YXNrX2tleRIiCiAyN2VmMzhjYzk5ZGE0YThk
|
||||
ZWQ3MGVkNDA2ZTQ0YWI4NkoxCgd0YXNrX2lkEiYKJGIxNTMzMDhjLWE2OTQtNGFmMC1hNjZkLTI4
|
||||
ZGY0YTczNzBhM3oCGAGFAQABAAA=
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1730'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
User-Agent:
|
||||
- OTel-OTLP-Exporter-Python/1.27.0
|
||||
method: POST
|
||||
uri: https://telemetry.crewai.com:4319/v1/traces
|
||||
response:
|
||||
body:
|
||||
string: "\n\0"
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:01 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Manager. You''re great
|
||||
at delegating work about scoring.\nYour personal goal is: Coordinate scoring
|
||||
processes\nYou ONLY have access to the following tools, and should NEVER make
|
||||
up tools that are not listed here:\n\nTool Name: Delegate work to coworker(task:
|
||||
str, context: str, coworker: Optional[str] = None, **kwargs)\nTool Description:
|
||||
Delegate a specific task to one of the following coworkers: Scorer\nThe input
|
||||
to this tool should be the coworker, the task you want them to do, and ALL necessary
|
||||
context to execute the task, they know nothing about the task, so share absolute
|
||||
everything you know, don''t reference things but instead explain them.\nTool
|
||||
Arguments: {''task'': {''title'': ''Task'', ''type'': ''string''}, ''context'':
|
||||
{''title'': ''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\nTool
|
||||
Name: Ask question to coworker(question: str, context: str, coworker: Optional[str]
|
||||
= None, **kwargs)\nTool Description: Ask a specific question to one of the following
|
||||
coworkers: Scorer\nThe input to this tool should be the coworker, the question
|
||||
you have for them, and ALL necessary context to ask the question properly, they
|
||||
know nothing about the question, so share absolute everything you know, don''t
|
||||
reference things but instead explain them.\nTool Arguments: {''question'': {''title'':
|
||||
''Question'', ''type'': ''string''}, ''context'': {''title'': ''Context'', ''type'':
|
||||
''string''}, ''coworker'': {''title'': ''Coworker'', ''type'': ''string''},
|
||||
''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse the following
|
||||
format:\n\nThought: you should always think about what to do\nAction: the action
|
||||
to take, only one name of [Delegate work to coworker, Ask question to coworker],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Give me an
|
||||
integer score between 1-5 for the following title: ''The impact of AI in the
|
||||
future of work''\n\nThis is the expect criteria for your final answer: The score
|
||||
of the title. \n you MUST return the actual complete content as the final answer,
|
||||
not a summary.\n\nBegin! This is VERY important to you, use the tools available
|
||||
and give your best Final Answer, your job depends on it!\n\nThought:"}, {"role":
|
||||
"assistant", "content": "I need to coordinate the scoring process for the title
|
||||
\"The impact of AI in the future of work\". I will delegate this task to the
|
||||
Scorer, providing them with all the necessary context and details for scoring.\n\nAction:
|
||||
Delegate work to coworker\nAction Input: {\"task\": \"Give an integer score
|
||||
between 1-5 for the following title: ''The impact of AI in the future of work''\",
|
||||
\"context\": \"Please score the title based on its relevance, clarity, and potential
|
||||
impact in the context of the future of work. Consider factors such as current
|
||||
trends in AI, its applications in the workplace, and possible future advancements.\",
|
||||
\"coworker\": \"Scorer\"}\n\nObservation: 5"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3316'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z37Cj4kDP8u0Z5wTOuzSyQ7cH5q\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128061,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now know the final answer.\\nFinal
|
||||
Answer: The score of the title \\\"The impact of AI in the future of work\\\"
|
||||
is 5.\",\n \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\":
|
||||
\"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 727,\n \"completion_tokens\":
|
||||
32,\n \"total_tokens\": 759\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5dff78bb6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:02 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '669'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999197'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_a1c97d3f0bdf96af5454b71ba6912703
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
804
tests/cassettes/test_increment_tool_errors.yaml
Normal file
804
tests/cassettes/test_increment_tool_errors.yaml
Normal file
@@ -0,0 +1,804 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: !!binary |
|
||||
Cv0KCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkS1AoKEgoQY3Jld2FpLnRl
|
||||
bGVtZXRyeRKcAQoQGpWU7gV7gyM1X5tKq1MGOhIIcli7XULaxP4qClRvb2wgVXNhZ2UwATkwsAl9
|
||||
U3D0F0FIlA19U3D0F0oaCg5jcmV3YWlfdmVyc2lvbhIICgYwLjU1LjJKKAoJdG9vbF9uYW1lEhsK
|
||||
GURlbGVnYXRlIHdvcmsgdG8gY293b3JrZXJKDgoIYXR0ZW1wdHMSAhgBegIYAYUBAAEAABKQAgoQ
|
||||
h3LGEzc6sqEX2iWRA1A1GRIIr0vmwYXNK6kqDlRhc2sgRXhlY3V0aW9uMAE5gCrjjlJw9BdBOFZq
|
||||
vlNw9BdKLgoIY3Jld19rZXkSIgogNzQyNzU3MzEyZWY3YmI0ZWUwYjA2NjJkMWMyZTIxNzlKMQoH
|
||||
Y3Jld19pZBImCiRhODQ2M2Y1My1iZGJiLTQxYjMtYTQzNC03MmQzN2JiN2Y3NjNKLgoIdGFza19r
|
||||
ZXkSIgogMjdlZjM4Y2M5OWRhNGE4ZGVkNzBlZDQwNmU0NGFiODZKMQoHdGFza19pZBImCiRiMTUz
|
||||
MzA4Yy1hNjk0LTRhZjAtYTY2ZC0yOGRmNGE3MzcwYTN6AhgBhQEAAQAAEosHChD7d622aCh3C4Kw
|
||||
h7CCLF+jEgiChWUPzaPdAyoMQ3JldyBDcmVhdGVkMAE5QJQIwVNw9BdB6GYLwVNw9BdKGgoOY3Jl
|
||||
d2FpX3ZlcnNpb24SCAoGMC41NS4yShoKDnB5dGhvbl92ZXJzaW9uEggKBjMuMTEuN0ouCghjcmV3
|
||||
X2tleRIiCiAzMDNiOGVkZDViMDA4NzEwZDc2YWFmODI1YTcwOWU1NUoxCgdjcmV3X2lkEiYKJDdl
|
||||
MGFjZDcxLTliOTUtNGViMS05NDExLTA0NDFhODFkNmVmM0oeCgxjcmV3X3Byb2Nlc3MSDgoMaGll
|
||||
cmFyY2hpY2FsShEKC2NyZXdfbWVtb3J5EgIQAEoaChRjcmV3X251bWJlcl9vZl90YXNrcxICGAFK
|
||||
GwoVY3Jld19udW1iZXJfb2ZfYWdlbnRzEgIYAUrbAgoLY3Jld19hZ2VudHMSywIKyAJbeyJrZXki
|
||||
OiAiOTJlN2ViMTkxNjY0YzkzNTc4NWVkN2Q0MjQwYTI5NGQiLCAiaWQiOiAiMTY2YmVmNTMtMDM5
|
||||
Yi00MDhhLTk0MTEtYjJiZDE3NDhhMWFiIiwgInJvbGUiOiAiU2NvcmVyIiwgInZlcmJvc2U/Ijog
|
||||
ZmFsc2UsICJtYXhfaXRlciI6IDI1LCAibWF4X3JwbSI6IG51bGwsICJmdW5jdGlvbl9jYWxsaW5n
|
||||
X2xsbSI6IG51bGwsICJsbG0iOiAiZ3B0LTRvIiwgImRlbGVnYXRpb25fZW5hYmxlZD8iOiB0cnVl
|
||||
LCAiYWxsb3dfY29kZV9leGVjdXRpb24/IjogZmFsc2UsICJtYXhfcmV0cnlfbGltaXQiOiAyLCAi
|
||||
dG9vbHNfbmFtZXMiOiBbInNjb3JpbmdfZXhhbXBsZXMiXX1dStsBCgpjcmV3X3Rhc2tzEswBCskB
|
||||
W3sia2V5IjogImYzNTc1YjAxM2MyMjk0YjdjYzhlODAzMTU1YzhiYTQ2IiwgImlkIjogImJmMjcz
|
||||
NzNlLTA0M2YtNDk3My1hMDM2LWZiNzE4OTEyOTIwYiIsICJhc3luY19leGVjdXRpb24/IjogZmFs
|
||||
c2UsICJodW1hbl9pbnB1dD8iOiBmYWxzZSwgImFnZW50X3JvbGUiOiAiTm9uZSIsICJhZ2VudF9r
|
||||
ZXkiOiBudWxsLCAidG9vbHNfbmFtZXMiOiBbXX1degIYAYUBAAEAAA==
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1408'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
User-Agent:
|
||||
- OTel-OTLP-Exporter-Python/1.27.0
|
||||
method: POST
|
||||
uri: https://telemetry.crewai.com:4319/v1/traces
|
||||
response:
|
||||
body:
|
||||
string: "\n\0"
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:06 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Crew Manager. You are
|
||||
a seasoned manager with a knack for getting the best out of your team.\nYou
|
||||
are also known for your ability to delegate work to the right people, and to
|
||||
ask the right questions to get the best out of your team.\nEven though you don''t
|
||||
perform tasks by yourself, you have a lot of experience in the field, which
|
||||
allows you to properly evaluate the work of your team members.\nYour personal
|
||||
goal is: Manage the team to complete the task in the best way possible.\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: Delegate work to coworker(task: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Delegate a
|
||||
specific task to one of the following coworkers: Scorer\nThe input to this tool
|
||||
should be the coworker, the task you want them to do, and ALL necessary context
|
||||
to execute the task, they know nothing about the task, so share absolute everything
|
||||
you know, don''t reference things but instead explain them.\nTool Arguments:
|
||||
{''task'': {''title'': ''Task'', ''type'': ''string''}, ''context'': {''title'':
|
||||
''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\nTool
|
||||
Name: Ask question to coworker(question: str, context: str, coworker: Optional[str]
|
||||
= None, **kwargs)\nTool Description: Ask a specific question to one of the following
|
||||
coworkers: Scorer\nThe input to this tool should be the coworker, the question
|
||||
you have for them, and ALL necessary context to ask the question properly, they
|
||||
know nothing about the question, so share absolute everything you know, don''t
|
||||
reference things but instead explain them.\nTool Arguments: {''question'': {''title'':
|
||||
''Question'', ''type'': ''string''}, ''context'': {''title'': ''Context'', ''type'':
|
||||
''string''}, ''coworker'': {''title'': ''Coworker'', ''type'': ''string''},
|
||||
''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse the following
|
||||
format:\n\nThought: you should always think about what to do\nAction: the action
|
||||
to take, only one name of [Delegate work to coworker, Ask question to coworker],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Give me an
|
||||
integer score between 1-5 for the following title: ''The impact of AI in the
|
||||
future of work'', check examples to based your evaluation.\n\nThis is the expect
|
||||
criteria for your final answer: The score of the title. \n you MUST return the
|
||||
actual complete content as the final answer, not a summary.\n\nBegin! This is
|
||||
VERY important to you, use the tools available and give your best Final Answer,
|
||||
your job depends on it!\n\nThought:"}], "model": "gpt-4-0125-preview", "stop":
|
||||
["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3034'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z38ir9Vhym04xT66OQrDky4EI34\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128062,\n \"model\": \"gpt-4-0125-preview\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: Before assigning a score, I
|
||||
must understand the criteria that we use for evaluation. Since I cannot evaluate
|
||||
the title myself, I need to delegate the task to my coworker, Scorer, providing
|
||||
them with all the necessary context to assess the title appropriately.\\n\\nAction:
|
||||
Delegate work to coworker\\nAction Input: {\\\"task\\\": \\\"Evaluate title\\\",
|
||||
\\\"context\\\": \\\"We need to give an integer score between 1-5 for the title:
|
||||
'The impact of AI in the future of work'. The score should be based on relevance,
|
||||
insightfulness, and originality. Please consider these criteria when evaluating
|
||||
the title.\\\", \\\"coworker\\\": \\\"Scorer\\\"}\",\n \"refusal\": null\n
|
||||
\ },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n
|
||||
\ ],\n \"usage\": {\n \"prompt_tokens\": 672,\n \"completion_tokens\":
|
||||
135,\n \"total_tokens\": 807\n },\n \"system_fingerprint\": null\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5e06bbdc6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:08 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '5366'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '2000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '1999259'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 22ms
|
||||
x-request-id:
|
||||
- req_0256635e5f90bc1005c9c2897c1899e4
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: scoring_examples(*args: Any, **kwargs: Any)
|
||||
-> Any\nTool Description: scoring_examples() - Useful examples for scoring titles.
|
||||
\nTool Arguments: {}\n\nUse the following format:\n\nThought: you should always
|
||||
think about what to do\nAction: the action to take, only one name of [scoring_examples],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Evaluate title\n\nThis
|
||||
is the expect criteria for your final answer: Your best answer to your coworker
|
||||
asking you this, accounting for the context shared. \n you MUST return the actual
|
||||
complete content as the final answer, not a summary.\n\nThis is the context
|
||||
you''re working with:\nWe need to give an integer score between 1-5 for the
|
||||
title: ''The impact of AI in the future of work''. The score should be based
|
||||
on relevance, insightfulness, and originality. Please consider these criteria
|
||||
when evaluating the title.\n\nBegin! This is VERY important to you, use the
|
||||
tools available and give your best Final Answer, your job depends on it!\n\nThought:"}],
|
||||
"model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1646'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z3EMuWJ0zfPW7ZBkzpCDZA7UghH\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128068,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"To accurately score the title 'The impact
|
||||
of AI in the future of work' based on relevance, insightfulness, and originality,
|
||||
I should first gather some useful examples for scoring titles.\\n\\nAction:
|
||||
scoring_examples\\nAction Input: {}\",\n \"refusal\": null\n },\n
|
||||
\ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n
|
||||
\ \"usage\": {\n \"prompt_tokens\": 329,\n \"completion_tokens\": 46,\n
|
||||
\ \"total_tokens\": 375\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5e2af9fc6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:09 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '962'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999602'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_f5d3635348e20fcfa7f86ee64ec68072
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: scoring_examples(*args: Any, **kwargs: Any)
|
||||
-> Any\nTool Description: scoring_examples() - Useful examples for scoring titles.
|
||||
\nTool Arguments: {}\n\nUse the following format:\n\nThought: you should always
|
||||
think about what to do\nAction: the action to take, only one name of [scoring_examples],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Evaluate title\n\nThis
|
||||
is the expect criteria for your final answer: Your best answer to your coworker
|
||||
asking you this, accounting for the context shared. \n you MUST return the actual
|
||||
complete content as the final answer, not a summary.\n\nThis is the context
|
||||
you''re working with:\nWe need to give an integer score between 1-5 for the
|
||||
title: ''The impact of AI in the future of work''. The score should be based
|
||||
on relevance, insightfulness, and originality. Please consider these criteria
|
||||
when evaluating the title.\n\nBegin! This is VERY important to you, use the
|
||||
tools available and give your best Final Answer, your job depends on it!\n\nThought:"},
|
||||
{"role": "assistant", "content": "To accurately score the title ''The impact
|
||||
of AI in the future of work'' based on relevance, insightfulness, and originality,
|
||||
I should first gather some useful examples for scoring titles.\n\nAction: scoring_examples\nAction
|
||||
Input: {}\nObservation: \nI encountered an error while trying to use the tool.
|
||||
This was the error: Error.\n Tool scoring_examples accepts these inputs: scoring_examples()
|
||||
- Useful examples for scoring titles. .\nMoving on then. I MUST either use a
|
||||
tool (use one at time) OR give my best final answer. To Use the following format:\n\nThought:
|
||||
you should always think about what to do\nAction: the action to take, should
|
||||
be one of [scoring_examples]\nAction Input: the input to the action, dictionary
|
||||
enclosed in curly braces\nObservation: the result of the action\n... (this Thought/Action/Action
|
||||
Input/Observation can repeat N times)\nThought: I now can give a great answer\nFinal
|
||||
Answer: Your final answer must be the great and the most complete as possible,
|
||||
it must be outcome described\n\n "}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '2700'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z3FGyPXjQLqtQi1bP839f3sXJTR\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128069,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"I will make another attempt to gather
|
||||
useful examples for scoring titles to ensure my evaluation is accurate.\\n\\nAction:
|
||||
scoring_examples\\nAction Input: {}\",\n \"refusal\": null\n },\n
|
||||
\ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n
|
||||
\ \"usage\": {\n \"prompt_tokens\": 547,\n \"completion_tokens\": 28,\n
|
||||
\ \"total_tokens\": 575\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5e33be1c6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:10 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '522'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999351'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_ca6ab2c18724eab9c3cf14e0420b62a6
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: !!binary |
|
||||
CqYBCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkSfgoSChBjcmV3YWkudGVs
|
||||
ZW1ldHJ5EmgKELy5u7S9ciySMmk+s0SGxW4SCE4a9Lw+zbFYKhBUb29sIFVzYWdlIEVycm9yMAE5
|
||||
+D9Fb1Vw9BdBcA5Kb1Vw9BdKGgoOY3Jld2FpX3ZlcnNpb24SCAoGMC41NS4yegIYAYUBAAEAAA==
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '169'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
User-Agent:
|
||||
- OTel-OTLP-Exporter-Python/1.27.0
|
||||
method: POST
|
||||
uri: https://telemetry.crewai.com:4319/v1/traces
|
||||
response:
|
||||
body:
|
||||
string: "\n\0"
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:11 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: scoring_examples(*args: Any, **kwargs: Any)
|
||||
-> Any\nTool Description: scoring_examples() - Useful examples for scoring titles.
|
||||
\nTool Arguments: {}\n\nUse the following format:\n\nThought: you should always
|
||||
think about what to do\nAction: the action to take, only one name of [scoring_examples],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Evaluate title\n\nThis
|
||||
is the expect criteria for your final answer: Your best answer to your coworker
|
||||
asking you this, accounting for the context shared. \n you MUST return the actual
|
||||
complete content as the final answer, not a summary.\n\nThis is the context
|
||||
you''re working with:\nWe need to give an integer score between 1-5 for the
|
||||
title: ''The impact of AI in the future of work''. The score should be based
|
||||
on relevance, insightfulness, and originality. Please consider these criteria
|
||||
when evaluating the title.\n\nBegin! This is VERY important to you, use the
|
||||
tools available and give your best Final Answer, your job depends on it!\n\nThought:"},
|
||||
{"role": "assistant", "content": "To accurately score the title ''The impact
|
||||
of AI in the future of work'' based on relevance, insightfulness, and originality,
|
||||
I should first gather some useful examples for scoring titles.\n\nAction: scoring_examples\nAction
|
||||
Input: {}\nObservation: \nI encountered an error while trying to use the tool.
|
||||
This was the error: Error.\n Tool scoring_examples accepts these inputs: scoring_examples()
|
||||
- Useful examples for scoring titles. .\nMoving on then. I MUST either use a
|
||||
tool (use one at time) OR give my best final answer. To Use the following format:\n\nThought:
|
||||
you should always think about what to do\nAction: the action to take, should
|
||||
be one of [scoring_examples]\nAction Input: the input to the action, dictionary
|
||||
enclosed in curly braces\nObservation: the result of the action\n... (this Thought/Action/Action
|
||||
Input/Observation can repeat N times)\nThought: I now can give a great answer\nFinal
|
||||
Answer: Your final answer must be the great and the most complete as possible,
|
||||
it must be outcome described\n\n "}, {"role": "assistant", "content": "I will
|
||||
make another attempt to gather useful examples for scoring titles to ensure
|
||||
my evaluation is accurate.\n\nAction: scoring_examples\nAction Input: {}\nObservation:
|
||||
\nI encountered an error while trying to use the tool. This was the error: Error.\n
|
||||
Tool scoring_examples accepts these inputs: scoring_examples() - Useful examples
|
||||
for scoring titles. .\nMoving on then. I MUST either use a tool (use one at
|
||||
time) OR give my best final answer. To Use the following format:\n\nThought:
|
||||
you should always think about what to do\nAction: the action to take, should
|
||||
be one of [scoring_examples]\nAction Input: the input to the action, dictionary
|
||||
enclosed in curly braces\nObservation: the result of the action\n... (this Thought/Action/Action
|
||||
Input/Observation can repeat N times)\nThought: I now can give a great answer\nFinal
|
||||
Answer: Your final answer must be the great and the most complete as possible,
|
||||
it must be outcome described\n\n "}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3677'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z3GzC7QdzdIS35KeUPkd98Pok9p\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128070,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Given the persistent issue with retrieving
|
||||
examples, I will leverage my expertise to evaluate the title based on the criteria
|
||||
provided: relevance, insightfulness, and originality.\\n\\nThought: I will evaluate
|
||||
the title 'The impact of AI in the future of work' using the three criteria
|
||||
directly.\\n\\n1. **Relevance:** \\n - The title is highly relevant as AI
|
||||
is a significant and timely topic in today's technological landscape.\\n -
|
||||
The future of work is a pertinent issue affecting a broad audience, including
|
||||
industries, employees, and policymakers.\\n\\n2. **Insightfulness:**\\n -
|
||||
The title promises an examination of AI's impact, which suggests an exploration
|
||||
of both potential benefits and challenges.\\n - It invites a discussion on
|
||||
how AI could reshape the workforce, hinting at valuable insights for preparing
|
||||
for future changes.\\n\\n3. **Originality:**\\n - The concept of AI influencing
|
||||
the future of work is a common discussion point in many academic and industry
|
||||
circles.\\n - However, the title doesn't hint at a unique angle or novel perspective
|
||||
that sets it apart from other similar works.\\n\\nBased on these points, I will
|
||||
score the title accordingly.\\n\\nFinal Answer: Based on relevance (5), insightfulness
|
||||
(4), and originality (3):\\n\\n**Final Score: 4**\",\n \"refusal\": null\n
|
||||
\ },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n
|
||||
\ ],\n \"usage\": {\n \"prompt_tokens\": 747,\n \"completion_tokens\":
|
||||
252,\n \"total_tokens\": 999\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5e39d87d6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:14 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '3391'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999119'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 1ms
|
||||
x-request-id:
|
||||
- req_198e30d47bf1cfd5979af826a36e4c58
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: !!binary |
|
||||
CsYCCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkSnQIKEgoQY3Jld2FpLnRl
|
||||
bGVtZXRyeRJoChCMo9WDZAlYK58kAM8/CEQsEgjOTYPwOZ0v6CoQVG9vbCBVc2FnZSBFcnJvcjAB
|
||||
OSDEO6lVcPQXQRD8QKlVcPQXShoKDmNyZXdhaV92ZXJzaW9uEggKBjAuNTUuMnoCGAGFAQABAAAS
|
||||
nAEKECjsvAFKsK4VP6bGPZdG/RISCHc4LY7teq30KgpUb29sIFVzYWdlMAE5IBQMjVZw9BdBCIMP
|
||||
jVZw9BdKGgoOY3Jld2FpX3ZlcnNpb24SCAoGMC41NS4ySigKCXRvb2xfbmFtZRIbChlEZWxlZ2F0
|
||||
ZSB3b3JrIHRvIGNvd29ya2VySg4KCGF0dGVtcHRzEgIYAXoCGAGFAQABAAA=
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '329'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
User-Agent:
|
||||
- OTel-OTLP-Exporter-Python/1.27.0
|
||||
method: POST
|
||||
uri: https://telemetry.crewai.com:4319/v1/traces
|
||||
response:
|
||||
body:
|
||||
string: "\n\0"
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/x-protobuf
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:16 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Crew Manager. You are
|
||||
a seasoned manager with a knack for getting the best out of your team.\nYou
|
||||
are also known for your ability to delegate work to the right people, and to
|
||||
ask the right questions to get the best out of your team.\nEven though you don''t
|
||||
perform tasks by yourself, you have a lot of experience in the field, which
|
||||
allows you to properly evaluate the work of your team members.\nYour personal
|
||||
goal is: Manage the team to complete the task in the best way possible.\nYou
|
||||
ONLY have access to the following tools, and should NEVER make up tools that
|
||||
are not listed here:\n\nTool Name: Delegate work to coworker(task: str, context:
|
||||
str, coworker: Optional[str] = None, **kwargs)\nTool Description: Delegate a
|
||||
specific task to one of the following coworkers: Scorer\nThe input to this tool
|
||||
should be the coworker, the task you want them to do, and ALL necessary context
|
||||
to execute the task, they know nothing about the task, so share absolute everything
|
||||
you know, don''t reference things but instead explain them.\nTool Arguments:
|
||||
{''task'': {''title'': ''Task'', ''type'': ''string''}, ''context'': {''title'':
|
||||
''Context'', ''type'': ''string''}, ''coworker'': {''title'': ''Coworker'',
|
||||
''type'': ''string''}, ''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\nTool
|
||||
Name: Ask question to coworker(question: str, context: str, coworker: Optional[str]
|
||||
= None, **kwargs)\nTool Description: Ask a specific question to one of the following
|
||||
coworkers: Scorer\nThe input to this tool should be the coworker, the question
|
||||
you have for them, and ALL necessary context to ask the question properly, they
|
||||
know nothing about the question, so share absolute everything you know, don''t
|
||||
reference things but instead explain them.\nTool Arguments: {''question'': {''title'':
|
||||
''Question'', ''type'': ''string''}, ''context'': {''title'': ''Context'', ''type'':
|
||||
''string''}, ''coworker'': {''title'': ''Coworker'', ''type'': ''string''},
|
||||
''kwargs'': {''title'': ''Kwargs'', ''type'': ''object''}}\n\nUse the following
|
||||
format:\n\nThought: you should always think about what to do\nAction: the action
|
||||
to take, only one name of [Delegate work to coworker, Ask question to coworker],
|
||||
just the name, exactly as it''s written.\nAction Input: the input to the action,
|
||||
just a simple python dictionary, enclosed in curly braces, using \" to wrap
|
||||
keys and values.\nObservation: the result of the action\n\nOnce all necessary
|
||||
information is gathered:\n\nThought: I now know the final answer\nFinal Answer:
|
||||
the final answer to the original input question\n\nCurrent Task: Give me an
|
||||
integer score between 1-5 for the following title: ''The impact of AI in the
|
||||
future of work'', check examples to based your evaluation.\n\nThis is the expect
|
||||
criteria for your final answer: The score of the title. \n you MUST return the
|
||||
actual complete content as the final answer, not a summary.\n\nBegin! This is
|
||||
VERY important to you, use the tools available and give your best Final Answer,
|
||||
your job depends on it!\n\nThought:"}, {"role": "assistant", "content": "Thought:
|
||||
Before assigning a score, I must understand the criteria that we use for evaluation.
|
||||
Since I cannot evaluate the title myself, I need to delegate the task to my
|
||||
coworker, Scorer, providing them with all the necessary context to assess the
|
||||
title appropriately.\n\nAction: Delegate work to coworker\nAction Input: {\"task\":
|
||||
\"Evaluate title\", \"context\": \"We need to give an integer score between
|
||||
1-5 for the title: ''The impact of AI in the future of work''. The score should
|
||||
be based on relevance, insightfulness, and originality. Please consider these
|
||||
criteria when evaluating the title.\", \"coworker\": \"Scorer\"}\nObservation:
|
||||
Based on relevance (5), insightfulness (4), and originality (3):\n\n**Final
|
||||
Score: 4**"}], "model": "gpt-4-0125-preview", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '3801'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z3KZMtHCI3KHSZ8UIt3DAfN3ONf\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128074,\n \"model\": \"gpt-4-0125-preview\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now know the final answer\\n\\nFinal
|
||||
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
838,\n \"completion_tokens\": 14,\n \"total_tokens\": 852\n },\n \"system_fingerprint\":
|
||||
null\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5e51b9be6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:01:18 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '3884'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '2000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '1999080'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 27ms
|
||||
x-request-id:
|
||||
- req_4388c534a4e3cc95495ce98010ad7001
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
426
tests/cassettes/test_output_json_to_another_task.yaml
Normal file
426
tests/cassettes/test_output_json_to_another_task.yaml
Normal file
@@ -0,0 +1,426 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Give me an integer score
|
||||
between 1-5 for the following title: ''The impact of AI in the future of work''\n\nThis
|
||||
is the expect criteria for your final answer: The score of the title. \n you
|
||||
MUST return the actual complete content as the final answer, not a summary.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '909'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=vAWf6_0Extt99cMI2V6jEXskpiREa5aqNqsAF6BIU3Y-1726009485721-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2eGCwRe7OfC5Gp77RZIVV5nQjL\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128032,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
182,\n \"completion_tokens\": 15,\n \"total_tokens\": 197\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5d47aacc1af2-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:32 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg;
|
||||
path=/; expires=Thu, 12-Sep-24 08:30:32 GMT; domain=.api.openai.com; HttpOnly;
|
||||
Secure; SameSite=None
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '352'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999781'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_3ce8d1ab53beacd087e70d43f2dd1fbf
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "4"}, {"role": "system", "content":
|
||||
"I''m gonna convert this raw text into valid JSON.\n\nThe json should have the
|
||||
following structure, with the following keys:\n{\n score: int\n}"}], "model":
|
||||
"gpt-4o", "tool_choice": {"type": "function", "function": {"name": "ScoreOutput"}},
|
||||
"tools": [{"type": "function", "function": {"name": "ScoreOutput", "description":
|
||||
"Correctly extracted `ScoreOutput` with all the required parameters with correct
|
||||
types", "parameters": {"properties": {"score": {"title": "Score", "type": "integer"}},
|
||||
"required": ["score"], "type": "object"}}}]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '615'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=uLAishvhwojpVQNsRgyhpZp9roGiBGh8LnHtWbwIqZc-1726009486440-0.0.1.1-604800000
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2fA6JnzoadQsDR6O756Ng1awQl\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128033,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n
|
||||
\ \"id\": \"call_5ArLOcaht2ENTgacI1oaWFNg\",\n \"type\":
|
||||
\"function\",\n \"function\": {\n \"name\": \"ScoreOutput\",\n
|
||||
\ \"arguments\": \"{\\\"score\\\":4}\"\n }\n }\n
|
||||
\ ],\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
100,\n \"completion_tokens\": 5,\n \"total_tokens\": 105\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5d50da0301ad-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:34 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=HvJmZMMILh3L8ER1.CKQZK_SCiH.I_p.f.0Apd9J48w-1726128034-1.0.1.1-CCUvpxYqRyncCGONMzj0JABjEIfF9ZCXPucIlUYcFx5nhgjbtgEDHW0gkIaswYymxaf47tij7g4Y3etwuMaWWQ;
|
||||
path=/; expires=Thu, 12-Sep-24 08:30:34 GMT; domain=.api.openai.com; HttpOnly;
|
||||
Secure; SameSite=None
|
||||
- _cfuvid=DJdNqfKDS.BcnhYjawtnaAt.yKPbCuXfgDNkS.B3BdI-1726128034247-0.0.1.1-604800000;
|
||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '160'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999947'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_306aa86f9d0663d6a2f38fa479b42fa0
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Given the score the title
|
||||
''The impact of AI in the future of work'' got, give me an integer score between
|
||||
1-5 for the following title: ''Return of the Jedi''\n\nThis is the expect criteria
|
||||
for your final answer: The score of the title. \n you MUST return the actual
|
||||
complete content as the final answer, not a summary.\n\nThis is the context
|
||||
you''re working with:\n4\n\nBegin! This is VERY important to you, use the tools
|
||||
available and give your best Final Answer, your job depends on it!\n\nThought:"}],
|
||||
"model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '1008'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2giNphqJXaySSn6gRhIwpGncyK\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128034,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
205,\n \"completion_tokens\": 15,\n \"total_tokens\": 220\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5d577fd91af2-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:35 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '234'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999757'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_edc84a9a3462d816ad85c31928040590
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "4"}, {"role": "system", "content":
|
||||
"I''m gonna convert this raw text into valid JSON.\n\nThe json should have the
|
||||
following structure, with the following keys:\n{\n score: int\n}"}], "model":
|
||||
"gpt-4o", "tool_choice": {"type": "function", "function": {"name": "ScoreOutput"}},
|
||||
"tools": [{"type": "function", "function": {"name": "ScoreOutput", "description":
|
||||
"Correctly extracted `ScoreOutput` with all the required parameters with correct
|
||||
types", "parameters": {"properties": {"score": {"title": "Score", "type": "integer"}},
|
||||
"required": ["score"], "type": "object"}}}]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '615'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=DJdNqfKDS.BcnhYjawtnaAt.yKPbCuXfgDNkS.B3BdI-1726128034247-0.0.1.1-604800000;
|
||||
__cf_bm=HvJmZMMILh3L8ER1.CKQZK_SCiH.I_p.f.0Apd9J48w-1726128034-1.0.1.1-CCUvpxYqRyncCGONMzj0JABjEIfF9ZCXPucIlUYcFx5nhgjbtgEDHW0gkIaswYymxaf47tij7g4Y3etwuMaWWQ
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2hOd373qgnC93kzewjR8fKrTW0\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128035,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n
|
||||
\ \"id\": \"call_4i2tHv0f0hgbuKZGsLeyhDCj\",\n \"type\":
|
||||
\"function\",\n \"function\": {\n \"name\": \"ScoreOutput\",\n
|
||||
\ \"arguments\": \"{\\\"score\\\":4}\"\n }\n }\n
|
||||
\ ],\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
100,\n \"completion_tokens\": 5,\n \"total_tokens\": 105\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5d5c4dd801ad-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:35 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '202'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999947'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_273ef8f01c69557565317a041b446de9
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
210
tests/cassettes/test_save_task_json_output.yaml
Normal file
210
tests/cassettes/test_save_task_json_output.yaml
Normal file
@@ -0,0 +1,210 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Give me an integer score
|
||||
between 1-5 for the following title: ''The impact of AI in the future of work''\n\nThis
|
||||
is the expect criteria for your final answer: The score of the title. \n you
|
||||
MUST return the actual complete content as the final answer, not a summary.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '909'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2tsOmxegTTpYlo196QAIvorcKp\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128047,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
182,\n \"completion_tokens\": 15,\n \"total_tokens\": 197\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5da67ef86280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:47 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '316'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999781'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_bead24fae4a8e2bf9439756b0e6a03cc
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "4"}, {"role": "system", "content":
|
||||
"I''m gonna convert this raw text into valid JSON.\n\nThe json should have the
|
||||
following structure, with the following keys:\n{\n score: int\n}"}], "model":
|
||||
"gpt-4o", "tool_choice": {"type": "function", "function": {"name": "ScoreOutput"}},
|
||||
"tools": [{"type": "function", "function": {"name": "ScoreOutput", "description":
|
||||
"Correctly extracted `ScoreOutput` with all the required parameters with correct
|
||||
types", "parameters": {"properties": {"score": {"title": "Score", "type": "integer"}},
|
||||
"required": ["score"], "type": "object"}}}]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '615'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=DJdNqfKDS.BcnhYjawtnaAt.yKPbCuXfgDNkS.B3BdI-1726128034247-0.0.1.1-604800000;
|
||||
__cf_bm=HvJmZMMILh3L8ER1.CKQZK_SCiH.I_p.f.0Apd9J48w-1726128034-1.0.1.1-CCUvpxYqRyncCGONMzj0JABjEIfF9ZCXPucIlUYcFx5nhgjbtgEDHW0gkIaswYymxaf47tij7g4Y3etwuMaWWQ
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2u1dV64KHe8QVBv3oD89yp9tJW\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128048,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n
|
||||
\ \"id\": \"call_EBHpz2Bkwsu2Ie4109O51Eoo\",\n \"type\":
|
||||
\"function\",\n \"function\": {\n \"name\": \"ScoreOutput\",\n
|
||||
\ \"arguments\": \"{\\\"score\\\":4}\"\n }\n }\n
|
||||
\ ],\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
100,\n \"completion_tokens\": 5,\n \"total_tokens\": 105\n },\n \"system_fingerprint\":
|
||||
\"fp_992d1ea92d\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5dad9d540301-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:48 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '196'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999947'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_4e19d159a63421b2d0b0a7a7c11489af
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
106
tests/cassettes/test_save_task_output.yaml
Normal file
106
tests/cassettes/test_save_task_output.yaml
Normal file
@@ -0,0 +1,106 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Give me an integer score
|
||||
between 1-5 for the following title: ''The impact of AI in the future of work''\n\nThis
|
||||
is the expect criteria for your final answer: The score of the title. \n you
|
||||
MUST return the actual complete content as the final answer, not a summary.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '909'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2sZAC3NtbvLSyhTumukly2REto\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128046,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
182,\n \"completion_tokens\": 15,\n \"total_tokens\": 197\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5da15d5a6280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:46 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '364'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999781'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_1e108a5a00881be38068f863f86e2afe
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
210
tests/cassettes/test_save_task_pydantic_output.yaml
Normal file
210
tests/cassettes/test_save_task_pydantic_output.yaml
Normal file
@@ -0,0 +1,210 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are Scorer. You''re an expert
|
||||
scorer, specialized in scoring titles.\nYour personal goal is: Score the title\nTo
|
||||
give my best complete final answer to the task use the exact following format:\n\nThought:
|
||||
I now can give a great answer\nFinal Answer: Your final answer must be the great
|
||||
and the most complete as possible, it must be outcome described.\n\nI MUST use
|
||||
these formats, my job depends on it!\nCurrent Task: Give me an integer score
|
||||
between 1-5 for the following title: ''The impact of AI in the future of work''\n\nThis
|
||||
is the expect criteria for your final answer: The score of the title. \n you
|
||||
MUST return the actual complete content as the final answer, not a summary.\n\nBegin!
|
||||
This is VERY important to you, use the tools available and give your best Final
|
||||
Answer, your job depends on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nObservation"]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '909'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=wl8o2jxCEnNABWV8zufHzNbIUfqCUxybX7Vi.1Ga1Zw-1726128032785-0.0.1.1-604800000;
|
||||
__cf_bm=P6UUFPZt3p6lqd7cohlJaH8_cHJme92vyvYAbmz9NJM-1726128032-1.0.1.1-SpOib44J8vNLUjryxJjCeKWYWh49FWI5zpJ4UI1znYGWjRzK.vHdTx9WD07B3165P6KCStQUSxIsZNjVxE16Cg
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2v3sFvrWI04jIQPBku2UsieKJH\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128049,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
|
||||
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
182,\n \"completion_tokens\": 15,\n \"total_tokens\": 197\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5db2ab346280-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:49 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '473'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999781'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_c8ebab919704c382e98ebaa37d38acbf
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "4"}, {"role": "system", "content":
|
||||
"I''m gonna convert this raw text into valid JSON.\n\nThe json should have the
|
||||
following structure, with the following keys:\n{\n score: int\n}"}], "model":
|
||||
"gpt-4o", "tool_choice": {"type": "function", "function": {"name": "ScoreOutput"}},
|
||||
"tools": [{"type": "function", "function": {"name": "ScoreOutput", "description":
|
||||
"Correctly extracted `ScoreOutput` with all the required parameters with correct
|
||||
types", "parameters": {"properties": {"score": {"title": "Score", "type": "integer"}},
|
||||
"required": ["score"], "type": "object"}}}]}'
|
||||
headers:
|
||||
accept:
|
||||
- application/json
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '615'
|
||||
content-type:
|
||||
- application/json
|
||||
cookie:
|
||||
- _cfuvid=DJdNqfKDS.BcnhYjawtnaAt.yKPbCuXfgDNkS.B3BdI-1726128034247-0.0.1.1-604800000;
|
||||
__cf_bm=HvJmZMMILh3L8ER1.CKQZK_SCiH.I_p.f.0Apd9J48w-1726128034-1.0.1.1-CCUvpxYqRyncCGONMzj0JABjEIfF9ZCXPucIlUYcFx5nhgjbtgEDHW0gkIaswYymxaf47tij7g4Y3etwuMaWWQ
|
||||
host:
|
||||
- api.openai.com
|
||||
user-agent:
|
||||
- OpenAI/Python 1.44.0
|
||||
x-stainless-arch:
|
||||
- arm64
|
||||
x-stainless-async:
|
||||
- 'false'
|
||||
x-stainless-lang:
|
||||
- python
|
||||
x-stainless-os:
|
||||
- MacOS
|
||||
x-stainless-package-version:
|
||||
- 1.44.0
|
||||
x-stainless-raw-response:
|
||||
- 'true'
|
||||
x-stainless-runtime:
|
||||
- CPython
|
||||
x-stainless-runtime-version:
|
||||
- 3.11.7
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
content: "{\n \"id\": \"chatcmpl-A6Z2wEFmgPol9lGW6nBEHYxyiVSBh\",\n \"object\":
|
||||
\"chat.completion\",\n \"created\": 1726128050,\n \"model\": \"gpt-4o-2024-05-13\",\n
|
||||
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
||||
\"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n
|
||||
\ \"id\": \"call_gdR0ZHNDoNnUor7loDVKvVq4\",\n \"type\":
|
||||
\"function\",\n \"function\": {\n \"name\": \"ScoreOutput\",\n
|
||||
\ \"arguments\": \"{\\\"score\\\":4}\"\n }\n }\n
|
||||
\ ],\n \"refusal\": null\n },\n \"logprobs\": null,\n
|
||||
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
||||
100,\n \"completion_tokens\": 5,\n \"total_tokens\": 105\n },\n \"system_fingerprint\":
|
||||
\"fp_25624ae3a5\"\n}\n"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 8c1e5db8596d0301-GRU
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Sep 2024 08:00:50 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
access-control-expose-headers:
|
||||
- X-Request-ID
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-organization:
|
||||
- crewai-iuxna1
|
||||
openai-processing-ms:
|
||||
- '244'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15552000; includeSubDomains; preload
|
||||
x-ratelimit-limit-requests:
|
||||
- '10000'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '30000000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '9999'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '29999947'
|
||||
x-ratelimit-reset-requests:
|
||||
- 6ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 0s
|
||||
x-request-id:
|
||||
- req_74a3f638e7ee61db84371dec8a32f4d5
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
version: 1
|
||||
@@ -19,7 +19,7 @@ from crewai.tasks.conditional_task import ConditionalTask
|
||||
from crewai.tasks.output_format import OutputFormat
|
||||
from crewai.tasks.task_output import TaskOutput
|
||||
from crewai.types.usage_metrics import UsageMetrics
|
||||
from crewai.utilities import Logger, RPMController
|
||||
from crewai.utilities import Logger
|
||||
from crewai.utilities.task_output_storage_handler import TaskOutputStorageHandler
|
||||
|
||||
ceo = Agent(
|
||||
@@ -225,7 +225,7 @@ def test_crew_creation():
|
||||
|
||||
result = crew.kickoff()
|
||||
|
||||
expected_string_output = "**1. The Evolution of Autonomous AI Agents: From Simplicity to Sophistication**\n\nThe journey of autonomous AI agents spans decades, beginning with rule-based systems that followed strict, predefined instructions to accomplish tasks. Over time, these rudimentary agents have evolved into sophisticated models driven by advanced neural networks, capable of learning and making decisions independently. Significant milestones, such as the advent of machine learning, deep learning, and reinforcement learning, have propelled this evolution, enabling AI agents to transition from simple automation tools to intelligent entities performing complex functions in industries like finance, healthcare, and entertainment. As we look to the future, the potential capabilities of autonomous AI agents appear boundless, with innovations poised to usher in an era of unprecedented computational intelligence and autonomous decision-making.\n\n**2. Ethical Dimensions and Challenges of AI Agents**\n\nThe deployment of AI agents in various aspects of life presents profound ethical considerations that cannot be overlooked. Ethical challenges such as bias, transparency, and accountability have emerged, eliciting vigorous debates and necessitating thoughtful scrutiny. Case studies across different sectors reveal that AI agents can sometimes reinforce existing prejudices or make opaque decisions that are difficult to explain. To navigate these dilemmas, it's crucial to establish robust frameworks and guidelines that promote ethical AI development and application. Proposals include bias mitigation strategies, enforceable transparency standards, and accountability mechanisms to ensure AI agents act in ways that are fair, understandable, and responsible.\n\n**3. AI Agents in Healthcare: Revolutionizing Diagnosis and Treatment**\n\nThe integration of AI agents into healthcare is revolutionizing how diagnoses and treatments are handled, leading to enhanced patient outcomes and more efficient medical processes. AI agents are being harnessed to analyze vast datasets, identify patterns, and predict medical conditions with remarkable accuracy. Examples include AI-driven diagnostic tools that outperform traditional methods and virtual assistants that facilitate personalized patient care. However, integrating AI more deeply into healthcare presents unique challenges, including data privacy concerns and the need for rigorous validation of AI systems. Despite these hurdles, the opportunities for AI agents in medical research and patient care are boundless, promising a future where healthcare is both more effective and more accessible.\n\n**4. The Role of AI Agents in Personalized Consumer Experiences**\n\nAI agents are at the forefront of transforming personalized marketing and customer service, crafting unique consumer experiences across various industries. In e-commerce, AI algorithms analyze shopping behavior to recommend products tailored to individual preferences, while in entertainment, AI curates content that aligns with user tastes. The versatility of AI agents extends to customer service as well, where they handle inquiries and resolve issues with a level of efficiency and personalization that human agents struggle to match. The reception to AI-powered personalized interactions has been largely positive, reflecting an increasing consumer demand for bespoke services. As AI technology continues to advance, the scope and effectiveness of these personalized experiences are set to expand, offering a glimpse into a future where consumer engagement is more intuitive and engaging than ever before."
|
||||
expected_string_output = "**The Emergence of Ethical AI: Balancing Innovation with Responsibility**\n\nThe growing deployment of artificial intelligence (AI) in various sectors has highlighted the critical need for ethical AI. As organizations leverage AI to enhance efficiency, the potential for misuse and unintentional bias has surged. This segment delves into the importance of developing transparent, fair, and accountable AI systems. It underscores the responsibility of tech companies and developers to balance innovation with ethical standards, ensuring that AI advancements benefit society without compromising moral principles. By incorporating ethical guidelines and audits into AI development, stakeholders can mitigate risks and promote trust in AI technologies.\n\n**AI in Healthcare: Revolutionizing Diagnosis and Treatment**\n\nArtificial intelligence is transforming the healthcare sector with unprecedented precision and efficiency. By enhancing diagnostic accuracy, personalizing treatment plans, and streamlining administrative processes, AI is revolutionizing how healthcare providers deliver care. This section of the article explores real-world examples and case studies that demonstrate the life-saving potential and cost-reduction benefits of AI-driven healthcare solutions. It highlights how machine learning algorithms can analyze vast amounts of medical data to detect diseases earlier and predict patient outcomes more accurately, ultimately leading to better patient care and resource management.\n\n**AI-Powered Personal Assistants: The Future of Human-Technology Interaction**\n\nThe evolution of AI-powered personal assistants, such as Siri, Alexa, and Google Assistant, is significantly changing the dynamics of human-technology interaction. These assistants have progressed from simple voice command tools to sophisticated systems that can manage tasks, provide personalized recommendations, and even handle complex queries. This paragraph focuses on the expanding capabilities of AI personal assistants and their growing impact on daily life and work productivity. As they become more intuitive and integrated into various devices and platforms, these AI assistants are poised to become indispensable partners in our digital lives, transforming how we access and use technology.\n\n**AI in Content Creation: From Art to News**\n\nArtificial intelligence is making waves in the realm of content creation, generating art, writing, and news with increasing sophistication. This topic investigates how AI is challenging traditional notions of creativity and originality, raising questions about the role of human artists and journalists. By analyzing the implications for content creators and consumers, this section illuminates the possibilities and limitations of AI-generated content. It discusses how AI can democratize media production, making it accessible to a broader audience, while also considering the ethical and philosophical debates surrounding the authenticity of AI-driven creativity."
|
||||
|
||||
assert str(result) == expected_string_output
|
||||
assert result.raw == expected_string_output
|
||||
@@ -277,8 +277,6 @@ def test_sync_task_execution():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_hierarchical_process():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Come up with a list of 5 interesting ideas to explore for an article, then write one amazing paragraph highlight for each idea that showcases how good an article about this topic could be. Return the list of ideas with their paragraph and your notes.",
|
||||
expected_output="5 bullet points with a paragraph for each idea.",
|
||||
@@ -287,7 +285,7 @@ def test_hierarchical_process():
|
||||
crew = Crew(
|
||||
agents=[researcher, writer],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(temperature=0, model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
tasks=[task],
|
||||
)
|
||||
|
||||
@@ -295,7 +293,7 @@ def test_hierarchical_process():
|
||||
|
||||
assert (
|
||||
result.raw
|
||||
== "1. **Unlocking the Potential of AI in Healthcare: Revolutionizing Diagnosis and Treatment**\n AI is rapidly transforming healthcare by providing innovative solutions for diagnosis and treatment. From predicting patient outcomes to personalizing treatment plans, AI-powered systems are becoming indispensable tools for medical professionals. Machine learning algorithms can analyze vast amounts of medical data with unparalleled speed and accuracy, allowing for earlier detection of diseases like cancer and more effective treatment options. Additionally, AI-driven diagnostic tools can help narrow down symptoms and suggest possible conditions, facilitating a quicker and more accurate diagnosis. As AI technology continues to evolve, it holds the promise of not only improving patient care but also making healthcare more efficient and accessible for everyone.\n\n2. **The Ethical Implications of AI: Balancing Innovation and Responsibility**\n The rapid advancement of AI presents a host of ethical challenges that must be addressed to balance innovation with societal responsibility. Issues such as bias in AI algorithms, privacy concerns, and the potential for job displacement are critical topics that require careful consideration. Ensuring that AI systems are transparent and fair is essential to maintaining public trust. Moreover, establishing robust ethical guidelines and regulatory frameworks can help mitigate risks and promote the responsible use of AI. As we continue to explore the potential of AI, it is imperative to engage in a broader conversation about its ethical implications to ensure that the technology benefits all of humanity.\n\n3. **AI Agents in Everyday Life: Enhancing Productivity and Convenience**\n AI agents are seamlessly integrating into our daily lives, enhancing productivity and convenience in unprecedented ways. Virtual assistants like Siri, Alexa, and Google Assistant help us manage our schedules, control smart home devices, and even make shopping easier with voice commands. Meanwhile, AI-driven applications can streamline tasks such as email sorting, data analysis, and project management, allowing us to focus on more critical and creative aspects of our work. In the near future, AI agents are expected to become even more intuitive and capable, further revolutionizing how we perform routine tasks and manage our daily lives. The ongoing advancements in AI are poised to make our lives more efficient, productive, and enjoyable.\n\n4. **The Future of Work with AI: Preparing for the Workforce of Tomorrow**\n AI is set to redefine the future of work, making it essential for individuals and organizations to prepare for the changes ahead. Automation and AI-driven technologies are transforming industries, from manufacturing to finance, by increasing efficiency and reducing the need for manual labor. Workers will need to adapt by acquiring new skills and embracing lifelong learning to stay relevant in an AI-driven economy. Companies will also have to rethink their business models and workforce strategies to leverage AI effectively. By fostering a culture of continuous improvement and innovation, we can ensure that AI augments human capabilities rather than replacing them, paving the way for a more dynamic and prosperous workforce of tomorrow.\n\n5. **AI in Environmental Sustainability: Tackling Climate Change with Intelligent Solutions**\n AI is emerging as a powerful tool in the fight against climate change, offering intelligent solutions for environmental sustainability. Machine learning algorithms can analyze complex datasets to predict climate patterns and monitor environmental changes in real-time. AI-driven models can optimize energy consumption in smart grids, reduce waste through improved recycling processes, and enhance the efficiency of renewable energy sources like solar and wind. Additionally, AI can support conservation efforts by tracking endangered species and managing natural resources more effectively. As we grapple with the challenges of climate change, AI stands out as a promising ally that can help us develop innovative strategies for a more sustainable future."
|
||||
== "1. **The Future of AI in Healthcare: Transformations and Innovations**\n - In the evolving landscape of healthcare, AI is poised to revolutionize patient care, diagnostics, and medical research. Imagine a world where AI-driven diagnostics can predict diseases before they manifest symptoms, personalized treatment plans are crafted using machine learning algorithms, and robotic surgeons operate with unparalleled precision. The infusion of AI into healthcare is not merely futuristic; it's happening now, with innovations such as predictive analytics in patient care, AI-powered telemedicine, and smart wearable devices tracking and analyzing health metrics in real-time. This article will delve into the groundbreaking advancements and forecast how AI will continue to transform the healthcare industry, improving outcomes and accessibility while addressing ethical and practical challenges.\n\n2. **AI Ethics and Bias: Navigating the Moral Landscape**\n - As AI systems become more integrated into society, the ethical implications of their deployment must be rigorously examined. AI's potential to replicate and even amplify human biases poses a significant challenge, necessitating robust frameworks for fairness, accountability, and transparency. This article will explore the pressing ethical dilemmas, from biased algorithms affecting hiring practices to facial recognition technologies intruding on privacy rights. It will highlight ongoing efforts to create ethical guidelines and equitable AI systems, the role of diverse datasets in mitigating bias, and the importance of interdisciplinary collaboration between technologists, ethicists, and policymakers in shaping an ethical AI future.\n\n3. **Autonomous Agents: From Virtual Assistants to Adaptive Learning Bots**\n - Autonomous agents are transforming how we interact with technology, moving beyond simple task automation to become sophisticated, adaptive entities capable of learning and evolving. This article will journey through the evolution of autonomous agents, showcasing virtual assistants like Siri and Alexa, and advancing to adaptive learning bots used in education and customer service. We'll examine their underlying technologies, such as natural language processing and reinforcement learning, and discuss real-world applications that demonstrate their potential to enhance productivity, learning experiences, and personalized user interactions. The promise of autonomous agents lies in their ability to continually adapt and improve, offering increasingly valuable assistance in our daily lives and work.\n\n4. **AI and the Future of Work: Opportunities and Challenges**\n - The integration of AI into the workplace promises a future teeming with opportunities and challenges. While AI can augment human capabilities, streamline operations, and drive innovation, it also raises concerns about job displacement and workforce adaptation. This article will present a balanced view of the AI-driven future of work, examining sectors likely to experience the most significant transformations and highlighting stories of AI complementing human skills. We'll also address the need for upskilling and reskilling initiatives to prepare the workforce for an AI-enhanced job market, illustrating how businesses can leverage AI to foster a collaborative human-machine environment that maximizes efficiency and creativity.\n\n5. **AI-Driven Startups: Innovators Pushing the Boundaries of Technology**\n - AI-driven startups are at the forefront of technological innovation, disrupting traditional industries and creating unprecedented solutions to complex problems. This article will spotlight some of the most dynamic AI startups, exploring their groundbreaking projects and the unique challenges they face. From AI in local agriculture optimizing crop yields to fintech startups using machine learning to revolutionize fraud detection, these companies are not just pushing the boundaries of what's possible but are also redefining how businesses operate. By decoding their success stories and the innovative minds behind them, we provide a glimpse into the future shaped by these AI pioneers and the limitless possibilities they unveil."
|
||||
)
|
||||
|
||||
|
||||
@@ -318,8 +316,6 @@ def test_manager_agent_delegating_to_assigned_task_agent():
|
||||
"""
|
||||
Test that the manager agent delegates to the assigned task agent.
|
||||
"""
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Come up with a list of 5 interesting ideas to explore for an article, then write one amazing paragraph highlight for each idea that showcases how good an article about this topic could be. Return the list of ideas with their paragraph and your notes.",
|
||||
expected_output="5 bullet points with a paragraph for each idea.",
|
||||
@@ -329,7 +325,7 @@ def test_manager_agent_delegating_to_assigned_task_agent():
|
||||
crew = Crew(
|
||||
agents=[researcher, writer],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(temperature=0, model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
tasks=[task],
|
||||
)
|
||||
|
||||
@@ -355,8 +351,6 @@ def test_manager_agent_delegating_to_all_agents():
|
||||
"""
|
||||
Test that the manager agent delegates to all agents when none are specified.
|
||||
"""
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Come up with a list of 5 interesting ideas to explore for an article, then write one amazing paragraph highlight for each idea that showcases how good an article about this topic could be. Return the list of ideas with their paragraph and your notes.",
|
||||
expected_output="5 bullet points with a paragraph for each idea.",
|
||||
@@ -365,7 +359,7 @@ def test_manager_agent_delegating_to_all_agents():
|
||||
crew = Crew(
|
||||
agents=[researcher, writer],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(temperature=0, model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
tasks=[task],
|
||||
)
|
||||
|
||||
@@ -375,10 +369,6 @@ def test_manager_agent_delegating_to_all_agents():
|
||||
assert crew.manager_agent.tools is not None
|
||||
|
||||
assert len(crew.manager_agent.tools) == 2
|
||||
print(
|
||||
"crew.manager_agent.tools[0].description",
|
||||
crew.manager_agent.tools[0].description,
|
||||
)
|
||||
assert (
|
||||
"Delegate a specific task to one of the following coworkers: Researcher, Senior Writer\n"
|
||||
in crew.manager_agent.tools[0].description
|
||||
@@ -409,7 +399,7 @@ def test_crew_with_delegating_agents():
|
||||
|
||||
assert (
|
||||
result.raw
|
||||
== "In the rapidly evolving landscape of artificial intelligence, AI Agents stand out as transformative tools capable of revolutionizing various sectors. These autonomous entities, equipped with sophisticated algorithms and machine learning capabilities, can perform complex tasks that range from customer service in the retail industry to predictive maintenance in manufacturing. For instance, AI Agents in healthcare can analyze vast datasets to identify potential health issues before they become critical, thereby saving lives and reducing costs. Their ability to process information and learn from interactions enables them to adapt and optimize their performance over time.\n\nAI Agents have many applications across diverse fields. In the financial industry, they facilitate fraud detection by analyzing transaction patterns and flagging abnormalities. In customer service, they improve user experience through chatbots that can respond to inquiries with human-like interactions, reducing wait times and increasing satisfaction. In manufacturing, predictive maintenance powered by AI Agents helps forecast equipment failures before they occur, thereby improving operational efficiency and reducing downtime. The educational sector also benefits from AI Agents through personalized learning experiences and administrative task automation.\n\nDespite their significant benefits, AI Agents are not without challenges. Data privacy remains a prominent concern as these systems often need access to large volumes of personal information to function effectively. Additionally, there is the issue of bias in AI algorithms, which can lead to unfair outcomes if not properly addressed. The need for continuous monitoring and updating of AI systems to ensure they operate correctly and ethically further complicates their implementation. Moreover, the potential for job displacement due to automation raises social and economic considerations that must be managed carefully.\n\nLooking to the future, the role of AI Agents is poised to expand even further. Advances in machine learning, natural language processing, and other AI technologies will continue to enhance their capabilities. We can expect to see AI Agents playing even more integral roles in smart cities, autonomous vehicles, and complex problem-solving across sciences. The key to unlocking the full potential of AI Agents lies in addressing existing challenges and fostering an environment of collaboration between human intelligence and artificial systems. By doing so, we pave the way for a future where AI Agents not only drive efficiency and productivity but also contribute to a higher quality of life."
|
||||
== "**The Transformative Power of AI Agents Across Industries**\n\nAI Agents are revolutionizing the landscape of multiple industries by bringing unprecedented advancements in automation, decision-making, and operational efficiency. These sophisticated algorithms, capable of learning from vast datasets, are optimizing supply chains, enhancing customer service through intelligent chatbots, and even enabling precision medicine by analyzing complex medical data. Their ability to process and analyze information at hyper-human speeds allows businesses to make more informed, data-driven decisions, ultimately leading to increased productivity and innovative solutions. As AI Agents continue to evolve, they promise not only to transform existing processes but also to create entirely new paradigms in how industries operate, making them indispensable tools in the digital age.\n\nIn the healthcare industry, AI Agents are revolutionizing the diagnosis and treatment of diseases. IBM Watson for Oncology, for instance, assists oncologists in making informed treatment decisions by analyzing medical literature, patient records, and clinical trials. This enables doctors to offer more precise and personalized treatment plans for cancer patients, significantly enhancing patient outcomes. Additionally, AI-powered diagnostic tools like Google DeepMind's AI system are capable of detecting eye diseases from retinal scans with unprecedented accuracy, allowing for earlier and potentially life-saving interventions.\n\nThe financial sector is experiencing a redefinition through AI Agents as well, particularly in advanced fraud detection and personalized financial services. JPMorgan Chase's AI program, COiN, efficiently reviews legal documents and extracts critical data at rates far surpassing that of human capabilities, reducing error rates and operational costs. Furthermore, robo-advisors like Betterment and Wealthfront provide personalized investment advice, managing individual portfolios via sophisticated algorithms that analyze market trends, risk tolerance, and financial goals, thereby democratizing access to high-quality financial advice.\n\nSimilarly, the retail and logistics industries are significantly benefiting from AI implementations. E-commerce giants like Amazon use AI-driven recommendation engines to personalize shopping experiences, while AI-powered chatbots in customer service handle inquiries with efficient, consistent, and instantaneous responses. In logistics, companies like DHL and FedEx use AI for route optimization, predictive maintenance, and demand forecasting, resulting in faster delivery times and reduced fuel consumption. These varied applications highlight the transformative power of AI Agents in enhancing productivity, accuracy, and innovation across industries.\n\nThrough these multifaceted applications, it becomes clear that AI Agents are not only improving operational efficiency and service delivery but also driving significant innovation and fostering new standards of excellence across industries. Their integration and evolution represent a transformative movement, poised to redefine the future landscape of numerous sectors."
|
||||
)
|
||||
|
||||
|
||||
@@ -503,12 +493,10 @@ def test_cache_hitting_between_agents():
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_api_calls_throttling(capsys):
|
||||
from unittest.mock import patch
|
||||
|
||||
from crewai_tools import tool
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
@tool
|
||||
def get_final_answer(anything) -> float:
|
||||
def get_final_answer() -> float:
|
||||
"""Get the final answer but don't give it yet, just re-use this
|
||||
tool non-stop."""
|
||||
return 42
|
||||
@@ -520,7 +508,7 @@ def test_api_calls_throttling(capsys):
|
||||
max_iter=5,
|
||||
allow_delegation=False,
|
||||
verbose=True,
|
||||
llm=ChatOpenAI(model="gpt-4-0125-preview"),
|
||||
llm="gpt-4-0125-preview",
|
||||
)
|
||||
|
||||
task = Task(
|
||||
@@ -532,12 +520,12 @@ def test_api_calls_throttling(capsys):
|
||||
|
||||
crew = Crew(agents=[agent], tasks=[task], max_rpm=2, verbose=True)
|
||||
|
||||
with patch.object(RPMController, "_wait_for_next_minute") as moveon:
|
||||
moveon.return_value = True
|
||||
with patch("time.sleep") as mock_sleep:
|
||||
mock_sleep.return_value = None
|
||||
crew.kickoff()
|
||||
captured = capsys.readouterr()
|
||||
assert "Max RPM reached, waiting for next minute to start." in captured.out
|
||||
moveon.assert_called()
|
||||
mock_sleep.assert_called_with(60) # Assert that sleep was called with 1 second
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -620,7 +608,7 @@ def test_sequential_async_task_execution_completion():
|
||||
|
||||
sequential_result = sequential_crew.kickoff()
|
||||
assert sequential_result.raw.startswith(
|
||||
"The history of Artificial Intelligence (AI) is dotted with monumental events that have significantly shaped the trajectory of technological advancement."
|
||||
"Artificial Intelligence (AI) has journeyed through pivotal milestones that have transformed the technology landscape as we know it."
|
||||
)
|
||||
|
||||
|
||||
@@ -648,7 +636,7 @@ def test_single_task_with_async_execution():
|
||||
|
||||
result = crew.kickoff()
|
||||
assert result.raw.startswith(
|
||||
"- Future of AI in Healthcare and Personalized Treatment."
|
||||
"- AI agents in personalized healthcare diagnoses and treatment"
|
||||
)
|
||||
|
||||
|
||||
@@ -1114,13 +1102,12 @@ def test_dont_set_agents_step_callback_if_already_set():
|
||||
def test_crew_function_calling_llm():
|
||||
from unittest.mock import patch
|
||||
from crewai_tools import tool
|
||||
from langchain_openai import ChatOpenAI
|
||||
from crewai.utilities import Instructor
|
||||
|
||||
llm = ChatOpenAI(model="gpt-3.5-turbo-0125")
|
||||
llm = "gpt-3.5-turbo-0125"
|
||||
|
||||
@tool
|
||||
def learn_about_AI(topic) -> str:
|
||||
def learn_about_AI() -> str:
|
||||
"""Useful for when you need to learn about AI to write an paragraph about it."""
|
||||
return "AI is a very broad field."
|
||||
|
||||
@@ -1129,7 +1116,7 @@ def test_crew_function_calling_llm():
|
||||
goal="test goal",
|
||||
backstory="test backstory",
|
||||
tools=[learn_about_AI],
|
||||
llm=ChatOpenAI(model="gpt-4-0125-preview"),
|
||||
llm="gpt-4o-mini",
|
||||
function_calling_llm=llm,
|
||||
)
|
||||
|
||||
@@ -1286,9 +1273,9 @@ def test_agent_usage_metrics_are_captured_for_hierarchical_process():
|
||||
assert result.raw == "Howdy!"
|
||||
|
||||
assert result.token_usage == UsageMetrics(
|
||||
total_tokens=2706,
|
||||
prompt_tokens=2548,
|
||||
completion_tokens=158,
|
||||
total_tokens=2565,
|
||||
prompt_tokens=2424,
|
||||
completion_tokens=141,
|
||||
successful_requests=5,
|
||||
)
|
||||
|
||||
@@ -1299,8 +1286,6 @@ def test_hierarchical_crew_creation_tasks_with_agents():
|
||||
Agents are not required for tasks in a hierarchical process but sometimes they are still added
|
||||
This test makes sure that the manager still delegates the task to the agent even if the agent is passed in the task
|
||||
"""
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Write one amazing paragraph about AI.",
|
||||
expected_output="A single paragraph with 4 sentences.",
|
||||
@@ -1311,13 +1296,12 @@ def test_hierarchical_crew_creation_tasks_with_agents():
|
||||
tasks=[task],
|
||||
agents=[writer, researcher],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
)
|
||||
crew.kickoff()
|
||||
|
||||
assert crew.manager_agent is not None
|
||||
assert crew.manager_agent.tools is not None
|
||||
print("TOOL DESCRIPTION", crew.manager_agent.tools[0].description)
|
||||
assert crew.manager_agent.tools[0].description.startswith(
|
||||
"Delegate a specific task to one of the following coworkers: Senior Writer"
|
||||
)
|
||||
@@ -1329,8 +1313,6 @@ def test_hierarchical_crew_creation_tasks_with_async_execution():
|
||||
Agents are not required for tasks in a hierarchical process but sometimes they are still added
|
||||
This test makes sure that the manager still delegates the task to the agent even if the agent is passed in the task
|
||||
"""
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Write one amazing paragraph about AI.",
|
||||
expected_output="A single paragraph with 4 sentences.",
|
||||
@@ -1342,7 +1324,7 @@ def test_hierarchical_crew_creation_tasks_with_async_execution():
|
||||
tasks=[task],
|
||||
agents=[writer, researcher, ceo],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
@@ -1359,8 +1341,6 @@ def test_hierarchical_crew_creation_tasks_with_sync_last():
|
||||
Agents are not required for tasks in a hierarchical process but sometimes they are still added
|
||||
This test makes sure that the manager still delegates the task to the agent even if the agent is passed in the task
|
||||
"""
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Write one amazing paragraph about AI.",
|
||||
expected_output="A single paragraph with 4 sentences.",
|
||||
@@ -1377,7 +1357,7 @@ def test_hierarchical_crew_creation_tasks_with_sync_last():
|
||||
tasks=[task, task2],
|
||||
agents=[writer, researcher, ceo],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
)
|
||||
|
||||
crew.kickoff()
|
||||
@@ -2394,7 +2374,7 @@ def test_conditional_task_last_task_when_conditional_is_true():
|
||||
)
|
||||
result = crew.kickoff()
|
||||
assert result.raw.startswith(
|
||||
"1. **The Rise of Autonomous AI Agents in Daily Life**"
|
||||
"1. **The Future of AI in Healthcare: Revolutionizing Diagnosis and Treatment**"
|
||||
)
|
||||
|
||||
|
||||
@@ -2420,7 +2400,6 @@ def test_conditional_task_last_task_when_conditional_is_false():
|
||||
tasks=[task1, task2],
|
||||
)
|
||||
result = crew.kickoff()
|
||||
print(result.raw)
|
||||
assert result.raw == "Hi"
|
||||
|
||||
|
||||
@@ -2544,8 +2523,6 @@ def test_crew_testing_function(mock_kickoff, crew_evaluator):
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_hierarchical_verbose_manager_agent():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Come up with a list of 5 interesting ideas to explore for an article, then write one amazing paragraph highlight for each idea that showcases how good an article about this topic could be. Return the list of ideas with their paragraph and your notes.",
|
||||
expected_output="5 bullet points with a paragraph for each idea.",
|
||||
@@ -2555,7 +2532,7 @@ def test_hierarchical_verbose_manager_agent():
|
||||
agents=[researcher, writer],
|
||||
tasks=[task],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(temperature=0, model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
verbose=True,
|
||||
)
|
||||
|
||||
@@ -2567,8 +2544,6 @@ def test_hierarchical_verbose_manager_agent():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_hierarchical_verbose_false_manager_agent():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
task = Task(
|
||||
description="Come up with a list of 5 interesting ideas to explore for an article, then write one amazing paragraph highlight for each idea that showcases how good an article about this topic could be. Return the list of ideas with their paragraph and your notes.",
|
||||
expected_output="5 bullet points with a paragraph for each idea.",
|
||||
@@ -2578,7 +2553,7 @@ def test_hierarchical_verbose_false_manager_agent():
|
||||
agents=[researcher, writer],
|
||||
tasks=[task],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(temperature=0, model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
verbose=False,
|
||||
)
|
||||
|
||||
|
||||
@@ -616,7 +616,6 @@ def test_pipeline_invalid_crew(mock_crew_factory):
|
||||
Pipeline(stages=[crew1, not_a_crew])
|
||||
|
||||
error_msg = str(exc_info.value)
|
||||
print(f"Full error message: {error_msg}") # For debugging
|
||||
assert (
|
||||
"Expected Crew instance, Router instance, or list of Crews, got <class 'str'>"
|
||||
in error_msg
|
||||
|
||||
@@ -195,7 +195,9 @@ def test_async_execution():
|
||||
)
|
||||
|
||||
with patch.object(Agent, "execute_task", return_value="ok") as execute:
|
||||
task.execute_async(agent=researcher)
|
||||
execution = task.execute_async(agent=researcher)
|
||||
result = execution.result()
|
||||
assert result.raw == "ok"
|
||||
execute.assert_called_once_with(task=task, context=None, tools=[])
|
||||
|
||||
|
||||
@@ -239,8 +241,6 @@ def test_output_pydantic_sequential():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_output_pydantic_hierarchical():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
class ScoreOutput(BaseModel):
|
||||
score: int
|
||||
|
||||
@@ -262,11 +262,11 @@ def test_output_pydantic_hierarchical():
|
||||
agents=[scorer],
|
||||
tasks=[task],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
)
|
||||
result = crew.kickoff()
|
||||
assert isinstance(result.pydantic, ScoreOutput)
|
||||
assert result.to_dict() == {"score": 5}
|
||||
assert result.to_dict() == {"score": 4}
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -297,8 +297,6 @@ def test_output_json_sequential():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_output_json_hierarchical():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
class ScoreOutput(BaseModel):
|
||||
score: int
|
||||
|
||||
@@ -320,11 +318,11 @@ def test_output_json_hierarchical():
|
||||
agents=[scorer],
|
||||
tasks=[task],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
)
|
||||
result = crew.kickoff()
|
||||
assert '{"score": 5}' == result.json
|
||||
assert result.to_dict() == {"score": 5}
|
||||
assert '{"score": 4}' == result.json
|
||||
assert result.to_dict() == {"score": 4}
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -382,8 +380,6 @@ def test_output_json_dict_sequential():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_output_json_dict_hierarchical():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
class ScoreOutput(BaseModel):
|
||||
score: int
|
||||
|
||||
@@ -405,17 +401,15 @@ def test_output_json_dict_hierarchical():
|
||||
agents=[scorer],
|
||||
tasks=[task],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
)
|
||||
result = crew.kickoff()
|
||||
assert {"score": 4} == result.json_dict
|
||||
assert result.to_dict() == {"score": 4}
|
||||
assert {"score": 5} == result.json_dict
|
||||
assert result.to_dict() == {"score": 5}
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_output_pydantic_to_another_task():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
class ScoreOutput(BaseModel):
|
||||
score: int
|
||||
|
||||
@@ -424,8 +418,8 @@ def test_output_pydantic_to_another_task():
|
||||
goal="Score the title",
|
||||
backstory="You're an expert scorer, specialized in scoring titles.",
|
||||
allow_delegation=False,
|
||||
llm=ChatOpenAI(model="gpt-4-0125-preview"),
|
||||
function_calling_llm=ChatOpenAI(model="gpt-3.5-turbo-0125"),
|
||||
llm="gpt-4-0125-preview",
|
||||
function_calling_llm="gpt-3.5-turbo-0125",
|
||||
verbose=True,
|
||||
)
|
||||
|
||||
@@ -449,7 +443,7 @@ def test_output_pydantic_to_another_task():
|
||||
assert isinstance(
|
||||
pydantic_result, ScoreOutput
|
||||
), "Expected pydantic result to be of type ScoreOutput"
|
||||
assert 5 == pydantic_result.score
|
||||
assert 4 == pydantic_result.score
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -601,8 +595,6 @@ def test_custom_converter_cls():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_increment_delegations_for_hierarchical_process():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
scorer = Agent(
|
||||
role="Scorer",
|
||||
goal="Score the title",
|
||||
@@ -619,7 +611,7 @@ def test_increment_delegations_for_hierarchical_process():
|
||||
agents=[scorer],
|
||||
tasks=[task],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4o"),
|
||||
manager_llm="gpt-4o",
|
||||
)
|
||||
|
||||
with patch.object(Task, "increment_delegations") as increment_delegations:
|
||||
@@ -665,7 +657,6 @@ def test_increment_delegations_for_sequential_process():
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_increment_tool_errors():
|
||||
from crewai_tools import tool
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
@tool
|
||||
def scoring_examples() -> None:
|
||||
@@ -688,13 +679,13 @@ def test_increment_tool_errors():
|
||||
agents=[scorer],
|
||||
tasks=[task],
|
||||
process=Process.hierarchical,
|
||||
manager_llm=ChatOpenAI(model="gpt-4-0125-preview"),
|
||||
manager_llm="gpt-4-0125-preview",
|
||||
)
|
||||
|
||||
with patch.object(Task, "increment_tools_errors") as increment_tools_errors:
|
||||
increment_tools_errors.return_value = None
|
||||
crew.kickoff()
|
||||
assert len(increment_tools_errors.mock_calls) == 3
|
||||
assert len(increment_tools_errors.mock_calls) == 6
|
||||
|
||||
|
||||
def test_task_definition_based_on_dict():
|
||||
|
||||
@@ -213,16 +213,11 @@ def test_get_conversion_instructions_non_gpt():
|
||||
|
||||
# Tests for is_gpt
|
||||
def test_is_gpt_true():
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
mock_llm = Mock(spec=ChatOpenAI)
|
||||
mock_llm.openai_api_base = None
|
||||
assert is_gpt(mock_llm) is True
|
||||
assert is_gpt("gpt-4") is True
|
||||
|
||||
|
||||
def test_is_gpt_false():
|
||||
mock_llm = Mock()
|
||||
assert is_gpt(mock_llm) is False
|
||||
assert is_gpt("lol-4") is False
|
||||
|
||||
|
||||
class CustomConverter(Converter):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
from crewai.agent import Agent
|
||||
from crewai.task import Task
|
||||
@@ -44,7 +43,7 @@ class TestCrewPlanner:
|
||||
agent=Agent(role="Agent 1", goal="Goal 1", backstory="Backstory 1"),
|
||||
)
|
||||
]
|
||||
planning_agent_llm = ChatOpenAI(model="gpt-3.5-turbo")
|
||||
planning_agent_llm = "gpt-3.5-turbo"
|
||||
return CrewPlanner(tasks, planning_agent_llm)
|
||||
|
||||
def test_handle_crew_planning(self, crew_planner):
|
||||
@@ -62,7 +61,7 @@ class TestCrewPlanner:
|
||||
),
|
||||
)
|
||||
result = crew_planner._handle_crew_planning()
|
||||
assert crew_planner.planning_agent_llm.model_name == "gpt-4o-mini"
|
||||
assert crew_planner.planning_agent_llm == "gpt-4o-mini"
|
||||
assert isinstance(result, PlannerTaskPydanticOutput)
|
||||
assert len(result.list_of_plans_per_task) == len(crew_planner.tasks)
|
||||
execute.assert_called_once()
|
||||
@@ -106,10 +105,7 @@ class TestCrewPlanner:
|
||||
)
|
||||
result = crew_planner_different_llm._handle_crew_planning()
|
||||
|
||||
assert (
|
||||
crew_planner_different_llm.planning_agent_llm.model_name
|
||||
== "gpt-3.5-turbo"
|
||||
)
|
||||
assert crew_planner_different_llm.planning_agent_llm == "gpt-3.5-turbo"
|
||||
assert isinstance(result, PlannerTaskPydanticOutput)
|
||||
assert len(result.list_of_plans_per_task) == len(
|
||||
crew_planner_different_llm.tasks
|
||||
|
||||
Reference in New Issue
Block a user