diff --git a/tests/cassettes/test_task_interpolation_with_hyphens.yaml b/tests/cassettes/test_task_interpolation_with_hyphens.yaml index 2cee141db..cb16122ff 100644 --- a/tests/cassettes/test_task_interpolation_with_hyphens.yaml +++ b/tests/cassettes/test_task_interpolation_with_hyphens.yaml @@ -118,4 +118,307 @@ interactions: status: code: 200 message: OK +- request: + body: '{"trace_id": "5f6ab488-3341-4c3b-a53b-6f8097164be5", "execution_type": + "crew", "user_identifier": null, "execution_context": {"crew_fingerprint": null, + "crew_name": "crew", "flow_name": null, "crewai_version": "0.201.1", "privacy_level": + "standard"}, "execution_metadata": {"expected_duration_estimate": 300, "agent_count": + 0, "task_count": 0, "flow_method_count": 0, "execution_started_at": "2025-09-27T03:06:45.644262+00:00"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '428' + Content-Type: + - application/json + User-Agent: + - CrewAI-CLI/0.201.1 + X-Crewai-Version: + - 0.201.1 + method: POST + uri: https://app.crewai.com/crewai_plus/api/v1/tracing/batches + response: + body: + string: '{"error":"bad_credentials","message":"Bad credentials"}' + headers: + Connection: + - keep-alive + Content-Length: + - '55' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 27 Sep 2025 03:06:46 GMT + cache-control: + - no-cache + content-security-policy: + - 'default-src ''self'' *.app.crewai.com app.crewai.com; script-src ''self'' + ''unsafe-inline'' *.app.crewai.com app.crewai.com https://cdn.jsdelivr.net/npm/apexcharts + https://www.gstatic.com https://run.pstmn.io https://js.hubspot.com http://js-na1.hs-scripts.com + https://bat.bing.com https://browser.sentry-cdn.com https://cdn.amplitude.com + https://cdn.segment.com https://d1d3n03t5zntha.cloudfront.net/ https://descriptusercontent.com + https://edge.fullstory.com https://googleads.g.doubleclick.net https://js-na1.hs-scripts.com + https://js.hs-analytics.net https://js.hs-banner.com https://js.hsadspixel.net + https://js.hscollectedforms.net https://js.sentry-cdn.com https://js.usemessages.com + https://snap.licdn.com https://static.cloudflareinsights.com https://static.reo.dev + https://www.google-analytics.com https://www.googletagmanager.com https://share.descript.com/; + style-src ''self'' ''unsafe-inline'' *.app.crewai.com app.crewai.com https://cdn.jsdelivr.net/npm/apexcharts; + img-src ''self'' data: *.app.crewai.com app.crewai.com https://zeus.tools.crewai.com + https://dashboard.tools.crewai.com https://cdn.jsdelivr.net https://forms.hsforms.com + https://track.hubspot.com https://px.ads.linkedin.com https://px4.ads.linkedin.com + https://www.google.com https://www.google.com.br; font-src ''self'' data: + *.app.crewai.com app.crewai.com; connect-src ''self'' *.app.crewai.com app.crewai.com + https://zeus.tools.crewai.com https://connect.useparagon.com/ https://zeus.useparagon.com/* + https://*.useparagon.com/* https://run.pstmn.io https://connect.tools.crewai.com/ + https://www.google-analytics.com https://edge.fullstory.com https://rs.fullstory.com + https://api.hubspot.com https://forms.hscollectedforms.net https://api.hubapi.com + https://px.ads.linkedin.com https://px4.ads.linkedin.com https://google.com/pagead/form-data/16713662509 + https://google.com/ccm/form-data/16713662509 https://www.google.com/ccm/collect + https://*.sentry.io https://worker-actionkit.tools.crewai.com https://api.reo.dev; + frame-src ''self'' *.app.crewai.com app.crewai.com https://connect.useparagon.com/ + https://zeus.tools.crewai.com https://zeus.useparagon.com/* https://connect.tools.crewai.com/ + https://app.hubspot.com/ https://td.doubleclick.net https://www.googletagmanager.com/ + https://www.youtube.com https://share.descript.com' + permissions-policy: + - camera=(), microphone=(self), geolocation=() + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=63072000; includeSubDomains + vary: + - Accept + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-permitted-cross-domain-policies: + - none + x-request-id: + - 4a130798-b41f-47b2-9be0-f44a7cbe2f86 + x-runtime: + - '0.579923' + x-xss-protection: + - 1; mode=block + status: + code: 401 + message: Unauthorized +- request: + body: '{"messages": [{"role": "system", "content": "You are Researcher. You''re + an expert researcher, specialized in technology, software engineering, AI and + startups. You work as a freelancer and is now working on doing research and + analysis for a new customer.\nYour personal goal is: be an assistant that responds + with say hello world\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!"}, {"role": "user", "content": "\nCurrent Task: be an assistant that responds + with say hello world\n\nThis is the expected criteria for your final answer: + The response should be addressing: say hello world\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-mini", "stop": ["\nObservation:"]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '1108' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.109.1 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.109.1 + x-stainless-raw-response: + - 'true' + x-stainless-read-timeout: + - '600.0' + x-stainless-retry-count: + - '1' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.18 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + content: "{\n \"id\": \"chatcmpl-CKFYljfHZHggO8ASADMEl4QRTALpM\",\n \"object\"\ + : \"chat.completion\",\n \"created\": 1758942407,\n \"model\": \"gpt-4o-mini-2024-07-18\"\ + ,\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \ + \ \"role\": \"assistant\",\n \"content\": \"I now can give a great\ + \ answer \\nFinal Answer: Hello World!\",\n \"refusal\": null,\n \ + \ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\"\ + : \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 206,\n \"\ + completion_tokens\": 14,\n \"total_tokens\": 220,\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_560af6e559\"\n}\n" + headers: + CF-RAY: + - 9857c97d481c4a2b-EWR + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Sat, 27 Sep 2025 03:06:47 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=4zmJIIfHBYuE9UWQ6oHNqvfBQmZxQX7GWjHqCK8UO0o-1758942407-1.0.1.1-OnZI3cYQRKIwG0UMIYD1hl0UVb_4XDq6ZlhQfW7rs9EkytvJ.hcVBuLO9uYS065fpZpd0I9epxap9Lr0YVaKHngRZa0SgIWNPacKLJAx3D4; + path=/; expires=Sat, 27-Sep-25 03:36:47 GMT; domain=.api.openai.com; HttpOnly; + Secure; SameSite=None + - _cfuvid=sH9tAbAe1YO9jYpn8JhihVipaOYHGJnXO01xarEg8cY-1758942407818-0.0.1.1-604800000; + path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - REDACTED + openai-processing-ms: + - '373' + openai-project: + - REDACTED + openai-version: + - '2020-10-01' + x-envoy-upstream-service-time: + - '519' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-project-tokens: + - '150000000' + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-project-tokens: + - '149999757' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999757' + x-ratelimit-reset-project-tokens: + - 0s + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_a3d965000b2f4585be1f9d3cc2a534e9 + http_version: HTTP/1.1 + status_code: 200 +- request: + body: '{"status": "failed", "failure_reason": "Error sending events to backend"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '73' + Content-Type: + - application/json + User-Agent: + - CrewAI-CLI/0.201.1 + X-Crewai-Version: + - 0.201.1 + method: PATCH + uri: https://app.crewai.com/crewai_plus/api/v1/tracing/batches/None + response: + body: + string: '{"error":"bad_credentials","message":"Bad credentials"}' + headers: + Connection: + - keep-alive + Content-Length: + - '55' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 27 Sep 2025 03:06:48 GMT + cache-control: + - no-cache + content-security-policy: + - 'default-src ''self'' *.app.crewai.com app.crewai.com; script-src ''self'' + ''unsafe-inline'' *.app.crewai.com app.crewai.com https://cdn.jsdelivr.net/npm/apexcharts + https://www.gstatic.com https://run.pstmn.io https://js.hubspot.com http://js-na1.hs-scripts.com + https://bat.bing.com https://browser.sentry-cdn.com https://cdn.amplitude.com + https://cdn.segment.com https://d1d3n03t5zntha.cloudfront.net/ https://descriptusercontent.com + https://edge.fullstory.com https://googleads.g.doubleclick.net https://js-na1.hs-scripts.com + https://js.hs-analytics.net https://js.hs-banner.com https://js.hsadspixel.net + https://js.hscollectedforms.net https://js.sentry-cdn.com https://js.usemessages.com + https://snap.licdn.com https://static.cloudflareinsights.com https://static.reo.dev + https://www.google-analytics.com https://www.googletagmanager.com https://share.descript.com/; + style-src ''self'' ''unsafe-inline'' *.app.crewai.com app.crewai.com https://cdn.jsdelivr.net/npm/apexcharts; + img-src ''self'' data: *.app.crewai.com app.crewai.com https://zeus.tools.crewai.com + https://dashboard.tools.crewai.com https://cdn.jsdelivr.net https://forms.hsforms.com + https://track.hubspot.com https://px.ads.linkedin.com https://px4.ads.linkedin.com + https://www.google.com https://www.google.com.br; font-src ''self'' data: + *.app.crewai.com app.crewai.com; connect-src ''self'' *.app.crewai.com app.crewai.com + https://zeus.tools.crewai.com https://connect.useparagon.com/ https://zeus.useparagon.com/* + https://*.useparagon.com/* https://run.pstmn.io https://connect.tools.crewai.com/ + https://www.google-analytics.com https://edge.fullstory.com https://rs.fullstory.com + https://api.hubspot.com https://forms.hscollectedforms.net https://api.hubapi.com + https://px.ads.linkedin.com https://px4.ads.linkedin.com https://google.com/pagead/form-data/16713662509 + https://google.com/ccm/form-data/16713662509 https://www.google.com/ccm/collect + https://*.sentry.io https://worker-actionkit.tools.crewai.com https://api.reo.dev; + frame-src ''self'' *.app.crewai.com app.crewai.com https://connect.useparagon.com/ + https://zeus.tools.crewai.com https://zeus.useparagon.com/* https://connect.tools.crewai.com/ + https://app.hubspot.com/ https://td.doubleclick.net https://www.googletagmanager.com/ + https://www.youtube.com https://share.descript.com' + permissions-policy: + - camera=(), microphone=(self), geolocation=() + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=63072000; includeSubDomains + vary: + - Accept + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-permitted-cross-domain-policies: + - none + x-request-id: + - 5ec4ebae-481c-49e7-b81d-2ed2c0e16814 + x-runtime: + - '0.346755' + x-xss-protection: + - 1; mode=block + status: + code: 401 + message: Unauthorized version: 1 diff --git a/tests/test_task.py b/tests/test_task.py index 0e304df54..bc43b6b69 100644 --- a/tests/test_task.py +++ b/tests/test_task.py @@ -1634,4 +1634,4 @@ def test_task_interpolation_with_hyphens(): result = crew.kickoff(inputs={"interpolation-with-hyphens": "say hello world"}) assert "say hello world" in task.prompt() - assert result.raw == "Hello, World!" + assert result.raw == "Hello World!"