diff --git a/pyproject.toml b/pyproject.toml index 26fe4a6b5..a8d0b8c47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ # Core Dependencies "pydantic>=2.4.2", "openai>=1.13.3", - "litellm==1.57.4", + "litellm==1.59.8", "instructor>=1.3.3", # Text Processing "pdfplumber>=0.11.4", diff --git "a/tests/cassettes/test_agent_tool_role_matching[ \"Futel Official Infopoint\" -True].yaml" "b/tests/cassettes/test_agent_tool_role_matching[ \"Futel Official Infopoint\" -True].yaml" deleted file mode 100644 index 99c9d5ea2..000000000 --- "a/tests/cassettes/test_agent_tool_role_matching[ \"Futel Official Infopoint\" -True].yaml" +++ /dev/null @@ -1,117 +0,0 @@ -interactions: -- request: - body: '{"messages": [{"role": "system", "content": "You are Futel Official Infopoint. - Futel Football Club info\nYour personal goal is: Answer questions about Futel\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: Test task\n\nThis is the expect criteria for your - final answer: Your best answer to your coworker asking you this, accounting - for the context shared.\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", "stop": ["\nObservation:"], "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '939' - content-type: - - application/json - cookie: - - __cf_bm=cwWdOaPJjFMNJaLtJfa8Kjqavswg5bzVRFzBX4gneGw-1736458417-1.0.1.1-bvf2HshgcMtgn7GdxqwySFDAIacGccDFfEXniBFTTDmbGMCiIIwf6t2DiwWnBldmUHixwc5kDO9gYs08g.feBA; - _cfuvid=WMw7PSqkYqQOieguBRs0uNkwNU92A.ZKbgDbCAcV3EQ-1736458417825-0.0.1.1-604800000 - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - arm64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - MacOS - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AnuRlxiTxduAVoXHHY58Fvfbll5IS\",\n \"object\": - \"chat.completion\",\n \"created\": 1736458417,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: This is a test task, and the context or question from the coworker is - not specified. Therefore, my best effort would be to affirm my readiness to - answer accurately and in detail any question about Futel Football Club based - on the context described. If provided with specific information or questions, - I will ensure to respond comprehensively as required by my job directives.\",\n - \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 177,\n \"completion_tokens\": - 82,\n \"total_tokens\": 259,\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 \"system_fingerprint\": - \"fp_703d4ff298\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8ff78bf7bd6cc002-ATL - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 09 Jan 2025 21:33:40 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '2263' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29999786' - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_7c1a31da73cd103e9f410f908e59187f - http_version: HTTP/1.1 - status_code: 200 -version: 1 diff --git "a/tests/cassettes/test_agent_tool_role_matching[ FUTEL\\nOFFICIAL INFOPOINT -True].yaml" "b/tests/cassettes/test_agent_tool_role_matching[ FUTEL\\nOFFICIAL INFOPOINT -True].yaml" deleted file mode 100644 index 25129c6c8..000000000 --- "a/tests/cassettes/test_agent_tool_role_matching[ FUTEL\\nOFFICIAL INFOPOINT -True].yaml" +++ /dev/null @@ -1,119 +0,0 @@ -interactions: -- request: - body: '{"messages": [{"role": "system", "content": "You are Futel Official Infopoint. - Futel Football Club info\nYour personal goal is: Answer questions about Futel\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: Test task\n\nThis is the expect criteria for your - final answer: Your best answer to your coworker asking you this, accounting - for the context shared.\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", "stop": ["\nObservation:"], "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '939' - content-type: - - application/json - cookie: - - __cf_bm=cwWdOaPJjFMNJaLtJfa8Kjqavswg5bzVRFzBX4gneGw-1736458417-1.0.1.1-bvf2HshgcMtgn7GdxqwySFDAIacGccDFfEXniBFTTDmbGMCiIIwf6t2DiwWnBldmUHixwc5kDO9gYs08g.feBA; - _cfuvid=WMw7PSqkYqQOieguBRs0uNkwNU92A.ZKbgDbCAcV3EQ-1736458417825-0.0.1.1-604800000 - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - arm64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - MacOS - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AnuRrFJZGKw8cIEshvuW1PKwFZFKs\",\n \"object\": - \"chat.completion\",\n \"created\": 1736458423,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: Although you mentioned this being a \\\"Test task\\\" and haven't provided - a specific question regarding Futel Football Club, your request appears to involve - ensuring accuracy and detail in responses. For a proper answer about Futel, - I'd be ready to provide details about the club's history, management, players, - match schedules, and recent performance statistics. Remember to ask specific - questions to receive a targeted response. If this were a real context where - information was shared, I would respond precisely to what's been asked regarding - Futel Football Club.\",\n \"refusal\": null\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 177,\n \"completion_tokens\": 113,\n \"total_tokens\": 290,\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 \"system_fingerprint\": - \"fp_703d4ff298\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8ff78c1d0ecdc002-ATL - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 09 Jan 2025 21:33:47 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '3097' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29999786' - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_179e1d56e2b17303e40480baffbc7b08 - http_version: HTTP/1.1 - status_code: 200 -version: 1 diff --git "a/tests/cassettes/test_agent_tool_role_matching[\"Futel Official Infopoint\"-True].yaml" "b/tests/cassettes/test_agent_tool_role_matching[\"Futel Official Infopoint\"-True].yaml" deleted file mode 100644 index 57705d771..000000000 --- "a/tests/cassettes/test_agent_tool_role_matching[\"Futel Official Infopoint\"-True].yaml" +++ /dev/null @@ -1,114 +0,0 @@ -interactions: -- request: - body: '{"messages": [{"role": "system", "content": "You are Futel Official Infopoint. - Futel Football Club info\nYour personal goal is: Answer questions about Futel\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: Test task\n\nThis is the expect criteria for your - final answer: Your best answer to your coworker asking you this, accounting - for the context shared.\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", "stop": ["\nObservation:"], "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '939' - content-type: - - application/json - cookie: - - __cf_bm=cwWdOaPJjFMNJaLtJfa8Kjqavswg5bzVRFzBX4gneGw-1736458417-1.0.1.1-bvf2HshgcMtgn7GdxqwySFDAIacGccDFfEXniBFTTDmbGMCiIIwf6t2DiwWnBldmUHixwc5kDO9gYs08g.feBA; - _cfuvid=WMw7PSqkYqQOieguBRs0uNkwNU92A.ZKbgDbCAcV3EQ-1736458417825-0.0.1.1-604800000 - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - arm64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - MacOS - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AnuRqgg7eiHnDi2DOqdk99fiqOboz\",\n \"object\": - \"chat.completion\",\n \"created\": 1736458422,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: Your best answer to your coworker asking you this, accounting for the - context shared. You MUST return the actual complete content as the final answer, - not a summary.\",\n \"refusal\": null\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 177,\n \"completion_tokens\": 44,\n \"total_tokens\": 221,\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 \"system_fingerprint\": - \"fp_703d4ff298\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8ff78c164ad2c002-ATL - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 09 Jan 2025 21:33:43 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '899' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29999786' - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_9f5226208edb90a27987aaf7e0ca03d3 - http_version: HTTP/1.1 - status_code: 200 -version: 1 diff --git a/tests/cassettes/test_agent_tool_role_matching[Futel Official Infopoint-True].yaml b/tests/cassettes/test_agent_tool_role_matching[Futel Official Infopoint-True].yaml deleted file mode 100644 index f9163dd91..000000000 --- a/tests/cassettes/test_agent_tool_role_matching[Futel Official Infopoint-True].yaml +++ /dev/null @@ -1,119 +0,0 @@ -interactions: -- request: - body: '{"messages": [{"role": "system", "content": "You are Futel Official Infopoint. - Futel Football Club info\nYour personal goal is: Answer questions about Futel\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: Test task\n\nThis is the expect criteria for your - final answer: Your best answer to your coworker asking you this, accounting - for the context shared.\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", "stop": ["\nObservation:"], "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '939' - content-type: - - application/json - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - arm64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - MacOS - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AnuRjmwH5mrykLxQhFwTqqTiDtuTf\",\n \"object\": - \"chat.completion\",\n \"created\": 1736458415,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: As this is a test task, please note that Futel Football Club is fictional - and any specific details about it would not be available. However, if you have - specific questions or need information about a particular aspect of Futel or - any general football club inquiry, feel free to ask, and I'll do my best to - assist you with your query!\",\n \"refusal\": null\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 177,\n \"completion_tokens\": 79,\n \"total_tokens\": 256,\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 \"system_fingerprint\": - \"fp_703d4ff298\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8ff78be5eebfc002-ATL - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 09 Jan 2025 21:33:37 GMT - Server: - - cloudflare - Set-Cookie: - - __cf_bm=cwWdOaPJjFMNJaLtJfa8Kjqavswg5bzVRFzBX4gneGw-1736458417-1.0.1.1-bvf2HshgcMtgn7GdxqwySFDAIacGccDFfEXniBFTTDmbGMCiIIwf6t2DiwWnBldmUHixwc5kDO9gYs08g.feBA; - path=/; expires=Thu, 09-Jan-25 22:03:37 GMT; domain=.api.openai.com; HttpOnly; - Secure; SameSite=None - - _cfuvid=WMw7PSqkYqQOieguBRs0uNkwNU92A.ZKbgDbCAcV3EQ-1736458417825-0.0.1.1-604800000; - path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '2730' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29999786' - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_014478ba748f860d10ac250ca0ba824a - http_version: HTTP/1.1 - status_code: 200 -version: 1 diff --git "a/tests/cassettes/test_agent_tool_role_matching[Futel Official Infopoint\\n-True].yaml" "b/tests/cassettes/test_agent_tool_role_matching[Futel Official Infopoint\\n-True].yaml" deleted file mode 100644 index e093f57f8..000000000 --- "a/tests/cassettes/test_agent_tool_role_matching[Futel Official Infopoint\\n-True].yaml" +++ /dev/null @@ -1,119 +0,0 @@ -interactions: -- request: - body: '{"messages": [{"role": "system", "content": "You are Futel Official Infopoint. - Futel Football Club info\nYour personal goal is: Answer questions about Futel\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: Test task\n\nThis is the expect criteria for your - final answer: Your best answer to your coworker asking you this, accounting - for the context shared.\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", "stop": ["\nObservation:"], "stream": false}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '939' - content-type: - - application/json - cookie: - - __cf_bm=cwWdOaPJjFMNJaLtJfa8Kjqavswg5bzVRFzBX4gneGw-1736458417-1.0.1.1-bvf2HshgcMtgn7GdxqwySFDAIacGccDFfEXniBFTTDmbGMCiIIwf6t2DiwWnBldmUHixwc5kDO9gYs08g.feBA; - _cfuvid=WMw7PSqkYqQOieguBRs0uNkwNU92A.ZKbgDbCAcV3EQ-1736458417825-0.0.1.1-604800000 - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.52.1 - x-stainless-arch: - - arm64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - MacOS - x-stainless-package-version: - - 1.52.1 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.12.7 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - content: "{\n \"id\": \"chatcmpl-AnuRofLgmzWcDya5LILqYwIJYgFoq\",\n \"object\": - \"chat.completion\",\n \"created\": 1736458420,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"I now can give a great answer \\nFinal - Answer: As an official Futel Football Club infopoint, my responsibility is to - provide detailed and accurate information about the club. This includes answering - questions regarding team statistics, player performances, upcoming fixtures, - ticketing and fan zone details, club history, and community initiatives. Our - focus is to ensure that fans and stakeholders have access to the latest and - most precise information about the club's on and off-pitch activities. If there's - anything specific you need to know, just let me know, and I'll be more than - happy to assist!\",\n \"refusal\": null\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 177,\n \"completion_tokens\": 115,\n \"total_tokens\": 292,\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 \"system_fingerprint\": - \"fp_703d4ff298\"\n}\n" - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8ff78c066f37c002-ATL - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 09 Jan 2025 21:33:42 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - openai-organization: - - crewai-iuxna1 - openai-processing-ms: - - '2459' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29999786' - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_a146dd27f040f39a576750970cca0f52 - http_version: HTTP/1.1 - status_code: 200 -version: 1 diff --git a/tests/test_manager_llm_delegation.py b/tests/test_manager_llm_delegation.py deleted file mode 100644 index 0cab92d43..000000000 --- a/tests/test_manager_llm_delegation.py +++ /dev/null @@ -1,51 +0,0 @@ -import pytest - -from crewai import Agent -from crewai.tools.agent_tools.base_agent_tools import BaseAgentTool - - -class InternalAgentTool(BaseAgentTool): - """Concrete implementation of BaseAgentTool for testing.""" - - def _run(self, *args, **kwargs): - """Implement required _run method.""" - return "Test response" - - -@pytest.mark.parametrize( - "role_name,should_match", - [ - ("Futel Official Infopoint", True), # exact match - (' "Futel Official Infopoint" ', True), # extra quotes and spaces - ("Futel Official Infopoint\n", True), # trailing newline - ('"Futel Official Infopoint"', True), # embedded quotes - (" FUTEL\nOFFICIAL INFOPOINT ", True), # multiple whitespace and newline - ], -) -@pytest.mark.vcr(filter_headers=["authorization"]) -def test_agent_tool_role_matching(role_name, should_match): - """Test that agent tools can match roles regardless of case, whitespace, and special characters.""" - # Create test agent - test_agent = Agent( - role="Futel Official Infopoint", - goal="Answer questions about Futel", - backstory="Futel Football Club info", - allow_delegation=False, - ) - - # Create test agent tool - agent_tool = InternalAgentTool( - name="test_tool", description="Test tool", agents=[test_agent] - ) - - # Test role matching - result = agent_tool._execute(agent_name=role_name, task="Test task", context=None) - - if should_match: - assert ( - "coworker mentioned not found" not in result.lower() - ), f"Should find agent with role name: {role_name}" - else: - assert ( - "coworker mentioned not found" in result.lower() - ), f"Should not find agent with role name: {role_name}" diff --git a/uv.lock b/uv.lock index 41bbd7a64..3ba4e0212 100644 --- a/uv.lock +++ b/uv.lock @@ -740,7 +740,7 @@ requires-dist = [ { name = "json-repair", specifier = ">=0.25.2" }, { name = "json5", specifier = ">=0.10.0" }, { name = "jsonref", specifier = ">=1.1.0" }, - { name = "litellm", specifier = "==1.57.4" }, + { name = "litellm", specifier = "==1.59.8" }, { name = "mem0ai", marker = "extra == 'mem0'", specifier = ">=0.1.29" }, { name = "openai", specifier = ">=1.13.3" }, { name = "openpyxl", specifier = ">=3.1.5" }, @@ -2374,7 +2374,7 @@ wheels = [ [[package]] name = "litellm" -version = "1.57.4" +version = "1.59.8" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohttp" }, @@ -2389,9 +2389,9 @@ dependencies = [ { name = "tiktoken" }, { name = "tokenizers" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/1a/9a/115bde058901b087e7fec1bed4be47baf8d5c78aff7dd2ffebcb922003ff/litellm-1.57.4.tar.gz", hash = "sha256:747a870ddee9c71f9560fc68ad02485bc1008fcad7d7a43e87867a59b8ed0669", size = 6304427 } +sdist = { url = "https://files.pythonhosted.org/packages/86/b0/c8ec06bd1c87a92d6d824008982b3c82b450d7bd3be850a53913f1ac4907/litellm-1.59.8.tar.gz", hash = "sha256:9d645cc4460f6a9813061f07086648c4c3d22febc8e1f21c663f2b7750d90512", size = 6428607 } wheels = [ - { url = "https://files.pythonhosted.org/packages/9f/72/35c8509cb2a37343c213b794420405cbef2e1fdf8626ee981fcbba3d7c5c/litellm-1.57.4-py3-none-any.whl", hash = "sha256:afe48924d8a36db801018970a101622fce33d117fe9c54441c0095c491511abb", size = 6592126 }, + { url = "https://files.pythonhosted.org/packages/b9/38/889da058f566ef9ea321aafa25e423249492cf2a508dfdc0e5acfcf04526/litellm-1.59.8-py3-none-any.whl", hash = "sha256:2473914bd2343485a185dfe7eedb12ee5fda32da3c9d9a8b73f6966b9b20cf39", size = 6716233 }, ] [[package]]