mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 07:13:00 +00:00
Add support to delegate work
This commit is contained in:
0
tests/agent_tools/__init__.py
Normal file
0
tests/agent_tools/__init__.py
Normal file
46
tests/agent_tools/agent_tools_test.py
Normal file
46
tests/agent_tools/agent_tools_test.py
Normal file
@@ -0,0 +1,46 @@
|
||||
"""Test Agent creation and execution basic functionality."""
|
||||
|
||||
import pytest
|
||||
from ...crewai import Agent
|
||||
from ...crewai.tools.agent_tools import AgentTools
|
||||
|
||||
researcher = Agent(
|
||||
role="researcher",
|
||||
goal="make the best research and analysis on content about AI and AI agents",
|
||||
backstory="You're an expert researcher, specialized in technology",
|
||||
allow_delegation=False
|
||||
)
|
||||
tools = AgentTools(agents=[researcher])
|
||||
|
||||
|
||||
@pytest.mark.vcr()
|
||||
def test_delegate_work():
|
||||
result = tools.delegate_work(
|
||||
command="researcher|share your take on AI Agents|I heard you hate them"
|
||||
)
|
||||
|
||||
assert result == "As a technology researcher, it's important to maintain objectivity. AI agents have their own merits and demerits. On the positive side, they can automate routine tasks, improve efficiency, and enable new forms of communication and decision-making. However, there are potential downsides, like job displacement due to automation and concerns about privacy and security. It's not accurate to say that I hate them, but rather, I recognize the potential implications - both positive and negative - of their use."
|
||||
|
||||
@pytest.mark.vcr()
|
||||
def test_ask_question():
|
||||
result = tools.ask_question(
|
||||
command="researcher|do you hate AI Agents?|I heard you LOVE them"
|
||||
)
|
||||
|
||||
assert result == "As a researcher, my feelings towards AI Agents are neutral. I neither love nor hate them. I study and analyze them objectively to understand their potential, capabilities, and limitations. While I appreciate the technological advancement they represent, my job is to approach them from an analytical and scientific perspective."
|
||||
|
||||
def test_delegate_work_to_wrong_agent():
|
||||
result = tools.ask_question(
|
||||
command="writer|share your take on AI Agents|I heard you hate them"
|
||||
)
|
||||
|
||||
assert result == "Error executing tool."
|
||||
|
||||
def test_ask_question_to_wrong_agent():
|
||||
result = tools.ask_question(
|
||||
command="writer|do you hate AI Agents?|I heard you LOVE them"
|
||||
)
|
||||
|
||||
assert result == "Error executing tool."
|
||||
|
||||
|
||||
207
tests/agent_tools/cassettes/test_ask_question.yaml
Normal file
207
tests/agent_tools/cassettes/test_ask_question.yaml
Normal file
@@ -0,0 +1,207 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are researcher.\nYou''re
|
||||
an expert researcher, specialized in technology\n\nYour personal goal is: make
|
||||
the best research and analysis on content about AI and AI agents\nTOOLS:\n------\n\nYou
|
||||
have access to the following tools:\n\n\n\nTo use a tool, please use the following
|
||||
format:\n\n```\nThought: Do I need to use a tool? Yes\nAction: the action to
|
||||
take, should be one of []\nAction Input: the input to the action\nObservation:
|
||||
the result of the action\n```\n\nWhen you have a response for your task, or
|
||||
if you do not need to use a tool, you MUST use the format:\n\n```\nThought:
|
||||
Do I need to use a tool? No\nFinal Answer: [your response here]\n```\n\t\tThis
|
||||
is the summary of your work so far:\n \nBegin! This is VERY important
|
||||
to you, your job depends on it!\n\nCurrent Task: do you hate AI Agents?\n\nThis
|
||||
is the context you are working with:\nI heard you LOVE them\n\n"}], "model":
|
||||
"gpt-4", "max_tokens": null, "stream": false, "n": 1, "temperature": 0.7, "stop":
|
||||
["\nObservation"]}'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer 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
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1042'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Cookie:
|
||||
- __cf_bm=tK5mxmIOd60ucoQKATtbR8SRQ_JqyXuQNF3_REtUp8Y-1699495558-0-AYxCQwfqvfsWejuO19whuBqtsq2nrXi+wWcAirvErhN24TrrInAJKVGS9DLI/ZeUJPnfoX8EyTWdV32kPHM68cM=
|
||||
User-Agent:
|
||||
- OpenAI/v1 PythonBindings/0.28.1
|
||||
X-OpenAI-Client-User-Agent:
|
||||
- '{"bindings_version": "0.28.1", "httplib": "requests", "lang": "python", "lang_version":
|
||||
"3.9.7", "platform": "macOS-10.16-x86_64-i386-64bit", "publisher": "openai",
|
||||
"uname": "Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17
|
||||
PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64"}'
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAAA1RSy24bMRC7+ysInR0jLyexL4WLooBboJemL7RFMNGOvXK1M4I0TuoE+fdAu07c
|
||||
XnQQRQ4pzuMIcKFxczjfkvkuxaOrpcbrjx/o83RWNl/F0oP8+N58eVvCw2bmxpWhtxv29sKaeO1S
|
||||
ZAsqA+wzk3FVPbmYzc5n08uzaQ902nCstHWyo/Oj44uTsz2j1eC5uDl+jgDgsT+rN2n4r5vjePxy
|
||||
03EptGY3f30EuKyx3jgqJRQjMTc+gF7FWHq7161u163N8U6xhDA3MMW2MAimGt/gk/6S90EoYiHl
|
||||
nvMciwJC5sKUfct5jG6HFXMMsi4wvafcFCyWWKxZrIAyQ3hrmeKknxGs5YyodwzRjJaMYS13FS22
|
||||
bXYgaUBCcfcwIBj+N9xx3PX+pOFcYzUVDhlJa6BAcQxPiW5DDBa4jHulGLpgVNsoE3xrQ2QsQSll
|
||||
9mE/G8a+FY26Dp4iqLkj8dyxWEV3yJxqYLE+7EZvEWrUXkXJt4PLVdYOJIN1G5SkQfGhmlsFj8S5
|
||||
pCHJxO0LeXptchUklPYmMxWV2k4xTcOzpxHwu9+M7X9lu5S1S3Zj+oelrsvp8WzQc4clPKCXp3vQ
|
||||
1Cj+w7o6GdUhT6NnAAAA//8DAPOW3RcBAwAA
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 823282bba87b1ceb-GRU
|
||||
Cache-Control:
|
||||
- no-cache, must-revalidate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 09 Nov 2023 02:08:59 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
access-control-allow-origin:
|
||||
- '*'
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-model:
|
||||
- gpt-4-0613
|
||||
openai-organization:
|
||||
- clearbit-2
|
||||
openai-processing-ms:
|
||||
- '3917'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15724800; includeSubDomains
|
||||
x-ratelimit-limit-requests:
|
||||
- '100'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '300000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '99'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '299770'
|
||||
x-ratelimit-reset-requests:
|
||||
- 600ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 45ms
|
||||
x-request-id:
|
||||
- 9ddc4f75922fceafc44487e8f65707eb
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "Progressively summarize the
|
||||
lines of conversation provided, adding onto the previous summary returning a
|
||||
new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks
|
||||
of artificial intelligence. The AI thinks artificial intelligence is a force
|
||||
for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial
|
||||
intelligence is a force for good?\nAI: Because artificial intelligence will
|
||||
help humans reach their full potential.\n\nNew summary:\nThe human asks what
|
||||
the AI thinks of artificial intelligence. The AI thinks artificial intelligence
|
||||
is a force for good because it will help humans reach their full potential.\nEND
|
||||
OF EXAMPLE\n\nCurrent summary:\n\n\nNew lines of conversation:\nHuman: do you
|
||||
hate AI Agents?\n\nThis is the context you are working with:\nI heard you LOVE
|
||||
them\nAI: As a researcher, my feelings towards AI Agents are neutral. I neither
|
||||
love nor hate them. I study and analyze them objectively to understand their
|
||||
potential, capabilities, and limitations. While I appreciate the technological
|
||||
advancement they represent, my job is to approach them from an analytical and
|
||||
scientific perspective.\n\nNew summary:"}], "model": "gpt-4", "max_tokens":
|
||||
null, "stream": false, "n": 1, "temperature": 0.7}'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer 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
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1289'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Cookie:
|
||||
- __cf_bm=tK5mxmIOd60ucoQKATtbR8SRQ_JqyXuQNF3_REtUp8Y-1699495558-0-AYxCQwfqvfsWejuO19whuBqtsq2nrXi+wWcAirvErhN24TrrInAJKVGS9DLI/ZeUJPnfoX8EyTWdV32kPHM68cM=
|
||||
User-Agent:
|
||||
- OpenAI/v1 PythonBindings/0.28.1
|
||||
X-OpenAI-Client-User-Agent:
|
||||
- '{"bindings_version": "0.28.1", "httplib": "requests", "lang": "python", "lang_version":
|
||||
"3.9.7", "platform": "macOS-10.16-x86_64-i386-64bit", "publisher": "openai",
|
||||
"uname": "Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17
|
||||
PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64"}'
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAAA1RSwY4aMQy98xVWzgOCXUqBW08VUttDu6pWqqqVSQxxN5NEsYeWrvj3KjPMsr1E
|
||||
ip/fy3OeXyYAhp3ZgrEe1bY5TNe7FB43vP7mvuN5uX7UT93xy5Lmn7+Gj2Saykj7X2R1ZM1sanMg
|
||||
5RQH2BZCpaq6WG02y8279/ebHmiTo1Bpx6zT5XS+WtxfGT6xJTFb+DEBAHjpz+otOvpjtjBvxkpL
|
||||
Ingks31tAjAlhVoxKMKiGNU0N9CmqBR7uw+ewHctRkB5FlBP8GEHfABW8Kgk9YpHiioNaILfnq0f
|
||||
2wpJTtFVGiqgANYSYbGeSlMlIrF6KhDSiQRiKldR9dTOYBdFCV3fKdo5JgGMDjBiOP+9tsHwt3yi
|
||||
cK4Ouuio1JFchblATnUYxtCAxYx7DqxM0vRSgVtWrEnIDB4G25hzIcujEVCyPqaQjmwxALoTRkst
|
||||
Ra3oGQrlOlXUBvad9uyE1o/2DiW1UP+vmtZBIjoQy9XVgS1kKpKHEWbmmsLlNb4DRxb/VAglxRqJ
|
||||
aMpD22UC8LNfh+6/hE0uqc36pOmZYt2Ru8Vq0DO3zbuhqxHUpBjesNZ3k/rIZfIPAAD//wMA5pC0
|
||||
w/YCAAA=
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 823282d5cdcc1ceb-GRU
|
||||
Cache-Control:
|
||||
- no-cache, must-revalidate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 09 Nov 2023 02:09:03 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
access-control-allow-origin:
|
||||
- '*'
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-model:
|
||||
- gpt-4-0613
|
||||
openai-organization:
|
||||
- clearbit-2
|
||||
openai-processing-ms:
|
||||
- '3310'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15724800; includeSubDomains
|
||||
x-ratelimit-limit-requests:
|
||||
- '100'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '300000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '99'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '299699'
|
||||
x-ratelimit-reset-requests:
|
||||
- 600ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 60ms
|
||||
x-request-id:
|
||||
- 3f90abfc5a4c9e1c14f2502f88195bbd
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
215
tests/agent_tools/cassettes/test_delegate_work.yaml
Normal file
215
tests/agent_tools/cassettes/test_delegate_work.yaml
Normal file
@@ -0,0 +1,215 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "You are researcher.\nYou''re
|
||||
an expert researcher, specialized in technology\n\nYour personal goal is: make
|
||||
the best research and analysis on content about AI and AI agents\nTOOLS:\n------\n\nYou
|
||||
have access to the following tools:\n\n\n\nTo use a tool, please use the following
|
||||
format:\n\n```\nThought: Do I need to use a tool? Yes\nAction: the action to
|
||||
take, should be one of []\nAction Input: the input to the action\nObservation:
|
||||
the result of the action\n```\n\nWhen you have a response for your task, or
|
||||
if you do not need to use a tool, you MUST use the format:\n\n```\nThought:
|
||||
Do I need to use a tool? No\nFinal Answer: [your response here]\n```\n\t\tThis
|
||||
is the summary of your work so far:\n \nBegin! This is VERY important
|
||||
to you, your job depends on it!\n\nCurrent Task: share your take on AI Agents\n\nThis
|
||||
is the context you are working with:\nI heard you hate them\n\n"}], "model":
|
||||
"gpt-4", "max_tokens": null, "stream": false, "n": 1, "temperature": 0.7, "stop":
|
||||
["\nObservation"]}'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer 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
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1048'
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- OpenAI/v1 PythonBindings/0.28.1
|
||||
X-OpenAI-Client-User-Agent:
|
||||
- '{"bindings_version": "0.28.1", "httplib": "requests", "lang": "python", "lang_version":
|
||||
"3.9.7", "platform": "macOS-10.16-x86_64-i386-64bit", "publisher": "openai",
|
||||
"uname": "Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17
|
||||
PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64"}'
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAAA1RTy47jRgy8+ysKuuxFNtbzSsa3uSziBHkiQQJkgwXdoqReS6TQpOwoi/n3oGV5
|
||||
jL000Cyyq1hNflkBRayKHYrQkod+6Nbf7tVVp++/+eHDr78Y/3n87aft/mkfxjr88VdR5go9fObg
|
||||
16pN0H7o2KPKBQ6JyTm/un16fn54frp7vJuBXivuclkz+Pph/f5pe79UtBoDW7HD3ysA+DKfWZtU
|
||||
/G+xw/vyGunZjBoudm9JQJG0y5GCzKI5iRflDQwqzjLL/b3VsWl9hx8nDJxMhTrUzF2UxuB6plQZ
|
||||
XvZ4aVjcYK2OXSXvHFTXHBz9hCFpzWZxriWhbrJoG7wYCImNKYWWU4k9hLmCa644xYpBEB49zWUV
|
||||
LibGE+MU+TxoFMeBjCuooKbgNqdV5LT5KB/lQ8yEL2JnTrsLnXNoRTttpq+Yo78zxH7QlK3ICnqK
|
||||
4hTljTT6tMl90qXPlk4Mbzkm6FnQc4pXer5cNvhZcgYGtTirtlhxmUMTAglodO3JGUlHj8JwsqOV
|
||||
WUfSE4PrOobIEqZyfpiFDh1D+IxaU2/QGkH7fpQYKM/SQh9itnrd0zFKs8F3euZTbtJbTgxKWVH+
|
||||
3kgdKj1LlmUlunhkfNYDqmhDR4F7Fkc1crZj0XolCSqBkxjooKNjSPFEYZoh4zCm2ax9NlXUQSGM
|
||||
KTfqCqMJ3pJjj3YOtdyXOIyORL5MQeKgjcT/eLHvKjb2Q7e0aljjoN7ezM3cwg3Nl3X25vI7o/Gm
|
||||
WEb79W0n6ijR2k+JyVTynJvrcEl7XQH/zDs2frU2xZC0H/yT65ElL97ddtmx4rbON3R7/7igrk7d
|
||||
Dbh/eFxlltfV/wAAAP//AwAfk8xeTAQAAA==
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 82328f5b5d5a013b-GRU
|
||||
Cache-Control:
|
||||
- no-cache, must-revalidate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 09 Nov 2023 02:17:38 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=Kok7joFOxdnT4Rx42sui.msFN7jEZTBCOWV7KIuNoRU-1699496258-0-AWKfmFHxH6JvrxGRge6CrVDGH8NMMnlPoiNxVrU67tDkND02pVJemu65mT6VtMZ2t9HbOQUO+GHsKxUfpQh3BXI=;
|
||||
path=/; expires=Thu, 09-Nov-23 02:47:38 GMT; domain=.api.openai.com; HttpOnly;
|
||||
Secure; SameSite=None
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
access-control-allow-origin:
|
||||
- '*'
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-model:
|
||||
- gpt-4-0613
|
||||
openai-organization:
|
||||
- clearbit-2
|
||||
openai-processing-ms:
|
||||
- '5497'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15724800; includeSubDomains
|
||||
x-ratelimit-limit-requests:
|
||||
- '100'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '300000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '99'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '299769'
|
||||
x-ratelimit-reset-requests:
|
||||
- 600ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 46ms
|
||||
x-request-id:
|
||||
- cb70f6cd3ef05277cf4d4b56d0bf5595
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": "Progressively summarize the
|
||||
lines of conversation provided, adding onto the previous summary returning a
|
||||
new summary.\n\nEXAMPLE\nCurrent summary:\nThe human asks what the AI thinks
|
||||
of artificial intelligence. The AI thinks artificial intelligence is a force
|
||||
for good.\n\nNew lines of conversation:\nHuman: Why do you think artificial
|
||||
intelligence is a force for good?\nAI: Because artificial intelligence will
|
||||
help humans reach their full potential.\n\nNew summary:\nThe human asks what
|
||||
the AI thinks of artificial intelligence. The AI thinks artificial intelligence
|
||||
is a force for good because it will help humans reach their full potential.\nEND
|
||||
OF EXAMPLE\n\nCurrent summary:\n\n\nNew lines of conversation:\nHuman: share
|
||||
your take on AI Agents\n\nThis is the context you are working with:\nI heard
|
||||
you hate them\nAI: As a technology researcher, it''s important to maintain objectivity.
|
||||
AI agents have their own merits and demerits. On the positive side, they can
|
||||
automate routine tasks, improve efficiency, and enable new forms of communication
|
||||
and decision-making. However, there are potential downsides, like job displacement
|
||||
due to automation and concerns about privacy and security. It''s not accurate
|
||||
to say that I hate them, but rather, I recognize the potential implications
|
||||
- both positive and negative - of their use.\n\nNew summary:"}], "model": "gpt-4",
|
||||
"max_tokens": null, "stream": false, "n": 1, "temperature": 0.7}'
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer 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
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1475'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Cookie:
|
||||
- __cf_bm=Kok7joFOxdnT4Rx42sui.msFN7jEZTBCOWV7KIuNoRU-1699496258-0-AWKfmFHxH6JvrxGRge6CrVDGH8NMMnlPoiNxVrU67tDkND02pVJemu65mT6VtMZ2t9HbOQUO+GHsKxUfpQh3BXI=
|
||||
User-Agent:
|
||||
- OpenAI/v1 PythonBindings/0.28.1
|
||||
X-OpenAI-Client-User-Agent:
|
||||
- '{"bindings_version": "0.28.1", "httplib": "requests", "lang": "python", "lang_version":
|
||||
"3.9.7", "platform": "macOS-10.16-x86_64-i386-64bit", "publisher": "openai",
|
||||
"uname": "Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17
|
||||
PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64"}'
|
||||
method: POST
|
||||
uri: https://api.openai.com/v1/chat/completions
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAAA1RTsW7bQAzd/RWEli6yESepkXjLVg9dmixpUQTUiZYY60jhSDl1gvx7cbIcJ4uA
|
||||
4zuS7717epsBFFwXayhCix5i381vNurDJtzXe7m/271Wd031+Pvh8qc/Hn78KsrcodUzBT91LYLG
|
||||
viNnlSMcEqFTnrpc3d5e364uv9+MQNSautzW9D6/nl+slldTR6scyIo1/JkBALyN38xNavpXrOGi
|
||||
PFUimWFDxfrjEkCRtMuVAs3YHMWL8gwGFScZ6T60BO0QUQBtZ+Atwd0GtpqA3UB7FlYBlVzFhsSt
|
||||
BKzrRGYsDSCkIWoCb9GBHVp0GqfEBTyMs0pAAwSn0Ip22hwgkRGm0FIqISKLI4vB0UHesx8ApQYd
|
||||
vGMhg0q9HXlFSplTBmuaDro9E1vAxoFi36Lx68gC/YxCyBoH14hO4FltCRz7pHsC2m45MEk4lON8
|
||||
Eqw6AqGXbEUc9wSNcRAOmJ91YhHYWGUeccfSlFANDtiZgmi2odfsMmMHtb6IcU0GHe8InrWCmq3v
|
||||
MFAk8ePSPvEew1G9URhStiKoBEpiJzshdJh4yyd97FArmXw7ev/5mTKbREEbmeygT4w49t2kZVTn
|
||||
LXGCwWhRTDl5/wjYloWtfUqEppJDY6798dr7DODvGNjhSwaLPmns/cl1R5JTPAV+DN/p3zijy4ur
|
||||
CXV17M7A1Wo5y1veZ/8BAAD//wMAkERfVZkDAAA=
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 82328f7f6eae013b-GRU
|
||||
Cache-Control:
|
||||
- no-cache, must-revalidate
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 09 Nov 2023 02:17:44 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
access-control-allow-origin:
|
||||
- '*'
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
openai-model:
|
||||
- gpt-4-0613
|
||||
openai-organization:
|
||||
- clearbit-2
|
||||
openai-processing-ms:
|
||||
- '5386'
|
||||
openai-version:
|
||||
- '2020-10-01'
|
||||
strict-transport-security:
|
||||
- max-age=15724800; includeSubDomains
|
||||
x-ratelimit-limit-requests:
|
||||
- '100'
|
||||
x-ratelimit-limit-tokens:
|
||||
- '300000'
|
||||
x-ratelimit-remaining-requests:
|
||||
- '99'
|
||||
x-ratelimit-remaining-tokens:
|
||||
- '299652'
|
||||
x-ratelimit-reset-requests:
|
||||
- 600ms
|
||||
x-ratelimit-reset-tokens:
|
||||
- 69ms
|
||||
x-request-id:
|
||||
- 1a9f4c2a0146fabe806e3bd5a30018d8
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
Reference in New Issue
Block a user