fixing parser, tools and executor

This commit is contained in:
João Moura
2024-09-15 18:41:59 -03:00
parent c2795307f6
commit f216b0a78c
98 changed files with 21270 additions and 26437 deletions

View File

@@ -1,4 +1,65 @@
interactions:
- request:
body: !!binary |
Cr4NCiQKIgoMc2VydmljZS5uYW1lEhIKEGNyZXdBSS10ZWxlbWV0cnkSlQ0KEgoQY3Jld2FpLnRl
bGVtZXRyeRKbAQoQ3MDaUVuVeRFgDjyvJfWBwxIIwH/jk2MhkgYqClRvb2wgVXNhZ2UwATlwdpHr
A1n1F0EwS5PrA1n1F0oaCg5jcmV3YWlfdmVyc2lvbhIICgYwLjU2LjBKJwoJdG9vbF9uYW1lEhoK
GEFzayBxdWVzdGlvbiB0byBjb3dvcmtlckoOCghhdHRlbXB0cxICGAF6AhgBhQEAAQAAEs8JChBa
zhrixnT58WO+vPYX29kfEgizMOnCJLQJhCoMQ3JldyBDcmVhdGVkMAE5qNKcPARZ9RdBmBagPARZ
9RdKGgoOY3Jld2FpX3ZlcnNpb24SCAoGMC41Ni4wShoKDnB5dGhvbl92ZXJzaW9uEggKBjMuMTEu
N0ouCghjcmV3X2tleRIiCiA3NDI3NTczMTJlZjdiYjRlZTBiMDY2MmQxYzJlMjE3OUoxCgdjcmV3
X2lkEiYKJDNhZWRmNDA5LTM3MTMtNGU4ZS1hNjQwLWI4ZjBmMWI2NTQzMkocCgxjcmV3X3Byb2Nl
c3MSDAoKc2VxdWVudGlhbEoRCgtjcmV3X21lbW9yeRICEABKGgoUY3Jld19udW1iZXJfb2ZfdGFz
a3MSAhgBShsKFWNyZXdfbnVtYmVyX29mX2FnZW50cxICGAJKgAUKC2NyZXdfYWdlbnRzEvAECu0E
W3sia2V5IjogIjg5Y2YzMTFiNDhiNTIxNjlkNDJmMzkyNWM1YmUxYzVhIiwgImlkIjogIjE4NjI0
NTk5LTU4NzItNDVjNS1hODkzLTU0YjBjNWU2NWZmYiIsICJyb2xlIjogIk1hbmFnZXIiLCAidmVy
Ym9zZT8iOiBm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hc2sgQ3JlYXRlZDABOdjtKD0EWfUXQYihKT0EWfUXSi4KCGNyZXdfa2V5EiIKIDc0
Mjc1NzMxMmVmN2JiNGVlMGIwNjYyZDFjMmUyMTc5SjEKB2NyZXdfaWQSJgokM2FlZGY0MDktMzcx
My00ZThlLWE2NDAtYjhmMGYxYjY1NDMySi4KCHRhc2tfa2V5EiIKIDI3ZWYzOGNjOTlkYTRhOGRl
ZDcwZWQ0MDZlNDRhYjg2SjEKB3Rhc2tfaWQSJgokYTkxMjE3NzEtNTkyYi00MzJlLTljMzYtNGRj
NDc5NDQ1N2MxegIYAYUBAAEAAA==
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '1729'
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:
- Sun, 15 Sep 2024 07:05:08 GMT
status:
code: 200
message: OK
- request:
body: '{"messages": [{"role": "system", "content": "You are Manager. You''re great
at delegating work about scoring.\nYour personal goal is: Coordinate scoring
@@ -33,7 +94,7 @@ interactions:
your final answer: The score of the title.\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"]}'
on it!\n\nThought:"}], "model": "gpt-4o", "stop": ["\nResult"]}'
headers:
accept:
- application/json
@@ -42,12 +103,12 @@ interactions:
connection:
- keep-alive
content-length:
- '2640'
- '2635'
content-type:
- application/json
cookie:
- __cf_bm=pgsskMPipgeSB6HhnkjwcOEfengIvt0p9whKNmTJVLs-1726215280-1.0.1.1-Gtqb.nO1U.cHTnd9mR9sEA5tpVo1.pexRrxqXOkn.6Mzja8mLG1URJsOLTfjMAAYpWaUQe4Rjmnr6lqQk5hAxQ;
_cfuvid=dp2yoCmGHVlURh_U78_UoIfnhcO5UhufnL5whkUSMTQ-1726214380689-0.0.1.1-604800000
- _cfuvid=Bz2zevKuFYZqnEFwqmqVHcRo5pT0fm0fTtc_6_VQs4g-1726379702153-0.0.1.1-604800000;
__cf_bm=NOn1n25T8u1eKhL05A4mBgpDvwojMRvK1SB7TGDEjFU-1726383316-1.0.1.1-kUyz.anEyDoe9wXgChl5UWW3Z9pFTgIpyZfqI6rucN2vXQHH6k.DSvUtilpKOPnhI4LtmQYBhxkJ6wKLfS3J8Q
host:
- api.openai.com
user-agent:
@@ -71,26 +132,26 @@ interactions:
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-A6vp8du27ZEb6qG03UeIgpJJYmjNk\",\n \"object\":
\"chat.completion\",\n \"created\": 1726215606,\n \"model\": \"gpt-4o-2024-05-13\",\n
content: "{\n \"id\": \"chatcmpl-A7dbfEfKgx7Z9CvBu3GuPQMDgCJwY\",\n \"object\":
\"chat.completion\",\n \"created\": 1726383907,\n \"model\": \"gpt-4o-2024-05-13\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": \"To provide an accurate integer score
between 1-5 for the title 'The impact of AI in the future of work', I need to
delegate this task to the Scorer.\\n\\nAction: Delegate work to coworker\\nAction
Input: {\\\"task\\\": \\\"Provide an integer score between 1-5 for the title
'The impact of AI in the future of work'\\\", \\\"context\\\": \\\"We need you
to rate the given title based on your expert judgment. The scoring range is
between 1 and 5. Please provide a brief rationale for your rating as well, if
possible.\\\", \\\"coworker\\\": \\\"Scorer\\\"}\",\n \"refusal\": null\n
\ },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n
\ ],\n \"usage\": {\n \"prompt_tokens\": 584,\n \"completion_tokens\":
126,\n \"total_tokens\": 710,\n \"completion_tokens_details\": {\n \"reasoning_tokens\":
\"assistant\",\n \"content\": \"I need to delegate the task of scoring
the title \\\"The impact of AI in the future of work\\\" to the Scorer so that
I can provide an accurate score based on their evaluation.\\n\\nAction: Delegate
work to coworker\\nAction Input: {\\\"task\\\": \\\"Score the title 'The impact
of AI in the future of work' on a scale of 1-5.\\\", \\\"context\\\": \\\"This
title needs to be given an integer score between 1 and 5 based on its relevance,
clarity, and potential impact. Your evaluation is crucial for determining the
final score.\\\", \\\"coworker\\\": \\\"Scorer\\\"}\",\n \"refusal\":
null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n
\ }\n ],\n \"usage\": {\n \"prompt_tokens\": 584,\n \"completion_tokens\":
125,\n \"total_tokens\": 709,\n \"completion_tokens_details\": {\n \"reasoning_tokens\":
0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8c26b74ddb752ab9-LAX
- 8c36c43bf9d77454-MIA
Connection:
- keep-alive
Content-Encoding:
@@ -98,7 +159,7 @@ interactions:
Content-Type:
- application/json
Date:
- Fri, 13 Sep 2024 08:20:07 GMT
- Sun, 15 Sep 2024 07:05:08 GMT
Server:
- cloudflare
Transfer-Encoding:
@@ -112,7 +173,7 @@ interactions:
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '1743'
- '1174'
openai-version:
- '2020-10-01'
strict-transport-security:
@@ -130,7 +191,7 @@ interactions:
x-ratelimit-reset-tokens:
- 1ms
x-request-id:
- req_a4a571fc8e825316f692e01f2a3b41ba
- req_a35c36e9f131f10c63d67277c4d3a226
http_version: HTTP/1.1
status_code: 200
- request:
@@ -140,16 +201,15 @@ interactions:
format:\n\nThought: I now can give a great answer\nFinal Answer: Your final
answer must be the great and the most complete as possible, it must be outcome
described.\n\nI MUST use these formats, my job depends on it!"}, {"role": "user",
"content": "\nCurrent Task: Provide an integer score between 1-5 for the 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.\nyou MUST return the actual complete content as the
final answer, not a summary.\n\nThis is the context you''re working with:\nWe
need you to rate the given title based on your expert judgment. The scoring
range is between 1 and 5. Please provide a brief rationale for your rating as
well, if possible.\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"]}'
"content": "\nCurrent Task: Score the title ''The impact of AI in the future
of work'' on a scale of 1-5.\n\nThis is the expect criteria for your final answer:
Your best answer to your coworker asking you this, accounting for the context
shared.\nyou MUST return the actual complete content as the final answer, not
a summary.\n\nThis is the context you''re working with:\nThis title needs to
be given an integer score between 1 and 5 based on its relevance, clarity, and
potential impact. Your evaluation is crucial for determining the final score.\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": ["\nResult"]}'
headers:
accept:
- application/json
@@ -158,12 +218,12 @@ interactions:
connection:
- keep-alive
content-length:
- '1214'
- '1194'
content-type:
- application/json
cookie:
- __cf_bm=pgsskMPipgeSB6HhnkjwcOEfengIvt0p9whKNmTJVLs-1726215280-1.0.1.1-Gtqb.nO1U.cHTnd9mR9sEA5tpVo1.pexRrxqXOkn.6Mzja8mLG1URJsOLTfjMAAYpWaUQe4Rjmnr6lqQk5hAxQ;
_cfuvid=dp2yoCmGHVlURh_U78_UoIfnhcO5UhufnL5whkUSMTQ-1726214380689-0.0.1.1-604800000
- _cfuvid=Bz2zevKuFYZqnEFwqmqVHcRo5pT0fm0fTtc_6_VQs4g-1726379702153-0.0.1.1-604800000;
__cf_bm=NOn1n25T8u1eKhL05A4mBgpDvwojMRvK1SB7TGDEjFU-1726383316-1.0.1.1-kUyz.anEyDoe9wXgChl5UWW3Z9pFTgIpyZfqI6rucN2vXQHH6k.DSvUtilpKOPnhI4LtmQYBhxkJ6wKLfS3J8Q
host:
- api.openai.com
user-agent:
@@ -187,25 +247,23 @@ interactions:
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-A6vpApQ8II2bUOvaJpMJ9CbqfY2Ex\",\n \"object\":
\"chat.completion\",\n \"created\": 1726215608,\n \"model\": \"gpt-4o-2024-05-13\",\n
content: "{\n \"id\": \"chatcmpl-A7dbgoScHkShqq7oYjltsvcoAPDAA\",\n \"object\":
\"chat.completion\",\n \"created\": 1726383908,\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: I would rate the title 'The impact of AI in the future of work' a 4
out of 5. The title is clear and directly addresses a relevant and timely topic.
It promises an exploration of the influence of artificial intelligence on the
future of employment, which is a subject of great interest and importance. However,
it could be slightly more specific to further enhance its appeal, such as specifying
which aspects of work (e.g., job displacement, skill evolution, industry-specific
impacts) it will focus on.\",\n \"refusal\": null\n },\n \"logprobs\":
null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
241,\n \"completion_tokens\": 116,\n \"total_tokens\": 357,\n \"completion_tokens_details\":
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_992d1ea92d\"\n}\n"
Answer: 4 - The title 'The impact of AI in the future of work' is highly relevant,
clear, and has the potential to significantly impact the reader's understanding
of an important topic. However, it could potentially be more impactful with
a slight refinement for specificity.\",\n \"refusal\": null\n },\n
\ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n
\ \"usage\": {\n \"prompt_tokens\": 238,\n \"completion_tokens\": 66,\n
\ \"total_tokens\": 304,\n \"completion_tokens_details\": {\n \"reasoning_tokens\":
0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8c26b7612dc92ab9-LAX
- 8c36c4451eba7454-MIA
Connection:
- keep-alive
Content-Encoding:
@@ -213,7 +271,7 @@ interactions:
Content-Type:
- application/json
Date:
- Fri, 13 Sep 2024 08:20:10 GMT
- Sun, 15 Sep 2024 07:05:09 GMT
Server:
- cloudflare
Transfer-Encoding:
@@ -227,7 +285,7 @@ interactions:
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '1387'
- '641'
openai-version:
- '2020-10-01'
strict-transport-security:
@@ -239,13 +297,13 @@ interactions:
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '29999714'
- '29999718'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_b6ff0770d4481c72e3558cd83d76e615
- req_f1f901827531c7386c8eb5a006a25fd0
http_version: HTTP/1.1
status_code: 200
- request:
@@ -282,21 +340,18 @@ interactions:
your final answer: The score of the title.\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": "To provide an accurate
integer score between 1-5 for the title ''The impact of AI in the future of
work'', I need to delegate this task to the Scorer.\n\nAction: Delegate work
to coworker\nAction Input: {\"task\": \"Provide an integer score between 1-5
for the title ''The impact of AI in the future of work''\", \"context\": \"We
need you to rate the given title based on your expert judgment. The scoring
range is between 1 and 5. Please provide a brief rationale for your rating as
well, if possible.\", \"coworker\": \"Scorer\"}\nObservation: I would rate the
title ''The impact of AI in the future of work'' a 4 out of 5. The title is
clear and directly addresses a relevant and timely topic. It promises an exploration
of the influence of artificial intelligence on the future of employment, which
is a subject of great interest and importance. However, it could be slightly
more specific to further enhance its appeal, such as specifying which aspects
of work (e.g., job displacement, skill evolution, industry-specific impacts)
it will focus on."}], "model": "gpt-4o", "stop": ["\nObservation"]}'
on it!\n\nThought:"}, {"role": "assistant", "content": "I need to delegate the
task of scoring the title \"The impact of AI in the future of work\" to the
Scorer so that I can provide an accurate score based on their evaluation.\n\nAction:
Delegate work to coworker\nAction Input: {\"task\": \"Score the title ''The
impact of AI in the future of work'' on a scale of 1-5.\", \"context\": \"This
title needs to be given an integer score between 1 and 5 based on its relevance,
clarity, and potential impact. Your evaluation is crucial for determining the
final score.\", \"coworker\": \"Scorer\"}\nObservation: 4 - The title ''The
impact of AI in the future of work'' is highly relevant, clear, and has the
potential to significantly impact the reader''s understanding of an important
topic. However, it could potentially be more impactful with a slight refinement
for specificity."}], "model": "gpt-4o", "stop": ["\nResult"]}'
headers:
accept:
- application/json
@@ -305,12 +360,12 @@ interactions:
connection:
- keep-alive
content-length:
- '3725'
- '3492'
content-type:
- application/json
cookie:
- __cf_bm=pgsskMPipgeSB6HhnkjwcOEfengIvt0p9whKNmTJVLs-1726215280-1.0.1.1-Gtqb.nO1U.cHTnd9mR9sEA5tpVo1.pexRrxqXOkn.6Mzja8mLG1URJsOLTfjMAAYpWaUQe4Rjmnr6lqQk5hAxQ;
_cfuvid=dp2yoCmGHVlURh_U78_UoIfnhcO5UhufnL5whkUSMTQ-1726214380689-0.0.1.1-604800000
- _cfuvid=Bz2zevKuFYZqnEFwqmqVHcRo5pT0fm0fTtc_6_VQs4g-1726379702153-0.0.1.1-604800000;
__cf_bm=NOn1n25T8u1eKhL05A4mBgpDvwojMRvK1SB7TGDEjFU-1726383316-1.0.1.1-kUyz.anEyDoe9wXgChl5UWW3Z9pFTgIpyZfqI6rucN2vXQHH6k.DSvUtilpKOPnhI4LtmQYBhxkJ6wKLfS3J8Q
host:
- api.openai.com
user-agent:
@@ -334,20 +389,19 @@ interactions:
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-A6vpDvwJSM03OuDbYj6OWWMblLMwD\",\n \"object\":
\"chat.completion\",\n \"created\": 1726215611,\n \"model\": \"gpt-4o-2024-05-13\",\n
content: "{\n \"id\": \"chatcmpl-A7dbhqGZvMutTDcOzrdB5xaaXP1pT\",\n \"object\":
\"chat.completion\",\n \"created\": 1726383909,\n \"model\": \"gpt-4o-2024-05-13\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": \"Thought: I now have the final answer
from the Scorer.\\n\\nFinal Answer: 4\",\n \"refusal\": null\n },\n
\ \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n
\ \"usage\": {\n \"prompt_tokens\": 819,\n \"completion_tokens\": 18,\n
\ \"total_tokens\": 837,\n \"completion_tokens_details\": {\n \"reasoning_tokens\":
0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
\"assistant\",\n \"content\": \"Thought: I now know the final answer\\nFinal
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
768,\n \"completion_tokens\": 14,\n \"total_tokens\": 782,\n \"completion_tokens_details\":
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_25624ae3a5\"\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8c26b76fdbd62ab9-LAX
- 8c36c44afa107454-MIA
Connection:
- keep-alive
Content-Encoding:
@@ -355,7 +409,7 @@ interactions:
Content-Type:
- application/json
Date:
- Fri, 13 Sep 2024 08:20:11 GMT
- Sun, 15 Sep 2024 07:05:09 GMT
Server:
- cloudflare
Transfer-Encoding:
@@ -369,7 +423,7 @@ interactions:
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '318'
- '260'
openai-version:
- '2020-10-01'
strict-transport-security:
@@ -381,13 +435,13 @@ interactions:
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '29999103'
- '29999161'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 1ms
x-request-id:
- req_77d5c12bb1af1c29348b67843bba8d12
- req_5547d44a267683a2f1e73e327aba43bb
http_version: HTTP/1.1
status_code: 200
version: 1