mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-07 15:18:29 +00:00
* Adding support to force a tool return to be the final answer. This will at the end of the execution return the tool output. It will return the output of the latest tool with the flag * Update src/crewai/agent.py Co-authored-by: Gui Vieira <guilherme_vieira@me.com> * Update tests/agent_test.py Co-authored-by: Gui Vieira <guilherme_vieira@me.com> --------- Co-authored-by: Gui Vieira <guilherme_vieira@me.com>
513 lines
22 KiB
YAML
513 lines
22 KiB
YAML
interactions:
|
|
- request:
|
|
body: '{"messages": [{"content": "You are Scorer. You''re an expert scorer, specialized
|
|
in scoring titles.\nYour personal goal is: Score the titleTo 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: my best complete final answer to the task.\nYour
|
|
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:\n", "role": "user"}], "model": "gpt-4o", "n": 1, "stop": ["\nObservation"],
|
|
"stream": true, "temperature": 0.7}'
|
|
headers:
|
|
accept:
|
|
- application/json
|
|
accept-encoding:
|
|
- gzip, deflate
|
|
connection:
|
|
- keep-alive
|
|
content-length:
|
|
- '997'
|
|
content-type:
|
|
- application/json
|
|
host:
|
|
- api.openai.com
|
|
user-agent:
|
|
- OpenAI/Python 1.35.10
|
|
x-stainless-arch:
|
|
- arm64
|
|
x-stainless-async:
|
|
- 'false'
|
|
x-stainless-lang:
|
|
- python
|
|
x-stainless-os:
|
|
- MacOS
|
|
x-stainless-package-version:
|
|
- 1.35.10
|
|
x-stainless-runtime:
|
|
- CPython
|
|
x-stainless-runtime-version:
|
|
- 3.11.7
|
|
method: POST
|
|
uri: https://api.openai.com/v1/chat/completions
|
|
response:
|
|
body:
|
|
string: 'data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"Thought"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
I"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
now"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
can"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
give"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
a"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
great"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
answer"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"Final"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
Answer"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"
|
|
"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB7Eitvp9hkOjbYRgXW6Bg1ojht","object":"chat.completion.chunk","created":1720089633,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_d576307f90","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
|
|
|
|
|
|
data: [DONE]
|
|
|
|
|
|
'
|
|
headers:
|
|
CF-Cache-Status:
|
|
- DYNAMIC
|
|
CF-RAY:
|
|
- 89de7f71abb9875b-MIA
|
|
Connection:
|
|
- keep-alive
|
|
Content-Type:
|
|
- text/event-stream; charset=utf-8
|
|
Date:
|
|
- Thu, 04 Jul 2024 10:40:33 GMT
|
|
Server:
|
|
- cloudflare
|
|
Set-Cookie:
|
|
- __cf_bm=prru0_uEX0CQ9o0IJgbUoJpelbHDHDG_yoAGsuIoCzk-1720089633-1.0.1.1-0nhcPmC68oICdU2qqqCnTZaIsyh2I1eZS1Na8jjxUsc4D5XEErZBzqWwFXCmlFuu2ByeR.aMkh.3nAct8HeDfg;
|
|
path=/; expires=Thu, 04-Jul-24 11:10:33 GMT; domain=.api.openai.com; HttpOnly;
|
|
Secure; SameSite=None
|
|
- _cfuvid=PzHZJLo7ACNtoscIB7neO.cKaLpAOi0ZEnBw0y5rxPg-1720089633856-0.0.1.1-604800000;
|
|
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
|
Transfer-Encoding:
|
|
- chunked
|
|
alt-svc:
|
|
- h3=":443"; ma=86400
|
|
openai-organization:
|
|
- crewai-iuxna1
|
|
openai-processing-ms:
|
|
- '88'
|
|
openai-version:
|
|
- '2020-10-01'
|
|
strict-transport-security:
|
|
- max-age=31536000; includeSubDomains
|
|
x-ratelimit-limit-requests:
|
|
- '10000'
|
|
x-ratelimit-limit-tokens:
|
|
- '16000000'
|
|
x-ratelimit-remaining-requests:
|
|
- '9999'
|
|
x-ratelimit-remaining-tokens:
|
|
- '15999772'
|
|
x-ratelimit-reset-requests:
|
|
- 6ms
|
|
x-ratelimit-reset-tokens:
|
|
- 0s
|
|
x-request-id:
|
|
- req_143ed6cba5e114a9e4bd0c5b338162ca
|
|
status:
|
|
code: 200
|
|
message: OK
|
|
- request:
|
|
body: '{"messages": [{"role": "user", "content": "4"}, {"role": "system", "content":
|
|
"I''m gonna convert this raw text into valid JSON."}], "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:
|
|
- '519'
|
|
content-type:
|
|
- application/json
|
|
cookie:
|
|
- __cf_bm=prru0_uEX0CQ9o0IJgbUoJpelbHDHDG_yoAGsuIoCzk-1720089633-1.0.1.1-0nhcPmC68oICdU2qqqCnTZaIsyh2I1eZS1Na8jjxUsc4D5XEErZBzqWwFXCmlFuu2ByeR.aMkh.3nAct8HeDfg;
|
|
_cfuvid=PzHZJLo7ACNtoscIB7neO.cKaLpAOi0ZEnBw0y5rxPg-1720089633856-0.0.1.1-604800000
|
|
host:
|
|
- api.openai.com
|
|
user-agent:
|
|
- OpenAI/Python 1.35.10
|
|
x-stainless-arch:
|
|
- arm64
|
|
x-stainless-async:
|
|
- 'false'
|
|
x-stainless-lang:
|
|
- python
|
|
x-stainless-os:
|
|
- MacOS
|
|
x-stainless-package-version:
|
|
- 1.35.10
|
|
x-stainless-runtime:
|
|
- CPython
|
|
x-stainless-runtime-version:
|
|
- 3.11.7
|
|
method: POST
|
|
uri: https://api.openai.com/v1/chat/completions
|
|
response:
|
|
body:
|
|
string: !!binary |
|
|
H4sIAAAAAAAAA2xSTW/bMAy9+1cIPMeDmzhN7FtXBM0OQzZkGFCshaEotK1WljSJXtsF+e+DHDd2
|
|
g/kgEHx8HyB9iBgDuYecgag5icaqOKtXn5c329v13xZNe/vzhVZ3v5Plapfeb9YwCQyze0JB76xP
|
|
wjRWIUmjT7BwyAmD6tVimiTL7HqWdkBj9qgCrbIUpyaeJtM0Tubx1awn1kYK9JCzXxFjjB26N0TU
|
|
e3yFnCWT906D3vMKIT8PMQbOqNAB7r30xDXBZACF0YQ6pNatUiOAjFGF4EoNxqfvMKqHPXGlCiXv
|
|
65dvdvXlz4/vN89ZmW2+4pq/bkd+J+k32wUqWy3O+xnh535+YcYYaN503K0wDjct2ZYu6IwBd1Xb
|
|
oKYQHQ4P4MPwA+TpET6MHqP/1Y99dTyvVZnKOrPzF1uCUmrp68Ih911a8GTsySLIPXbnaz9cBKwz
|
|
jaWCzDPqILjsrwfD/zKA8x4jQ1yNOPOojwf+zRM2RSl1hc462Z0SSlvs54vrWbIoswSiY/QPAAD/
|
|
/wMAhPn0nNMCAAA=
|
|
headers:
|
|
CF-Cache-Status:
|
|
- DYNAMIC
|
|
CF-RAY:
|
|
- 89de7f74dd79875b-MIA
|
|
Connection:
|
|
- keep-alive
|
|
Content-Encoding:
|
|
- gzip
|
|
Content-Type:
|
|
- application/json
|
|
Date:
|
|
- Thu, 04 Jul 2024 10:40:34 GMT
|
|
Server:
|
|
- cloudflare
|
|
Transfer-Encoding:
|
|
- chunked
|
|
alt-svc:
|
|
- h3=":443"; ma=86400
|
|
openai-organization:
|
|
- crewai-iuxna1
|
|
openai-processing-ms:
|
|
- '204'
|
|
openai-version:
|
|
- '2020-10-01'
|
|
strict-transport-security:
|
|
- max-age=31536000; includeSubDomains
|
|
x-ratelimit-limit-requests:
|
|
- '10000'
|
|
x-ratelimit-limit-tokens:
|
|
- '16000000'
|
|
x-ratelimit-remaining-requests:
|
|
- '9999'
|
|
x-ratelimit-remaining-tokens:
|
|
- '15999969'
|
|
x-ratelimit-reset-requests:
|
|
- 6ms
|
|
x-ratelimit-reset-tokens:
|
|
- 0s
|
|
x-request-id:
|
|
- req_44477611de78d7a3456f061b9fa808bf
|
|
status:
|
|
code: 200
|
|
message: OK
|
|
- request:
|
|
body: '{"messages": [{"content": "You are Scorer. You''re an expert scorer, specialized
|
|
in scoring titles.\nYour personal goal is: Score the titleTo 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: my best complete final answer to the task.\nYour
|
|
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:\n{\n \"score\": 4\n}\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:\n", "role": "user"}], "model": "gpt-4o",
|
|
"n": 1, "stop": ["\nObservation"], "stream": true, "temperature": 0.7}'
|
|
headers:
|
|
accept:
|
|
- application/json
|
|
accept-encoding:
|
|
- gzip, deflate
|
|
connection:
|
|
- keep-alive
|
|
content-length:
|
|
- '1115'
|
|
content-type:
|
|
- application/json
|
|
cookie:
|
|
- __cf_bm=prru0_uEX0CQ9o0IJgbUoJpelbHDHDG_yoAGsuIoCzk-1720089633-1.0.1.1-0nhcPmC68oICdU2qqqCnTZaIsyh2I1eZS1Na8jjxUsc4D5XEErZBzqWwFXCmlFuu2ByeR.aMkh.3nAct8HeDfg;
|
|
_cfuvid=PzHZJLo7ACNtoscIB7neO.cKaLpAOi0ZEnBw0y5rxPg-1720089633856-0.0.1.1-604800000
|
|
host:
|
|
- api.openai.com
|
|
user-agent:
|
|
- OpenAI/Python 1.35.10
|
|
x-stainless-arch:
|
|
- arm64
|
|
x-stainless-async:
|
|
- 'false'
|
|
x-stainless-lang:
|
|
- python
|
|
x-stainless-os:
|
|
- MacOS
|
|
x-stainless-package-version:
|
|
- 1.35.10
|
|
x-stainless-runtime:
|
|
- CPython
|
|
x-stainless-runtime-version:
|
|
- 3.11.7
|
|
method: POST
|
|
uri: https://api.openai.com/v1/chat/completions
|
|
response:
|
|
body:
|
|
string: 'data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"Thought"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
I"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
now"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
can"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
give"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
a"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
great"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
answer"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"Final"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
Answer"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"
|
|
"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}]}
|
|
|
|
|
|
data: {"id":"chatcmpl-9hEB88vj8WJPFFx58DMXcrw6Gam6S","object":"chat.completion.chunk","created":1720089634,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_ce0793330f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
|
|
|
|
|
|
data: [DONE]
|
|
|
|
|
|
'
|
|
headers:
|
|
CF-Cache-Status:
|
|
- DYNAMIC
|
|
CF-RAY:
|
|
- 89de7f77befb875b-MIA
|
|
Connection:
|
|
- keep-alive
|
|
Content-Type:
|
|
- text/event-stream; charset=utf-8
|
|
Date:
|
|
- Thu, 04 Jul 2024 10:40:34 GMT
|
|
Server:
|
|
- cloudflare
|
|
Transfer-Encoding:
|
|
- chunked
|
|
alt-svc:
|
|
- h3=":443"; ma=86400
|
|
openai-organization:
|
|
- crewai-iuxna1
|
|
openai-processing-ms:
|
|
- '141'
|
|
openai-version:
|
|
- '2020-10-01'
|
|
strict-transport-security:
|
|
- max-age=31536000; includeSubDomains
|
|
x-ratelimit-limit-requests:
|
|
- '10000'
|
|
x-ratelimit-limit-tokens:
|
|
- '16000000'
|
|
x-ratelimit-remaining-requests:
|
|
- '9999'
|
|
x-ratelimit-remaining-tokens:
|
|
- '15999744'
|
|
x-ratelimit-reset-requests:
|
|
- 6ms
|
|
x-ratelimit-reset-tokens:
|
|
- 0s
|
|
x-request-id:
|
|
- req_de7d660da3b145b703b4e9bf4ea29bb7
|
|
status:
|
|
code: 200
|
|
message: OK
|
|
- request:
|
|
body: '{"messages": [{"role": "user", "content": "5"}, {"role": "system", "content":
|
|
"I''m gonna convert this raw text into valid JSON."}], "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:
|
|
- '519'
|
|
content-type:
|
|
- application/json
|
|
cookie:
|
|
- __cf_bm=prru0_uEX0CQ9o0IJgbUoJpelbHDHDG_yoAGsuIoCzk-1720089633-1.0.1.1-0nhcPmC68oICdU2qqqCnTZaIsyh2I1eZS1Na8jjxUsc4D5XEErZBzqWwFXCmlFuu2ByeR.aMkh.3nAct8HeDfg;
|
|
_cfuvid=PzHZJLo7ACNtoscIB7neO.cKaLpAOi0ZEnBw0y5rxPg-1720089633856-0.0.1.1-604800000
|
|
host:
|
|
- api.openai.com
|
|
user-agent:
|
|
- OpenAI/Python 1.35.10
|
|
x-stainless-arch:
|
|
- arm64
|
|
x-stainless-async:
|
|
- 'false'
|
|
x-stainless-lang:
|
|
- python
|
|
x-stainless-os:
|
|
- MacOS
|
|
x-stainless-package-version:
|
|
- 1.35.10
|
|
x-stainless-runtime:
|
|
- CPython
|
|
x-stainless-runtime-version:
|
|
- 3.11.7
|
|
method: POST
|
|
uri: https://api.openai.com/v1/chat/completions
|
|
response:
|
|
body:
|
|
string: !!binary |
|
|
H4sIAAAAAAAAA2xSW0vrQBB+z69Y5rk5pE1jbR49CoqIctRz8ULYbiZp7N7YnYBS+t9l09jEcvKw
|
|
DPPNd2Em24gxaErIGYg1J6GsjJfri7Ol//3nZ13psyd+dT0/X/1930wfk/LXHCaBYVZvKOiL9UMY
|
|
ZSVSY/QeFg45YVCdLmZJcro8SbMOUKZEGWi1pXhu4lkym8dJFk/Tnrg2jUAPOXuOGGNs270hoi7x
|
|
HXKWTL46Cr3nNUJ+GGIMnJGhA9z7xhPXBJMBFEYT6pBat1KOADJGFoJLORjvv+2oHvbEpSz8ZXpu
|
|
8a68ufGbxf2tfLj+pzZuhSO/vfSH7QJVrRaH/YzwQz8/MmMMNFcd914Yh7ct2ZaO6IwBd3WrUFOI
|
|
DtsX8GH4BfJsB99Gd9H/6te+2h3WKk1tnVn5oy1B1ejGrwuH3HdpwZOxe4sg99qdr/12EbDOKEsF
|
|
mQ3qIHjaXw+G/2UAsx4jQ1yOOFnUxwP/4QlVUTW6Rmdd050SKlsITBbLNE2TCqJd9AkAAP//AwAp
|
|
6S9s0wIAAA==
|
|
headers:
|
|
CF-Cache-Status:
|
|
- DYNAMIC
|
|
CF-RAY:
|
|
- 89de7f7bb96a875b-MIA
|
|
Connection:
|
|
- keep-alive
|
|
Content-Encoding:
|
|
- gzip
|
|
Content-Type:
|
|
- application/json
|
|
Date:
|
|
- Thu, 04 Jul 2024 10:40:35 GMT
|
|
Server:
|
|
- cloudflare
|
|
Transfer-Encoding:
|
|
- chunked
|
|
alt-svc:
|
|
- h3=":443"; ma=86400
|
|
openai-organization:
|
|
- crewai-iuxna1
|
|
openai-processing-ms:
|
|
- '248'
|
|
openai-version:
|
|
- '2020-10-01'
|
|
strict-transport-security:
|
|
- max-age=31536000; includeSubDomains
|
|
x-ratelimit-limit-requests:
|
|
- '10000'
|
|
x-ratelimit-limit-tokens:
|
|
- '16000000'
|
|
x-ratelimit-remaining-requests:
|
|
- '9999'
|
|
x-ratelimit-remaining-tokens:
|
|
- '15999969'
|
|
x-ratelimit-reset-requests:
|
|
- 6ms
|
|
x-ratelimit-reset-tokens:
|
|
- 0s
|
|
x-request-id:
|
|
- req_d4468112448550b93eaa4ffa2b9e3154
|
|
status:
|
|
code: 200
|
|
message: OK
|
|
version: 1
|