Files
crewAI/lib/crewai/tests/cassettes/TestCrewMultimodalOpenAIResponses.test_pdf_file[openai-o4-mini-responses].yaml
Greyson LaLonde c4c9208229 feat: native multimodal file handling; openai responses api
- add input_files parameter to Crew.kickoff(), Flow.kickoff(), Task, and Agent.kickoff()
- add provider-specific file uploaders for OpenAI, Anthropic, Gemini, and Bedrock
- add file type detection, constraint validation, and automatic format conversion
- add URL file source support for multimodal content
- add streaming uploads for large files
- add prompt caching support for Anthropic
- add OpenAI Responses API support
2026-01-23 15:13:25 -05:00

137 lines
6.4 KiB
YAML

interactions:
- request:
body: '{"input":[{"role":"user","content":[{"type":"input_text","text":"\nCurrent
Task: Describe the file(s) you see. Be brief, one sentence max.\n\nInput files
(content already loaded in conversation):\n - \"document\" (document)\n\nThis
is the expected criteria for your final answer: A brief description of the file.\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:"},{"type":"input_file","filename":"document.pdf","file_data":"data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iaiA8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4gZW5kb2JqCjIgMCBvYmogPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4gZW5kb2JqCjMgMCBvYmogPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PiBlbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmCjAwMDAwMDAwMDkgMDAwMDAgbgowMDAwMDAwMDU4IDAwMDAwIG4KMDAwMDAwMDExNSAwMDAwMCBuCnRyYWlsZXIgPDwgL1NpemUgNCAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKMTk2CiUlRU9GCg=="}]}],"model":"o4-mini","instructions":"You
are File Analyst. Expert at analyzing various file types.\nYour personal goal
is: Analyze and describe files accurately\nTo give my best complete final answer
to the task respond using 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!"}'
headers:
User-Agent:
- X-USER-AGENT-XXX
accept:
- application/json
accept-encoding:
- ACCEPT-ENCODING-XXX
authorization:
- AUTHORIZATION-XXX
connection:
- keep-alive
content-length:
- '1522'
content-type:
- application/json
host:
- api.openai.com
x-stainless-arch:
- X-STAINLESS-ARCH-XXX
x-stainless-async:
- 'false'
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.12.10
method: POST
uri: https://api.openai.com/v1/responses
response:
body:
string: "{\n \"id\": \"resp_0f3ca1e8c567449a006973c75772f48196b33478c88491c2b2\",\n
\ \"object\": \"response\",\n \"created_at\": 1769195351,\n \"status\":
\"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\":
\"developer\"\n },\n \"completed_at\": 1769195360,\n \"error\": null,\n
\ \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\":
\"You are File Analyst. Expert at analyzing various file types.\\nYour personal
goal is: Analyze and describe files accurately\\nTo give my best complete
final answer to the task respond using 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!\",\n \"max_output_tokens\":
null,\n \"max_tool_calls\": null,\n \"model\": \"o4-mini-2025-04-16\",\n
\ \"output\": [\n {\n \"id\": \"rs_0f3ca1e8c567449a006973c757d264819686b5a624e57d0f3c\",\n
\ \"type\": \"reasoning\",\n \"summary\": []\n },\n {\n \"id\":
\"msg_0f3ca1e8c567449a006973c76063ac8196b09e99c8ddefb880\",\n \"type\":
\"message\",\n \"status\": \"completed\",\n \"content\": [\n {\n
\ \"type\": \"output_text\",\n \"annotations\": [],\n \"logprobs\":
[],\n \"text\": \"Thought: I now can give a great answer \\nFinal
Answer: The file named \\u201cdocument\\u201d is a multi-page PDF document
containing formatted text and embedded images.\"\n }\n ],\n \"role\":
\"assistant\"\n }\n ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\":
0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\":
null,\n \"reasoning\": {\n \"effort\": \"medium\",\n \"summary\": null\n
\ },\n \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\":
true,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\":
\"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\":
\"auto\",\n \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\":
\"disabled\",\n \"usage\": {\n \"input_tokens\": 196,\n \"input_tokens_details\":
{\n \"cached_tokens\": 0\n },\n \"output_tokens\": 998,\n \"output_tokens_details\":
{\n \"reasoning_tokens\": 960\n },\n \"total_tokens\": 1194\n },\n
\ \"user\": null,\n \"metadata\": {}\n}"
headers:
CF-RAY:
- CF-RAY-XXX
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Fri, 23 Jan 2026 19:09:20 GMT
Server:
- cloudflare
Set-Cookie:
- SET-COOKIE-XXX
Strict-Transport-Security:
- STS-XXX
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- X-CONTENT-TYPE-XXX
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
openai-organization:
- OPENAI-ORG-XXX
openai-processing-ms:
- '9524'
openai-project:
- OPENAI-PROJECT-XXX
openai-version:
- '2020-10-01'
x-envoy-upstream-service-time:
- '9527'
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