mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-21 05:48:14 +00:00
257 lines
10 KiB
YAML
257 lines
10 KiB
YAML
interactions:
|
|
- request:
|
|
body: '{"messages":[{"role":"system","content":"Ensure your final answer strictly
|
|
adheres to the following OpenAPI schema: {\n \"type\": \"json_schema\",\n \"json_schema\":
|
|
{\n \"name\": \"LLMGuardrailResult\",\n \"strict\": true,\n \"schema\":
|
|
{\n \"properties\": {\n \"valid\": {\n \"description\":
|
|
\"Whether the task output complies with the guardrail\",\n \"title\":
|
|
\"Valid\",\n \"type\": \"boolean\"\n },\n \"feedback\":
|
|
{\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\":
|
|
\"null\"\n }\n ],\n \"default\": null,\n \"description\":
|
|
\"A feedback about the task output if it is not valid\",\n \"title\":
|
|
\"Feedback\"\n }\n },\n \"required\": [\n \"valid\",\n \"feedback\"\n ],\n \"title\":
|
|
\"LLMGuardrailResult\",\n \"type\": \"object\",\n \"additionalProperties\":
|
|
false\n }\n }\n}\n\nDo not include the OpenAPI schema in the final output.
|
|
Ensure the final output does not include any code block markers like ```json
|
|
or ```python."},{"role":"user","content":"{\"valid\":false,\"feedback\":\"The
|
|
task result has more than 10 words. It violates the guardrail requirement of
|
|
having less than 10 words.\"}"}],"model":"gpt-4o","response_format":{"type":"json_schema","json_schema":{"schema":{"properties":{"valid":{"description":"Whether
|
|
the task output complies with the guardrail","title":"Valid","type":"boolean"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A
|
|
feedback about the task output if it is not valid","title":"Feedback"}},"required":["valid","feedback"],"title":"LLMGuardrailResult","type":"object","additionalProperties":false},"name":"LLMGuardrailResult","strict":true}},"stream":false}'
|
|
headers:
|
|
User-Agent:
|
|
- X-USER-AGENT-XXX
|
|
accept:
|
|
- application/json
|
|
accept-encoding:
|
|
- ACCEPT-ENCODING-XXX
|
|
authorization:
|
|
- AUTHORIZATION-XXX
|
|
connection:
|
|
- keep-alive
|
|
content-length:
|
|
- '1867'
|
|
content-type:
|
|
- application/json
|
|
cookie:
|
|
- COOKIE-XXX
|
|
host:
|
|
- api.openai.com
|
|
x-stainless-arch:
|
|
- X-STAINLESS-ARCH-XXX
|
|
x-stainless-async:
|
|
- 'false'
|
|
x-stainless-helper-method:
|
|
- beta.chat.completions.parse
|
|
x-stainless-lang:
|
|
- python
|
|
x-stainless-os:
|
|
- X-STAINLESS-OS-XXX
|
|
x-stainless-package-version:
|
|
- 1.83.0
|
|
x-stainless-read-timeout:
|
|
- X-STAINLESS-READ-TIMEOUT-XXX
|
|
x-stainless-retry-count:
|
|
- '0'
|
|
x-stainless-runtime:
|
|
- CPython
|
|
x-stainless-runtime-version:
|
|
- 3.13.3
|
|
method: POST
|
|
uri: https://api.openai.com/v1/chat/completions
|
|
response:
|
|
body:
|
|
string: "{\n \"id\": \"chatcmpl-Cy5PPD1uYxgIbXU5hMI4xS5PK4Swt\",\n \"object\":
|
|
\"chat.completion\",\n \"created\": 1768436507,\n \"model\": \"gpt-4o-2024-08-06\",\n
|
|
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
|
\"assistant\",\n \"content\": \"{\\\"valid\\\":false,\\\"feedback\\\":\\\"The
|
|
task result has more than 10 words. It violates the guardrail requirement
|
|
of having less than 10 words.\\\"}\",\n \"refusal\": null,\n \"annotations\":
|
|
[]\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n
|
|
\ }\n ],\n \"usage\": {\n \"prompt_tokens\": 369,\n \"completion_tokens\":
|
|
32,\n \"total_tokens\": 401,\n \"prompt_tokens_details\": {\n \"cached_tokens\":
|
|
0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\":
|
|
{\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\":
|
|
0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\":
|
|
\"default\",\n \"system_fingerprint\": \"fp_a0e9480a2f\"\n}\n"
|
|
headers:
|
|
CF-RAY:
|
|
- CF-RAY-XXX
|
|
Connection:
|
|
- keep-alive
|
|
Content-Type:
|
|
- application/json
|
|
Date:
|
|
- Thu, 15 Jan 2026 00:21:47 GMT
|
|
Server:
|
|
- cloudflare
|
|
Strict-Transport-Security:
|
|
- STS-XXX
|
|
Transfer-Encoding:
|
|
- chunked
|
|
X-Content-Type-Options:
|
|
- X-CONTENT-TYPE-XXX
|
|
access-control-expose-headers:
|
|
- ACCESS-CONTROL-XXX
|
|
alt-svc:
|
|
- h3=":443"; ma=86400
|
|
cf-cache-status:
|
|
- DYNAMIC
|
|
content-length:
|
|
- '946'
|
|
openai-organization:
|
|
- OPENAI-ORG-XXX
|
|
openai-processing-ms:
|
|
- '463'
|
|
openai-project:
|
|
- OPENAI-PROJECT-XXX
|
|
openai-version:
|
|
- '2020-10-01'
|
|
x-envoy-upstream-service-time:
|
|
- '671'
|
|
x-openai-proxy-wasm:
|
|
- v0.1
|
|
x-ratelimit-limit-requests:
|
|
- X-RATELIMIT-LIMIT-REQUESTS-XXX
|
|
x-ratelimit-limit-tokens:
|
|
- X-RATELIMIT-LIMIT-TOKENS-XXX
|
|
x-ratelimit-remaining-requests:
|
|
- X-RATELIMIT-REMAINING-REQUESTS-XXX
|
|
x-ratelimit-remaining-tokens:
|
|
- X-RATELIMIT-REMAINING-TOKENS-XXX
|
|
x-ratelimit-reset-requests:
|
|
- X-RATELIMIT-RESET-REQUESTS-XXX
|
|
x-ratelimit-reset-tokens:
|
|
- X-RATELIMIT-RESET-TOKENS-XXX
|
|
x-request-id:
|
|
- X-REQUEST-ID-XXX
|
|
status:
|
|
code: 200
|
|
message: OK
|
|
- request:
|
|
body: '{"messages":[{"role":"system","content":"Ensure your final answer strictly
|
|
adheres to the following OpenAPI schema: {\n \"type\": \"json_schema\",\n \"json_schema\":
|
|
{\n \"name\": \"LLMGuardrailResult\",\n \"strict\": true,\n \"schema\":
|
|
{\n \"properties\": {\n \"valid\": {\n \"description\":
|
|
\"Whether the task output complies with the guardrail\",\n \"title\":
|
|
\"Valid\",\n \"type\": \"boolean\"\n },\n \"feedback\":
|
|
{\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\":
|
|
\"null\"\n }\n ],\n \"default\": null,\n \"description\":
|
|
\"A feedback about the task output if it is not valid\",\n \"title\":
|
|
\"Feedback\"\n }\n },\n \"required\": [\n \"valid\",\n \"feedback\"\n ],\n \"title\":
|
|
\"LLMGuardrailResult\",\n \"type\": \"object\",\n \"additionalProperties\":
|
|
false\n }\n }\n}\n\nDo not include the OpenAPI schema in the final output.
|
|
Ensure the final output does not include any code block markers like ```json
|
|
or ```python."},{"role":"user","content":"{\"valid\":true,\"feedback\":null}"}],"model":"gpt-4o","response_format":{"type":"json_schema","json_schema":{"schema":{"properties":{"valid":{"description":"Whether
|
|
the task output complies with the guardrail","title":"Valid","type":"boolean"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A
|
|
feedback about the task output if it is not valid","title":"Feedback"}},"required":["valid","feedback"],"title":"LLMGuardrailResult","type":"object","additionalProperties":false},"name":"LLMGuardrailResult","strict":true}},"stream":false}'
|
|
headers:
|
|
User-Agent:
|
|
- X-USER-AGENT-XXX
|
|
accept:
|
|
- application/json
|
|
accept-encoding:
|
|
- ACCEPT-ENCODING-XXX
|
|
authorization:
|
|
- AUTHORIZATION-XXX
|
|
connection:
|
|
- keep-alive
|
|
content-length:
|
|
- '1759'
|
|
content-type:
|
|
- application/json
|
|
cookie:
|
|
- COOKIE-XXX
|
|
host:
|
|
- api.openai.com
|
|
x-stainless-arch:
|
|
- X-STAINLESS-ARCH-XXX
|
|
x-stainless-async:
|
|
- 'false'
|
|
x-stainless-helper-method:
|
|
- beta.chat.completions.parse
|
|
x-stainless-lang:
|
|
- python
|
|
x-stainless-os:
|
|
- X-STAINLESS-OS-XXX
|
|
x-stainless-package-version:
|
|
- 1.83.0
|
|
x-stainless-read-timeout:
|
|
- X-STAINLESS-READ-TIMEOUT-XXX
|
|
x-stainless-retry-count:
|
|
- '0'
|
|
x-stainless-runtime:
|
|
- CPython
|
|
x-stainless-runtime-version:
|
|
- 3.13.3
|
|
method: POST
|
|
uri: https://api.openai.com/v1/chat/completions
|
|
response:
|
|
body:
|
|
string: "{\n \"id\": \"chatcmpl-Cy5PQkMg7YJYa44FYy6Wb04G3qmx4\",\n \"object\":
|
|
\"chat.completion\",\n \"created\": 1768436508,\n \"model\": \"gpt-4o-2024-08-06\",\n
|
|
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
|
|
\"assistant\",\n \"content\": \"{\\\"valid\\\":true,\\\"feedback\\\":null}\",\n
|
|
\ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\":
|
|
null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
|
|
346,\n \"completion_tokens\": 9,\n \"total_tokens\": 355,\n \"prompt_tokens_details\":
|
|
{\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\":
|
|
{\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\":
|
|
0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\":
|
|
\"default\",\n \"system_fingerprint\": \"fp_a0e9480a2f\"\n}\n"
|
|
headers:
|
|
CF-RAY:
|
|
- CF-RAY-XXX
|
|
Connection:
|
|
- keep-alive
|
|
Content-Type:
|
|
- application/json
|
|
Date:
|
|
- Thu, 15 Jan 2026 00:21:48 GMT
|
|
Server:
|
|
- cloudflare
|
|
Strict-Transport-Security:
|
|
- STS-XXX
|
|
Transfer-Encoding:
|
|
- chunked
|
|
X-Content-Type-Options:
|
|
- X-CONTENT-TYPE-XXX
|
|
access-control-expose-headers:
|
|
- ACCESS-CONTROL-XXX
|
|
alt-svc:
|
|
- h3=":443"; ma=86400
|
|
cf-cache-status:
|
|
- DYNAMIC
|
|
content-length:
|
|
- '837'
|
|
openai-organization:
|
|
- OPENAI-ORG-XXX
|
|
openai-processing-ms:
|
|
- '316'
|
|
openai-project:
|
|
- OPENAI-PROJECT-XXX
|
|
openai-version:
|
|
- '2020-10-01'
|
|
x-envoy-upstream-service-time:
|
|
- '349'
|
|
x-openai-proxy-wasm:
|
|
- v0.1
|
|
x-ratelimit-limit-requests:
|
|
- X-RATELIMIT-LIMIT-REQUESTS-XXX
|
|
x-ratelimit-limit-tokens:
|
|
- X-RATELIMIT-LIMIT-TOKENS-XXX
|
|
x-ratelimit-remaining-requests:
|
|
- X-RATELIMIT-REMAINING-REQUESTS-XXX
|
|
x-ratelimit-remaining-tokens:
|
|
- X-RATELIMIT-REMAINING-TOKENS-XXX
|
|
x-ratelimit-reset-requests:
|
|
- X-RATELIMIT-RESET-REQUESTS-XXX
|
|
x-ratelimit-reset-tokens:
|
|
- X-RATELIMIT-RESET-TOKENS-XXX
|
|
x-request-id:
|
|
- X-REQUEST-ID-XXX
|
|
status:
|
|
code: 200
|
|
message: OK
|
|
version: 1
|