From d6acd9c249198b947d31b410dd52962d72306c6d Mon Sep 17 00:00:00 2001 From: "Brandon Hancock (bhancock_ai)" <109994880+bhancockio@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:06:48 -0500 Subject: [PATCH] Trying out timeouts (#1840) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Make tests green again * Add Git validations for publishing tools (#1381) This commit prevents tools from being published if the underlying Git repository is unsynced with origin. * fix: JSON encoding date objects (#1374) * Update README (#1376) * Change all instaces of crewAI to CrewAI and fix installation step * Update the example to use YAML format * Update to come after setup and edits * Remove double tool instance * docs: correct miswritten command name (#1365) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Add `--force` option to `crewai tool publish` (#1383) This commit adds an option to bypass Git remote validations when publishing tools. * add plotting to flows documentation (#1394) * Brandon/cre 288 add telemetry to flows (#1391) * Telemetry for flows * store node names * Brandon/cre 291 flow improvements (#1390) * Implement joao feedback * update colors for crew nodes * clean up * more linting clean up * round legend corners --------- Co-authored-by: João Moura * quick fixes (#1385) * quick fixes * add generic name --------- Co-authored-by: João Moura * reduce import time by 6x (#1396) * reduce import by 6x * fix linting * Added version details (#1402) Co-authored-by: João Moura * Update twitter logo to x-twiiter (#1403) * fix task cloning error (#1416) * Migrate docs from MkDocs to Mintlify (#1423) * add new mintlify docs * add favicon.svg * minor edits * add github stats * Fix/logger - fix #1412 (#1413) * improved logger * log file looks better * better lines written to log file --------- Co-authored-by: João Moura * fixing tests * preparing new version * updating init * Preparing new version * Trying to fix linting and other warnings (#1417) * Trying to fix linting * fixing more type issues * clean up ci * more ci fixes --------- Co-authored-by: Eduardo Chiarotti * Feat/poetry to uv migration (#1406) * feat: Start migrating to UV * feat: add uv to flows * feat: update docs on Poetry -> uv * feat: update docs and uv.locl * feat: update tests and github CI * feat: run ruff format * feat: update typechecking * feat: fix type checking * feat: update python version * feat: type checking gic * feat: adapt uv command to run the tool repo * Adapt tool build command to uv * feat: update logic to let only projects with crew to be deployed * feat: add uv to tools * fix; tests * fix: remove breakpoint * fix :test * feat: add crewai update to migrate from poetry to uv * fix: tests * feat: add validation for ˆ character on pyproject * feat: add run_crew to pyproject if doesnt exist * feat: add validation for poetry migration * fix: warning --------- Co-authored-by: Vinicius Brasil * fix: training issue (#1433) * fix: training issue * fix: output from crew * fix: message * Use a slice for the manager request. Make the task use the agent i18n settings (#1446) * Fix Cache Typo in Documentation (#1441) * Correct the role for the message being added to the messages list (#1438) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * fix typo in template file (#1432) * Adapt Tools CLI to uv (#1455) * Adapt Tools CLI to UV * Fix failing test * use the same i18n as the agent for tool usage (#1440) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Upgrade docs to mirror change from `Poetry` to `UV` (#1451) * Update docs to use instead of * Add Flows YouTube tutorial & link images * feat: ADd warning from poetry -> uv (#1458) * feat/updated CLI to allow for model selection & submitting API keys (#1430) * updated CLI to allow for submitting API keys * updated click prompt to remove default number * removed all unnecessary comments * feat: implement crew creation CLI command - refactor code to multiple functions - Added ability for users to select provider and model when uing crewai create command and ave API key to .env * refactered select_choice function for early return * refactored select_provider to have an ealry return * cleanup of comments * refactor/Move functions into utils file, added new provider file and migrated fucntions thre, new constants file + general function refactor * small comment cleanup * fix unnecessary deps --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> Co-authored-by: Brandon Hancock * Fix incorrect parameter name in Vision tool docs page (#1461) Co-authored-by: João Moura * Feat/memory base (#1444) * byom - short/entity memory * better * rm uneeded * fix text * use context * rm dep and sync * type check fix * fixed test using new cassete * fixing types * fixed types * fix types * fixed types * fixing types * fix type * cassette update * just mock the return of short term mem * remove print * try catch block * added docs * dding error handling here * preparing new version * fixing annotations * fix tasks and agents ordering * Avoiding exceptions * feat: add poetry.lock to uv migration (#1468) * fix tool calling issue (#1467) * fix tool calling issue * Update tool type check * Drop print * cutting new version * new verison * Adapt `crewai tool install ` to uv (#1481) This commit updates the tool install comamnd to uv's new custom index feature. Related: https://github.com/astral-sh/uv/pull/7746/ * fix(docs): typo (#1470) * drop unneccesary tests (#1484) * drop uneccesary tests * fix linting * simplify flow (#1482) * simplify flow * propogate changes * Update docs and scripts * Template fix * make flow kickoff sync * Clean up docs * Add Cerebras LLM example configuration to LLM docs (#1488) * ensure original embedding config works (#1476) * ensure original embedding config works * some fixes * raise error on unsupported provider * WIP: brandons notes * fixes * rm prints * fixed docs * fixed run types * updates to add more docs and correct imports with huggingface embedding server enabled --------- Co-authored-by: Brandon Hancock * use copy to split testing and training on crews (#1491) * use copy to split testing and training on crews * make tests handle new copy functionality on train and test * fix last test * fix test * preparing new verison * fix/fixed missing API prompt + CLI docs update (#1464) * updated CLI to allow for submitting API keys * updated click prompt to remove default number * removed all unnecessary comments * feat: implement crew creation CLI command - refactor code to multiple functions - Added ability for users to select provider and model when uing crewai create command and ave API key to .env * refactered select_choice function for early return * refactored select_provider to have an ealry return * cleanup of comments * refactor/Move functions into utils file, added new provider file and migrated fucntions thre, new constants file + general function refactor * small comment cleanup * fix unnecessary deps * Added docs for new CLI provider + fixed missing API prompt * Minor doc updates * allow user to bypass api key entry + incorect number selected logic + ruff formatting * ruff updates * Fix spelling mistake --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> Co-authored-by: Brandon Hancock * chore(readme-fix): fixing step for 'running tests' in the contribution section (#1490) Co-authored-by: Eduardo Chiarotti * support unsafe code execution. add in docker install and running checks. (#1496) * support unsafe code execution. add in docker install and running checks. * Update return type * Fix memory imports for embedding functions (#1497) * updating crewai version * new version * new version * update plot command (#1504) * feat: add tomli so we can support 3.10 (#1506) * feat: add tomli so we can support 3.10 * feat: add validation for poetry data * Forward install command options to `uv sync` (#1510) Allow passing additional options from `crewai install` directly to `uv sync`. This enables commands like `crewai install --locked` to work as expected by forwarding all flags and options to the underlying uv command. * improve tool text description and args (#1512) * improve tool text descriptoin and args * fix lint * Drop print * add back in docstring * Improve tooling docs * Update flow docs to talk about self evaluation example * Update flow docs to talk about self evaluation example * Update flows.mdx - Fix link * Update flows cli to allow you to easily add additional crews to a flow (#1525) * Update flows cli to allow you to easily add additional crews to a flow * fix failing test * adding more error logs to test thats failing * try again * Bugfix/flows with multiple starts plus ands breaking (#1531) * bugfix/flows-with-multiple-starts-plus-ands-breaking * fix user found issue * remove prints * prepare new version * Added security.md file (#1533) * Disable telemetry explicitly (#1536) * Disable telemetry explicitly * fix linting * revert parts to og * Enhance log storage to support more data types (#1530) * Add llm providers accordion group (#1534) * add llm providers accordion group * fix numbering * Replace .netrc with uv environment variables (#1541) This commit replaces .netrc with uv environment variables for installing tools from private repositories. To store credentials, I created a new and reusable settings file for the CLI in `$HOME/.config/crewai/settings.json`. The issue with .netrc files is that they are applied system-wide and are scoped by hostname, meaning we can't differentiate tool repositories requests from regular requests to CrewAI's API. * refactor: Move BaseTool to main package and centralize tool description generation (#1514) * move base_tool to main package and consolidate tool desscription generation * update import path * update tests * update doc * add base_tool test * migrate agent delegation tools to use BaseTool * update tests * update import path for tool * fix lint * update param signature * add from_langchain to BaseTool for backwards support of langchain tools * fix the case where StructuredTool doesn't have func --------- Co-authored-by: c0dez Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Update docs (#1550) * add llm providers accordion group * fix numbering * Fix directory tree & add llms to accordion * Feat/ibm memory (#1549) * Everything looks like its working. Waiting for lorenze review. * Update docs as well. * clean up for PR * add inputs to flows (#1553) * add inputs to flows * fix flows lint * Increase providers fetching timeout * Raise an error if an LLM doesnt return a response (#1548) * docs update (#1558) * add llm providers accordion group * fix numbering * Fix directory tree & add llms to accordion * update crewai enterprise link in docs * Feat/watson in cli (#1535) * getting cli and .env to work together for different models * support new models * clean up prints * Add support for cerebras * Fix watson keys * Fix flows to support cycles and added in test (#1556) * fix missing config (#1557) * making sure we don't check for agents that were not used in the crew * preparing new version * updating LLM docs * preparing new version * curring new version * preparing new version * preparing new version * add missing init * fix LiteLLM callback replacement * fix test_agent_usage_metrics_are_captured_for_hierarchical_process * removing prints * fix: Step callback issue (#1595) * fix: Step callback issue * fix: Add empty thought since its required * Cached prompt tokens on usage metrics * do not include cached on total * Fix crew_train_success test * feat: Reduce level for Bandit and fix code to adapt (#1604) * Add support for retrieving user preferences and memories using Mem0 (#1209) * Integrate Mem0 * Update src/crewai/memory/contextual/contextual_memory.py Co-authored-by: Deshraj Yadav * pending commit for _fetch_user_memories * update poetry.lock * fixes mypy issues * fix mypy checks * New fixes for user_id * remove memory_provider * handle memory_provider * checks for memory_config * add mem0 to dependency * Update pyproject.toml Co-authored-by: Deshraj Yadav * update docs * update doc * bump mem0 version * fix api error msg and mypy issue * mypy fix * resolve comments * fix memory usage without mem0 * mem0 version bump * lazy import mem0 --------- Co-authored-by: Deshraj Yadav Co-authored-by: João Moura Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * upgrade chroma and adjust embedder function generator (#1607) * upgrade chroma and adjust embedder function generator * >= version * linted * preparing enw version * adding before and after crew * Update CLI Watson supported models + docs (#1628) * docs: add gh_token documentation to GithubSearchTool * Move kickoff callbacks to crew's domain * Cassettes * Make mypy happy * Knowledge (#1567) * initial knowledge * WIP * Adding core knowledge sources * Improve types and better support for file paths * added additional sources * fix linting * update yaml to include optional deps * adding in lorenze feedback * ensure embeddings are persisted * improvements all around Knowledge class * return this * properly reset memory * properly reset memory+knowledge * consolodation and improvements * linted * cleanup rm unused embedder * fix test * fix duplicate * generating cassettes for knowledge test * updated default embedder * None embedder to use default on pipeline cloning * improvements * fixed text_file_knowledge * mypysrc fixes * type check fixes * added extra cassette * just mocks * linted * mock knowledge query to not spin up db * linted * verbose run * put a flag * fix * adding docs * better docs * improvements from review * more docs * linted * rm print * more fixes * clearer docs * added docstrings and type hints for cli --------- Co-authored-by: João Moura Co-authored-by: Lorenze Jay * Updated README.md, fix typo(s) (#1637) * Update Perplexity example in documentation (#1623) * Fix threading * preparing new version * Log in to Tool Repository on `crewai login` (#1650) This commit adds an extra step to `crewai login` to ensure users also log in to Tool Repository, that is, exchanging their Auth0 tokens for a Tool Repository username and password to be used by UV downloads and API tool uploads. * add knowledge to mint.json * Improve typed task outputs (#1651) * V1 working * clean up imports and prints * more clean up and add tests * fixing tests * fix test * fix linting * Fix tests * Fix linting * add doc string as requested by eduardo * Update Github actions (#1639) * actions/checkout@v4 * actions/cache@v4 * actions/setup-python@v5 --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * update (#1638) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * fix spelling issue found by @Jacques-Murray (#1660) * Update readme for running mypy (#1614) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Feat/remove langchain (#1654) * feat: add initial changes from langchain * feat: remove kwargs of being processed * feat: remove langchain, update uv.lock and fix type_hint * feat: change docs * feat: remove forced requirements for parameter * feat add tests for new structure tool * feat: fix tests and adapt code for args * Feat/remove langchain (#1668) * feat: add initial changes from langchain * feat: remove kwargs of being processed * feat: remove langchain, update uv.lock and fix type_hint * feat: change docs * feat: remove forced requirements for parameter * feat add tests for new structure tool * feat: fix tests and adapt code for args * fix tool calling for langchain tools * doc strings --------- Co-authored-by: Eduardo Chiarotti * added knowledge to agent level (#1655) * added knowledge to agent level * linted * added doc * added from suggestions * added test * fixes from discussion * fix docs * fix test * rm cassette for knowledge_sources test as its a mock and update agent doc string * fix test * rm unused * linted * Update Agents docs to include two approaches for creating an agent: with and without YAML configuration * Documentation Improvements: LLM Configuration and Usage (#1684) * docs: improve tasks documentation clarity and structure - Add Task Execution Flow section - Add variable interpolation explanation - Add Task Dependencies section with examples - Improve overall document structure and readability - Update code examples with proper syntax highlighting * docs: update agent documentation with improved examples and formatting - Replace DuckDuckGoSearchRun with SerperDevTool - Update code block formatting to be consistent - Improve template examples with actual syntax - Update LLM examples to use current models - Clean up formatting and remove redundant comments * docs: enhance LLM documentation with Cerebras provider and formatting improvements * docs: simplify LLMs documentation title * docs: improve installation guide clarity and structure - Add clear Python version requirements with check command - Simplify installation options to recommended method - Improve upgrade section clarity for existing users - Add better visual structure with Notes and Tips - Update description and formatting * docs: improve introduction page organization and clarity - Update organizational analogy in Note section - Improve table formatting and alignment - Remove emojis from component table for cleaner look - Add 'helps you' to make the note more action-oriented * docs: add enterprise and community cards - Add Enterprise deployment card in quickstart - Add community card focused on open source discussions - Remove deployment reference from community description - Clean up introduction page cards - Remove link from Enterprise description text * Fixes issues with result as answer not properly exiting LLM loop (#1689) * v1 of fix implemented. Need to confirm with tokens. * remove print statements * preparing new version * fix missing code in flows docs (#1690) * docs: improve tasks documentation clarity and structure - Add Task Execution Flow section - Add variable interpolation explanation - Add Task Dependencies section with examples - Improve overall document structure and readability - Update code examples with proper syntax highlighting * docs: update agent documentation with improved examples and formatting - Replace DuckDuckGoSearchRun with SerperDevTool - Update code block formatting to be consistent - Improve template examples with actual syntax - Update LLM examples to use current models - Clean up formatting and remove redundant comments * docs: enhance LLM documentation with Cerebras provider and formatting improvements * docs: simplify LLMs documentation title * docs: improve installation guide clarity and structure - Add clear Python version requirements with check command - Simplify installation options to recommended method - Improve upgrade section clarity for existing users - Add better visual structure with Notes and Tips - Update description and formatting * docs: improve introduction page organization and clarity - Update organizational analogy in Note section - Improve table formatting and alignment - Remove emojis from component table for cleaner look - Add 'helps you' to make the note more action-oriented * docs: add enterprise and community cards - Add Enterprise deployment card in quickstart - Add community card focused on open source discussions - Remove deployment reference from community description - Clean up introduction page cards - Remove link from Enterprise description text * docs: add code snippet to Getting Started section in flows.mdx --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Update reset memories command based on the SDK (#1688) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Update using langchain tools docs (#1664) * Update example of how to use LangChain tools with correct syntax * Use .env * Add Code back --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * [FEATURE] Support for custom path in RAGStorage (#1659) * added path to RAGStorage * added path to short term and entity memory * add path for long_term_storage for completeness --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * [Doc]: Add documenation for openlit observability (#1612) * Create openlit-observability.mdx * Update doc with images and steps * Update mkdocs.yml and add OpenLIT guide link --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Fix indentation in llm-connections.mdx code block (#1573) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Knowledge project directory standard (#1691) * Knowledge project directory standard * fixed types * comment fix * made base file knowledge source an abstract class * cleaner validator on model_post_init * fix type checker * cleaner refactor * better template * Update README.md (#1694) Corrected the statement which says users can not disable telemetry, but now users can disable by setting the environment variable OTEL_SDK_DISABLED to true. Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Talk about getting structured consistent outputs with tasks. * remove all references to pipeline and pipeline router (#1661) * remove all references to pipeline and router * fix linting * drop poetry.lock * docs: add nvidia as provider (#1632) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * add knowledge demo + improve knowledge docs (#1706) * Brandon/cre 509 hitl multiple rounds of followup (#1702) * v1 of HITL working * Drop print statements * HITL code more robust. Still needs to be refactored. * refactor and more clear messages * Fix type issue * fix tests * Fix test again * Drop extra print * New docs about yaml crew with decorators. Simplify template crew with… (#1701) * New docs about yaml crew with decorators. Simplify template crew with links * Fix spelling issues. * updating tools * curting new verson * Incorporate Stale PRs that have feedback (#1693) * incorporate #1683 * add in --version flag to cli. closes #1679. * Fix env issue * Add in suggestions from @caike to make sure ragstorage doesnt exceed os file limit. Also, included additional checks to support windows. * remove poetry.lock as pointed out by @sanders41 in #1574. * Incorporate feedback from crewai reviewer * Incorporate @lorenzejay feedback * drop metadata requirement (#1712) * drop metadata requirement * fix linting * Update docs for new knowledge * more linting * more linting * make save_documents private * update docs to the new way we use knowledge and include clearing memory * add support for langfuse with litellm (#1721) * docs: Add quotes to agentops installing command (#1729) * docs: Add quotes to agentops installing command * feat: Add ContextualMemory to __init__ * feat: remove import due to circular improt * feat: update tasks config main template typos * Fixed output_file not respecting system path (#1726) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * fix:typo error (#1732) * Update crew_agent_executor.py typo error * Update en.json typo error * Fix Knowledge docs Spaceflight News API dead link * call storage.search in user context search instead of memory.search (#1692) Co-authored-by: Eduardo Chiarotti * Add doc structured tool (#1713) * Add doc structured tool * Fix example --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * _execute_tool_and_check_finality 结果给回调参数,这样就可以提前拿到结果信息,去做数据解析判断做预判 (#1716) Co-authored-by: xiaohan Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * format bullet points (#1734) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Add missing @functools.wraps when wrapping functions and preserve wrapped class name in @CrewBase. (#1560) * Update annotations.py * Update utils.py * Update crew_base.py * Update utils.py * Update crew_base.py --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Fix disk I/O error when resetting short-term memory. (#1724) * Fix disk I/O error when resetting short-term memory. Reset chromadb client and nullifies references before removing directory. * Nit for clarity * did the same for knowledge_storage * cleanup * cleanup order * Cleanup after the rm of the directories --------- Co-authored-by: Lorenze Jay Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com> * restrict python version compatibility (#1731) * drop 3.13 * revert * Drop test cassette that was causing error * trying to fix failing test * adding thiago changes * resolve final tests * Drop skip * Bugfix/restrict python version compatibility (#1736) * drop 3.13 * revert * Drop test cassette that was causing error * trying to fix failing test * adding thiago changes * resolve final tests * Drop skip * drop pipeline * Update pyproject.toml and uv.lock to drop crewai-tools as a default requirement (#1711) * copy googles changes. Fix tests. Improve LLM file (#1737) * copy googles changes. Fix tests. Improve LLM file * Fix type issue * fix:typo error (#1738) * Update base_agent_tools.py typo error * Update main.py typo error * Update base_file_knowledge_source.py typo error * Update test_main.py typo error * Update en.json * Update prompts.json --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Remove manager_callbacks reference (#1741) * include event emitter in flows (#1740) * include event emitter in flows * Clean up * Fix linter * sort imports with isort rules by ruff linter (#1730) * sort imports * update --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> Co-authored-by: Eduardo Chiarotti * Added is_auto_end flag in agentops.end session in crew.py (#1320) When using agentops, we have the option to pass the `skip_auto_end_session` parameter, which is supposed to not end the session if the `end_session` function is called by Crew. Now the way it works is, the `agentops.end_session` accepts `is_auto_end` flag and crewai should have passed it as `True` (its `False` by default). I have changed the code to pass is_auto_end=True Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * NVIDIA Provider : UI changes (#1746) * docs: add nvidia as provider * nvidia ui docs changes * add note for updated list --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Fix small typo in sample tool (#1747) Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Feature/add workflow permissions (#1749) * fix: Call ChromaDB reset before removing storage directory to fix disk I/O errors * feat: add workflow permissions to stale.yml * revert rag_storage.py changes * revert rag_storage.py changes --------- Co-authored-by: Matt B Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * remove pkg_resources which was causing issues (#1751) * apply agent ops changes and resolve merge conflicts (#1748) * apply agent ops changes and resolve merge conflicts * Trying to fix tests * add back in vcr * update tools * remove pkg_resources which was causing issues * Fix tests * experimenting to see if unique content is an issue with knowledge * experimenting to see if unique content is an issue with knowledge * update chromadb which seems to have issues with upsert * generate new yaml for failing test * Investigating upsert * Drop patch * Update casettes * Fix duplicate document issue * more fixes * add back in vcr * new cassette for test --------- Co-authored-by: Lorenze Jay * drop print (#1755) * Fix: CrewJSONEncoder now accepts enums (#1752) * bugfix: CrewJSONEncoder now accepts enums * sort imports --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Fix bool and null handling (#1771) * include 12 but not 13 * change to <13 instead of <=12 * Gemini 2.0 (#1773) * Update llms.mdx (Gemini 2.0) - Add Gemini 2.0 flash to Gemini table. - Add link to 2 hosting paths for Gemini in Tip. - Change to lower case model slugs vs names, user convenience. - Add https://artificialanalysis.ai/ as alternate leaderboard. - Move Gemma to "other" tab. * Update llm.py (gemini 2.0) Add setting for Gemini 2.0 context window to llm.py --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * Remove relative import in flow `main.py` template (#1782) * Add `tool.crewai.type` pyproject attribute in templates (#1789) * Correcting a small grammatical issue that was bugging me: from _satisfy the expect criteria_ to _satisfies the expected criteria_ (#1783) Signed-off-by: PJ Hagerty Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> * feat: Add task guardrails feature (#1742) * feat: Add task guardrails feature Add support for custom code guardrails in tasks that validate outputs before proceeding to the next task. Features include: - Optional task-level guardrail function - Pre-next-task execution timing - Tuple return format (success, data) - Automatic result/error routing - Configurable retry mechanism - Comprehensive documentation and tests Link to Devin run: https://app.devin.ai/sessions/39f6cfd6c5a24d25a7bd70ce070ed29a Co-Authored-By: Joe Moura * fix: Add type check for guardrail result and remove unused import Co-Authored-By: Joe Moura * fix: Remove unnecessary f-string prefix Co-Authored-By: Joe Moura * feat: Add guardrail validation improvements - Add result/error exclusivity validation in GuardrailResult - Make return type annotations optional in Task guardrail validator - Improve error messages for validation failures Co-Authored-By: Joe Moura * docs: Add comprehensive guardrails documentation - Add type hints and examples - Add error handling best practices - Add structured error response patterns - Document retry mechanisms - Improve documentation organization Co-Authored-By: Joe Moura * refactor: Update guardrail functions to handle TaskOutput objects Co-Authored-By: Joe Moura * feat: Add task guardrails feature Add support for custom code guardrails in tasks that validate outputs before proceeding to the next task. Features include: - Optional task-level guardrail function - Pre-next-task execution timing - Tuple return format (success, data) - Automatic result/error routing - Configurable retry mechanism - Comprehensive documentation and tests Link to Devin run: https://app.devin.ai/sessions/39f6cfd6c5a24d25a7bd70ce070ed29a Co-Authored-By: Joe Moura * fix: Add type check for guardrail result and remove unused import Co-Authored-By: Joe Moura * fix: Remove unnecessary f-string prefix Co-Authored-By: Joe Moura * feat: Add guardrail validation improvements - Add result/error exclusivity validation in GuardrailResult - Make return type annotations optional in Task guardrail validator - Improve error messages for validation failures Co-Authored-By: Joe Moura * docs: Add comprehensive guardrails documentation - Add type hints and examples - Add error handling best practices - Add structured error response patterns - Document retry mechanisms - Improve documentation organization Co-Authored-By: Joe Moura * refactor: Update guardrail functions to handle TaskOutput objects Co-Authored-By: Joe Moura * style: Fix import sorting in task guardrails files Co-Authored-By: Joe Moura * fixing docs * Fixing guardarils implementation * docs: Enhance guardrail validator docstring with runtime validation rationale Co-Authored-By: Joe Moura --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> Co-authored-by: João Moura * feat: Add interpolate_only method and improve error handling (#1791) * Fixed output_file not respecting system path * Fixed yaml config is not escaped properly for output requirements * feat: Add interpolate_only method and improve error handling - Add interpolate_only method for string interpolation while preserving JSON structure - Add comprehensive test coverage for interpolate_only - Add proper type annotation for logger using ClassVar - Improve error handling and documentation for _save_file method Co-Authored-By: Joe Moura * fix: Sort imports to fix lint issues Co-Authored-By: Joe Moura * fix: Reorganize imports using ruff --fix Co-Authored-By: Joe Moura * fix: Consolidate imports and fix formatting Co-Authored-By: Joe Moura * fix: Apply ruff automatic import sorting Co-Authored-By: Joe Moura * fix: Sort imports using ruff --fix Co-Authored-By: Joe Moura --------- Co-authored-by: Frieda (Jingying) Huang Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> Co-authored-by: Frieda Huang <124417784+frieda-huang@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura * Feat/docling-support (#1763) * added tool for docling support * docling support installation * use file_paths instead of file_path * fix import * organized imports * run_type docs * needs to be list * fixed logic * logged but file_path is backwards compatible * use file_paths instead of file_path 2 * added test for multiple sources for file_paths * fix run-types * enabling local files to work and type cleanup * linted * fix test and types * fixed run types * fix types * renamed to CrewDoclingSource * linted * added docs * resolve conflicts --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> Co-authored-by: Brandon Hancock * removed some redundancies (#1796) * removed some redundancies * cleanup * Feat/joao flow improvement requests (#1795) * Add in or and and in router * In the middle of improving plotting * final plot changes --------- Co-authored-by: João Moura * Adding Multimodal Abilities to Crew (#1805) * initial fix on delegation tools * fixing tests for delegations and coding * Refactor prepare tool and adding initial add images logic * supporting image tool * fixing linter * fix linter * Making sure multimodal feature support i18n * fix linter and types * mixxing translations * fix types and linter * Revert "fixing linter" This reverts commit ef323e3487e62ee4f5bce7f86378068a5ac77e16. * fix linters * test * fix * fix * fix linter * fix * ignore * type improvements * chore: removing crewai-tools from dev-dependencies (#1760) As mentioned in issue #1759, listing crewai-tools as dev-dependencies makes pip install it a required dependency, and not an optional Co-authored-by: João Moura * docs: add guide for multimodal agents (#1807) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura * Portkey Integration with CrewAI (#1233) * Create Portkey-Observability-and-Guardrails.md * crewAI update with new changes * small change --------- Co-authored-by: siddharthsambharia-portkey Co-authored-by: João Moura * fix: Change storage initialization to None for KnowledgeStorage (#1804) * fix: Change storage initialization to None for KnowledgeStorage * refactor: Change storage field to optional and improve error handling when saving documents --------- Co-authored-by: João Moura * fix: handle optional storage with null checks (#1808) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: João Moura * docs: update README to highlight Flows (#1809) * docs: highlight Flows feature in README Co-Authored-By: Joe Moura * docs: enhance README with LangGraph comparison and flows-crews synergy Co-Authored-By: Joe Moura * docs: replace initial Flow example with advanced Flow+Crew example; enhance LangGraph comparison Co-Authored-By: Joe Moura * docs: incorporate key terms and enhance feature descriptions Co-Authored-By: Joe Moura * docs: refine technical language, enhance feature descriptions, fix string interpolation Co-Authored-By: Joe Moura * docs: update README with performance metrics, feature enhancements, and course links Co-Authored-By: Joe Moura * docs: update LangGraph comparison with paragraph and P.S. section Co-Authored-By: Joe Moura --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura * Update README.md * docs: add agent-specific knowledge documentation and examples (#1811) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura * fixing file paths for knowledge source * Fix interpolation for output_file in Task (#1803) (#1814) * fix: interpolate output_file attribute from YAML Co-Authored-By: Joe Moura * fix: add security validation for output_file paths Co-Authored-By: Joe Moura * fix: add _original_output_file private attribute to fix type-checker error Co-Authored-By: Joe Moura * fix: update interpolate_only to handle None inputs and remove duplicate attribute Co-Authored-By: Joe Moura * fix: improve output_file validation and error messages Co-Authored-By: Joe Moura * test: add end-to-end tests for output_file functionality Co-Authored-By: Joe Moura --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura * fix(manager_llm): handle coworker role name case/whitespace properly (#1820) * fix(manager_llm): handle coworker role name case/whitespace properly - Add .strip() to agent name and role comparisons in base_agent_tools.py - Add test case for varied role name cases and whitespace - Fix issue #1503 with manager LLM delegation Co-Authored-By: Joe Moura * fix(manager_llm): improve error handling and add debug logging - Add debug logging for better observability - Add sanitize_agent_name helper method - Enhance error messages with more context - Add parameterized tests for edge cases: - Embedded quotes - Trailing newlines - Multiple whitespace - Case variations - None values - Improve error handling with specific exceptions Co-Authored-By: Joe Moura * style: fix import sorting in base_agent_tools and test_manager_llm_delegation Co-Authored-By: Joe Moura * fix(manager_llm): improve whitespace normalization in role name matching Co-Authored-By: Joe Moura * style: fix import sorting in base_agent_tools and test_manager_llm_delegation Co-Authored-By: Joe Moura * fix(manager_llm): add error message template for agent tool execution errors Co-Authored-By: Joe Moura * style: fix import sorting in test_manager_llm_delegation.py Co-Authored-By: Joe Moura --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura * fix: add tiktoken as explicit dependency and document Rust requirement (#1826) * feat: add tiktoken as explicit dependency and document Rust requirement - Add tiktoken>=0.8.0 as explicit dependency to ensure pre-built wheels are used - Document Rust compiler requirement as fallback in README.md - Addresses issue #1824 tiktoken build failure Co-Authored-By: Joe Moura * fix: adjust tiktoken version to ~=0.7.0 for dependency compatibility - Update tiktoken dependency to ~=0.7.0 to resolve conflict with embedchain - Maintain compatibility with crewai-tools dependency chain - Addresses CI build failures Co-Authored-By: Joe Moura * docs: add troubleshooting section and make tiktoken optional Co-Authored-By: Joe Moura * Update README.md --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura Co-authored-by: João Moura * Docstring, Error Handling, and Type Hints Improvements (#1828) * docs: add comprehensive docstrings to Flow class and methods - Added NumPy-style docstrings to all decorator functions - Added detailed documentation to Flow class methods - Included parameter types, return types, and examples - Enhanced documentation clarity and completeness Co-Authored-By: Joe Moura * feat: add secure path handling utilities - Add path_utils.py with safe path handling functions - Implement path validation and security checks - Integrate secure path handling in flow_visualizer.py - Add path validation in html_template_handler.py - Add comprehensive error handling for path operations Co-Authored-By: Joe Moura * docs: add comprehensive docstrings and type hints to flow utils (#1819) Co-Authored-By: Joe Moura * fix: add type annotations and fix import sorting Co-Authored-By: Joe Moura * fix: add type annotations to flow utils and visualization utils Co-Authored-By: Joe Moura * fix: resolve import sorting and type annotation issues Co-Authored-By: Joe Moura * fix: properly initialize and update edge_smooth variable Co-Authored-By: Joe Moura --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura * feat: add docstring (#1819) Co-authored-by: João Moura * fix: Include agent knowledge in planning process (#1818) * test: Add test demonstrating knowledge not included in planning process Issue #1703: Add test to verify that agent knowledge sources are not currently included in the planning process. This test will help validate the fix once implemented. - Creates agent with knowledge sources - Verifies knowledge context missing from planning - Checks other expected components are present Co-Authored-By: Joe Moura * fix: Include agent knowledge in planning process Issue #1703: Integrate agent knowledge sources into planning summaries - Add agent_knowledge field to task summaries in planning_handler - Update test to verify knowledge inclusion - Ensure knowledge context is available during planning phase The planning agent now has access to agent knowledge when creating task execution plans, allowing for better informed planning decisions. Co-Authored-By: Joe Moura * style: Fix import sorting in test_knowledge_planning.py - Reorganize imports according to ruff linting rules - Fix I001 linting error Co-Authored-By: Joe Moura * test: Update task summary assertions to include knowledge field Co-Authored-By: Joe Moura * fix: Update ChromaDB mock path and fix knowledge string formatting Co-Authored-By: Joe Moura * fix: Improve knowledge integration in planning process with error handling Co-Authored-By: Joe Moura * fix: Update task summary format for empty tools and knowledge - Change empty tools message to 'agent has no tools' - Remove agent_knowledge field when empty - Update test assertions to match new format - Improve test messages for clarity Co-Authored-By: Joe Moura * fix: Update string formatting for agent tools in task summary Co-Authored-By: Joe Moura * fix: Update string formatting for agent tools in task summary Co-Authored-By: Joe Moura * fix: Update string formatting for agent tools and knowledge in task summary Co-Authored-By: Joe Moura * fix: Update knowledge field formatting in task summary Co-Authored-By: Joe Moura * style: Fix import sorting in test_planning_handler.py Co-Authored-By: Joe Moura * style: Fix import sorting order in test_planning_handler.py Co-Authored-By: Joe Moura * test: Add ChromaDB mocking to test_create_tasks_summary_with_knowledge_and_tools Co-Authored-By: Joe Moura --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura Co-authored-by: João Moura * Suppressed userWarnings from litellm pydantic issues (#1833) * Suppressed userWarnings from litellm pydantic issues * change litellm version * Fix failling ollama tasks * Trying out timeouts * Trying out timeouts * trying next crew_test timeout * trying next crew_test timeout * timeout in crew_tests * timeout in crew_tests * more timeouts * more timeouts * crew_test changes werent applied * crew_test changes werent applied * revert uv.lock * revert uv.lock * add back in crewai tool dependencies and drop litellm version * add back in crewai tool dependencies and drop litellm version * tests should work now * tests should work now * more test changes * more test changes * Reverting uv.lock and pyproject * Reverting uv.lock and pyproject * Update llama3 cassettes * Update llama3 cassettes * sync packages with uv.lock * sync packages with uv.lock * more test fixes * fix tets * drop large file * final clean up * drop record new episodes --------- Signed-off-by: PJ Hagerty Co-authored-by: Thiago Moretto <168731+thiagomoretto@users.noreply.github.com> Co-authored-by: Thiago Moretto Co-authored-by: Vini Brasil Co-authored-by: Guilherme de Amorim Co-authored-by: Tony Kipkemboi Co-authored-by: Eren Küçüker <66262604+erenkucuker@users.noreply.github.com> Co-authored-by: João Moura Co-authored-by: Akesh kumar <155313882+akesh-0909@users.noreply.github.com> Co-authored-by: Lennex Zinyando Co-authored-by: Shahar Yair Co-authored-by: Eduardo Chiarotti Co-authored-by: Stephen Hankinson Co-authored-by: Muhammad Noman Fareed <60171953+shnoman97@users.noreply.github.com> Co-authored-by: dbubel <50341559+dbubel@users.noreply.github.com> Co-authored-by: Rip&Tear <84775494+theCyberTech@users.noreply.github.com> Co-authored-by: Rok Benko <115651717+rokbenko@users.noreply.github.com> Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com> Co-authored-by: Sam Co-authored-by: Maicon Peixinho Co-authored-by: Robin Wang <6220861+MottoX@users.noreply.github.com> Co-authored-by: C0deZ Co-authored-by: c0dez Co-authored-by: Gui Vieira Co-authored-by: Dev Khant Co-authored-by: Deshraj Yadav Co-authored-by: Gui Vieira Co-authored-by: Lorenze Jay Co-authored-by: Bob Conan Co-authored-by: Andy Bromberg Co-authored-by: Bowen Liang Co-authored-by: Ivan Peevski <133036+ipeevski@users.noreply.github.com> Co-authored-by: Rok Benko Co-authored-by: Javier Saldaña Co-authored-by: Ola Hungerford Co-authored-by: Tom Mahler, PhD Co-authored-by: Patcher Co-authored-by: Feynman Liang Co-authored-by: Stephen Co-authored-by: Rashmi Pawar <168514198+raspawar@users.noreply.github.com> Co-authored-by: Frieda Huang <124417784+frieda-huang@users.noreply.github.com> Co-authored-by: Archkon <180910180+Archkon@users.noreply.github.com> Co-authored-by: Aviral Jain Co-authored-by: lgesuellip <102637283+lgesuellip@users.noreply.github.com> Co-authored-by: fuckqqcom <9391575+fuckqqcom@users.noreply.github.com> Co-authored-by: xiaohan Co-authored-by: Piotr Mardziel Co-authored-by: Carlos Souza Co-authored-by: Paul Cowgill Co-authored-by: Bowen Liang Co-authored-by: Anmol Deep Co-authored-by: André Lago Co-authored-by: Matt B Co-authored-by: Karan Vaidya Co-authored-by: alan blount Co-authored-by: PJ Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura Co-authored-by: Frieda (Jingying) Huang Co-authored-by: João Igor Co-authored-by: siddharth Sambharia Co-authored-by: siddharthsambharia-portkey Co-authored-by: Erick Amorim <73451993+ericklima-ca@users.noreply.github.com> Co-authored-by: Marco Vinciguerra <88108002+VinciGit00@users.noreply.github.com> --- pyproject.toml | 2 +- tests/agent_test.py | 6 +- .../test_agent_execute_task_with_ollama.yaml | 864 +---------------- .../test_agent_with_ollama_llama3.yaml | 865 +----------------- .../test_llm_call_with_ollama_llama3.yaml | 451 +-------- tests/cli/tools/test_main.py | 9 +- tests/crew_test.py | 280 +++--- tests/knowledge/knowledge_test.py | 10 +- tests/task_test.py | 79 +- tests/test_manager_llm_delegation.py | 55 +- tests/test_task_guardrails.py | 27 +- uv.lock | 52 +- 12 files changed, 344 insertions(+), 2356 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 10d7ea62df..bcc00a0d9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ # Core Dependencies "pydantic>=2.4.2", "openai>=1.13.3", - "litellm>=1.56.4", + "litellm>=1.44.22", "instructor>=1.3.3", # Text Processing diff --git a/tests/agent_test.py b/tests/agent_test.py index 679f4832ea..c490a5e132 100644 --- a/tests/agent_test.py +++ b/tests/agent_test.py @@ -1457,7 +1457,7 @@ def test_agent_with_ollama_llama3(): assert agent.llm.model == "ollama/llama3.2:3b" assert agent.llm.base_url == "http://localhost:11434" - task = "Respond in 20 words. Who are you?" + task = "Respond in 20 words. Which model are you?" response = agent.llm.call([{"role": "user", "content": task}]) assert response @@ -1473,7 +1473,9 @@ def test_llm_call_with_ollama_llama3(): temperature=0.7, max_tokens=30, ) - messages = [{"role": "user", "content": "Respond in 20 words. Who are you?"}] + messages = [ + {"role": "user", "content": "Respond in 20 words. Which model are you?"} + ] response = llm.call(messages) diff --git a/tests/cassettes/test_agent_execute_task_with_ollama.yaml b/tests/cassettes/test_agent_execute_task_with_ollama.yaml index 8228b53a77..d8ecb4ddec 100644 --- a/tests/cassettes/test_agent_execute_task_with_ollama.yaml +++ b/tests/cassettes/test_agent_execute_task_with_ollama.yaml @@ -12,862 +12,34 @@ interactions: available and give your best Final Answer, your job depends on it!\n\nThought:\n\n", "options": {"stop": ["\nObservation:"]}, "stream": false}' headers: - accept: + Accept: - '*/*' - accept-encoding: + Accept-Encoding: - gzip, deflate - connection: + Connection: - keep-alive - content-length: - - '839' - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 - method: POST - uri: http://localhost:11434/api/generate - response: - content: '{"model":"llama3.2:3b","created_at":"2024-12-31T16:56:15.759718Z","response":"Final - Answer: Artificial Intelligence (AI) refers to the development of computer systems - able to perform tasks that typically require human intelligence, including learning, - problem-solving, decision-making, and perception.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,744,512,2675,527,1296,3560,13,1296,93371,198,7927,4443,5915,374,25,1296,5915,198,1271,3041,856,1888,4686,1620,4320,311,279,3465,1005,279,4839,2768,3645,1473,85269,25,358,1457,649,3041,264,2294,4320,198,19918,22559,25,4718,1620,4320,2011,387,279,2294,323,279,1455,4686,439,3284,11,433,2011,387,15632,7633,382,40,28832,1005,1521,20447,11,856,2683,14117,389,433,2268,14711,2724,1473,5520,5546,25,83017,1148,15592,374,304,832,11914,271,2028,374,279,1755,13186,369,701,1620,4320,25,362,832,1355,18886,16540,315,15592,198,9514,28832,471,279,5150,4686,2262,439,279,1620,4320,11,539,264,12399,382,11382,0,1115,374,48174,3062,311,499,11,1005,279,7526,2561,323,3041,701,1888,13321,22559,11,701,2683,14117,389,433,2268,85269,1473,128009,128006,78191,128007,271,19918,22559,25,59294,22107,320,15836,8,19813,311,279,4500,315,6500,6067,3025,311,2804,9256,430,11383,1397,3823,11478,11,2737,6975,11,3575,99246,11,5597,28846,11,323,21063,13],"total_duration":1156303250,"load_duration":35999125,"prompt_eval_count":181,"prompt_eval_duration":408000000,"eval_count":38,"eval_duration":711000000}' - headers: Content-Length: - - '1528' - Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 31 Dec 2024 16:56:15 GMT - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.2:3b"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '23' - content-type: - - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 - method: POST - uri: http://localhost:11434/api/show - response: - content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version - Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms - and conditions for use, reproduction, distribution \\nand modification of the - Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, - manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed - to promoting safe and fair use of its tools and features, including Llama 3.2. - If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D). - The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama - show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# - FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE - \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER - stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE - \\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date: - September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution \\nand modification of the Llama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals - and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use - Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be - found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}" - headers: + - '839' Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 31 Dec 2024 16:56:15 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.2:3b"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '23' - content-type: - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 + User-Agent: + - python-requests/2.32.3 method: POST - uri: http://localhost:11434/api/show + uri: http://localhost:11434/api/generate response: - content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version - Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms - and conditions for use, reproduction, distribution \\nand modification of the - Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, - manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed - to promoting safe and fair use of its tools and features, including Llama 3.2. - If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D). - The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama - show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# - FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE - \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER - stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE - \\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date: - September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution \\nand modification of the Llama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals - and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use - Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be - found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}" + body: + string: '{"model":"llama3.2:3b","created_at":"2025-01-02T20:05:52.24992Z","response":"Final + Answer: Artificial Intelligence (AI) refers to the development of computer + systems capable of performing tasks that typically require human intelligence, + such as learning, problem-solving, decision-making, and perception.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,744,512,2675,527,1296,3560,13,1296,93371,198,7927,4443,5915,374,25,1296,5915,198,1271,3041,856,1888,4686,1620,4320,311,279,3465,1005,279,4839,2768,3645,1473,85269,25,358,1457,649,3041,264,2294,4320,198,19918,22559,25,4718,1620,4320,2011,387,279,2294,323,279,1455,4686,439,3284,11,433,2011,387,15632,7633,382,40,28832,1005,1521,20447,11,856,2683,14117,389,433,2268,14711,2724,1473,5520,5546,25,83017,1148,15592,374,304,832,11914,271,2028,374,279,1755,13186,369,701,1620,4320,25,362,832,1355,18886,16540,315,15592,198,9514,28832,471,279,5150,4686,2262,439,279,1620,4320,11,539,264,12399,382,11382,0,1115,374,48174,3062,311,499,11,1005,279,7526,2561,323,3041,701,1888,13321,22559,11,701,2683,14117,389,433,2268,85269,1473,128009,128006,78191,128007,271,19918,22559,25,59294,22107,320,15836,8,19813,311,279,4500,315,6500,6067,13171,315,16785,9256,430,11383,1397,3823,11478,11,1778,439,6975,11,3575,99246,11,5597,28846,11,323,21063,13],"total_duration":1461909875,"load_duration":39886208,"prompt_eval_count":181,"prompt_eval_duration":701000000,"eval_count":39,"eval_duration":719000000}' headers: + Content-Length: + - '1537' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 31 Dec 2024 16:56:15 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 + - Thu, 02 Jan 2025 20:05:52 GMT + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/test_agent_with_ollama_llama3.yaml b/tests/cassettes/test_agent_with_ollama_llama3.yaml index a85abddf29..beb146254b 100644 --- a/tests/cassettes/test_agent_with_ollama_llama3.yaml +++ b/tests/cassettes/test_agent_with_ollama_llama3.yaml @@ -1,863 +1,36 @@ interactions: - request: body: '{"model": "llama3.2:3b", "prompt": "### User:\nRespond in 20 words. Who - are you?\n\n", "options": {"stop": ["\nObservation:"]}, "stream": false}' + which model are you?\n\n", "options": {"stop": ["\nObservation:"]}, "stream": + false}' headers: - accept: + Accept: - '*/*' - accept-encoding: + Accept-Encoding: - gzip, deflate - connection: + Connection: - keep-alive - content-length: - - '144' - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 - method: POST - uri: http://localhost:11434/api/generate - response: - content: '{"model":"llama3.2:3b","created_at":"2024-12-31T16:57:54.063894Z","response":"I''m - an AI designed to provide information and assist with inquiries, while maintaining - a neutral and respectful tone always.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,10699,527,499,1980,128009,128006,78191,128007,271,40,2846,459,15592,6319,311,3493,2038,323,7945,449,44983,11,1418,20958,264,21277,323,49150,16630,2744,13],"total_duration":651386042,"load_duration":41061917,"prompt_eval_count":38,"prompt_eval_duration":204000000,"eval_count":23,"eval_duration":405000000}' - headers: Content-Length: - - '692' + - '156' Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 31 Dec 2024 16:57:54 GMT - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.2:3b"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '23' - content-type: - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 + User-Agent: + - python-requests/2.32.3 method: POST - uri: http://localhost:11434/api/show - response: - content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version - Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms - and conditions for use, reproduction, distribution \\nand modification of the - Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, - manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed - to promoting safe and fair use of its tools and features, including Llama 3.2. - If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D). - The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama - show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# - FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE - \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER - stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE - \\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date: - September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution \\nand modification of the Llama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals - and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use - Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be - found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}" - headers: - Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 31 Dec 2024 16:57:54 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.2:3b"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '23' - content-type: - - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 - method: POST - uri: http://localhost:11434/api/show + uri: http://localhost:11434/api/generate response: - content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version - Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms - and conditions for use, reproduction, distribution \\nand modification of the - Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, - manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed - to promoting safe and fair use of its tools and features, including Llama 3.2. - If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D). - The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama - show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# - FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE - \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER - stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE - \\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date: - September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution \\nand modification of the Llama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals - and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use - Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be - found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}" + body: + string: '{"model":"llama3.2:3b","created_at":"2025-01-02T20:07:07.623404Z","response":"I''m + an AI designed to assist and communicate with users, utilizing a combination + of natural language processing models.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,10699,902,1646,527,499,1980,128009,128006,78191,128007,271,40,2846,459,15592,6319,311,7945,323,19570,449,3932,11,35988,264,10824,315,5933,4221,8863,4211,13],"total_duration":1076617833,"load_duration":46505416,"prompt_eval_count":40,"prompt_eval_duration":626000000,"eval_count":22,"eval_duration":399000000}' headers: + Content-Length: + - '690' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 31 Dec 2024 16:57:54 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 + - Thu, 02 Jan 2025 20:07:07 GMT + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/test_llm_call_with_ollama_llama3.yaml b/tests/cassettes/test_llm_call_with_ollama_llama3.yaml index 0cc413ca36..c1cee2cc8e 100644 --- a/tests/cassettes/test_llm_call_with_ollama_llama3.yaml +++ b/tests/cassettes/test_llm_call_with_ollama_llama3.yaml @@ -1,449 +1,36 @@ interactions: - request: - body: '{"model": "llama3.2:3b", "prompt": "### User:\nRespond in 20 words. Who - are you?\n\n", "options": {"temperature": 0.7, "num_predict": 30}, "stream": + body: '{"model": "llama3.2:3b", "prompt": "### User:\nRespond in 20 words. Which + model are you??\n\n", "options": {"num_predict": 30, "temperature": 0.7}, "stream": false}' headers: - accept: + Accept: - '*/*' - accept-encoding: + Accept-Encoding: - gzip, deflate - connection: + Connection: - keep-alive - content-length: - - '155' - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 - method: POST - uri: http://localhost:11434/api/generate - response: - content: '{"model":"llama3.2:3b","created_at":"2024-12-31T17:00:06.295261Z","response":"I''m - an AI assistant, here to provide information and answer questions to the best - of my abilities and knowledge.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,10699,527,499,1980,128009,128006,78191,128007,271,40,2846,459,15592,18328,11,1618,311,3493,2038,323,4320,4860,311,279,1888,315,856,18000,323,6677,13],"total_duration":826912750,"load_duration":32648125,"prompt_eval_count":38,"prompt_eval_duration":389000000,"eval_count":23,"eval_duration":404000000}' - headers: Content-Length: - - '675' + - '164' Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 31 Dec 2024 17:00:06 GMT - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"name": "llama3.2:3b"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '23' - content-type: - application/json - host: - - localhost:11434 - user-agent: - - litellm/1.56.4 + User-Agent: + - python-requests/2.32.3 method: POST - uri: http://localhost:11434/api/show + uri: http://localhost:11434/api/generate response: - content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version - Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms - and conditions for use, reproduction, distribution \\nand modification of the - Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, - manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed - to promoting safe and fair use of its tools and features, including Llama 3.2. - If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D). - The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama - show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n# - FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE - \\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER - stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE - \\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date: - September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions - for use, reproduction, distribution \\nand modification of the Llama Materials - set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals - and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D - or \u201Cyou\u201D means you, or your employer or any other person or entity - (if you are \\nentering into this Agreement on such person or entity\u2019s - behalf), of the age required under\\napplicable laws, rules or regulations to - provide legal consent and that has legal authority\\nto bind your employer or - such other person or entity if you are entering in this Agreement\\non their - behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models - and software and algorithms, including\\nmachine-learning model code, trained - model weights, inference-enabling code, training-enabling code,\\nfine-tuning - enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama - Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation - (and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D - or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in - or, \\nif you are an entity, your principal place of business is in the EEA - or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the - EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using - or distributing any portion or element of the Llama Materials,\\nyou agree to - be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n - \ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable - and royalty-free limited license under Meta\u2019s intellectual property or - other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce, - distribute, copy, create derivative works \\nof, and make modifications to the - Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If - you distribute or make available the Llama Materials (or any derivative works - thereof), \\nor a product or service (including another AI model) that contains - any of them, you shall (A) provide\\na copy of this Agreement with any such - Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non - a related website, user interface, blogpost, about page, or product documentation. - If you use the\\nLlama Materials or any outputs or results of the Llama Materials - to create, train, fine tune, or\\notherwise improve an AI model, which is distributed - or made available, you shall also include \u201CLlama\u201D\\nat the beginning - of any such AI model name.\\n\\n ii. If you receive Llama Materials, - or any derivative works thereof, from a Licensee as part\\nof an integrated - end user product, then Section 2 of this Agreement will not apply to you. \\n\\n - \ iii. You must retain in all copies of the Llama Materials that you distribute - the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed - as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2 - Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n - \ iv. Your use of the Llama Materials must comply with applicable laws - and regulations\\n(including trade compliance laws and regulations) and adhere - to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy), - which is hereby \\nincorporated by reference into this Agreement.\\n \\n2. - Additional Commercial Terms. If, on the Llama 3.2 version release date, the - monthly active users\\nof the products or services made available by or for - Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly - active users in the preceding calendar month, you must request \\na license - from Meta, which Meta may grant to you in its sole discretion, and you are not - authorized to\\nexercise any of the rights under this Agreement unless or until - Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty. - UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS - THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF - ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND - IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR - DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS - AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY - OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR - ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT, - TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, - \\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, - EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED - OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n - \ a. No trademark licenses are granted under this Agreement, and in connection - with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark - owned by or associated with the other or any of its affiliates, \\nexcept as - required for reasonable and customary use in describing and redistributing the - Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants - you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required - \\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s - brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/). - All goodwill arising out of your use of the Mark \\nwill inure to the benefit - of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and - derivatives made by or for Meta, with respect to any\\n derivative works - and modifications of the Llama Materials that are made by you, as between you - and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n - \ c. If you institute litigation or other proceedings against Meta or any - entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging - that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n - \ of any of the foregoing, constitutes infringement of intellectual property - or other rights owned or licensable\\n by you, then any licenses granted - to you under this Agreement shall terminate as of the date such litigation or\\n - \ claim is filed or instituted. You will indemnify and hold harmless Meta - from and against any claim by any third\\n party arising out of or related - to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination. - The term of this Agreement will commence upon your acceptance of this Agreement - or access\\nto the Llama Materials and will continue in full force and effect - until terminated in accordance with the terms\\nand conditions herein. Meta - may terminate this Agreement if you are in breach of any term or condition of - this\\nAgreement. Upon termination of this Agreement, you shall delete and cease - use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination - of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will - be governed and construed under the laws of the State of \\nCalifornia without - regard to choice of law principles, and the UN Convention on Contracts for the - International\\nSale of Goods does not apply to this Agreement. The courts of - California shall have exclusive jurisdiction of\\nany dispute arising out of - this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta - is committed to promoting safe and fair use of its tools and features, including - Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use - Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be - found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited - Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree - you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate - the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate, - contribute to, encourage, plan, incite, or further illegal or unlawful activity - or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation - or harm to children, including the solicitation, creation, acquisition, or dissemination - of child exploitative content or failure to report Child Sexual Abuse Material\\n - \ 3. Human trafficking, exploitation, and sexual violence\\n 4. - The illegal distribution of information or materials to minors, including obscene - materials, or failure to employ legally required age-gating in connection with - such information or materials.\\n 5. Sexual solicitation\\n 6. - Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate - the harassment, abuse, threatening, or bullying of individuals or groups of - individuals\\n 2. Engage in, promote, incite, or facilitate discrimination - or other unlawful or harmful conduct in the provision of employment, employment - benefits, credit, housing, other economic benefits, or other essential goods - and services\\n 3. Engage in the unauthorized or unlicensed practice of any - profession including, but not limited to, financial, legal, medical/health, - or related professional practices\\n 4. Collect, process, disclose, generate, - or infer private or sensitive information about individuals, including information - about individuals\u2019 identity, health, or demographic information, unless - you have obtained the right to do so in accordance with applicable law\\n 5. - Engage in or facilitate any action or generate any content that infringes, misappropriates, - or otherwise violates any third-party rights, including the outputs or results - of any products or services using the Llama Materials\\n 6. Create, generate, - or facilitate the creation of malicious code, malware, computer viruses or do - anything else that could disable, overburden, interfere with or impair the proper - working, integrity, operation or appearance of a website or computer system\\n - \ 7. Engage in any action, or facilitate any action, to intentionally circumvent - or remove usage restrictions or other safety measures, or to enable functionality - disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the - planning or development of activities that present a risk of death or bodily - harm to individuals, including use of Llama 3.2 related to the following:\\n - \ 8. Military, warfare, nuclear industries or applications, espionage, use - for materials or activities that are subject to the International Traffic Arms - Regulations (ITAR) maintained by the United States Department of State or to - the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons - Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including - weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n - \ 11. Operation of critical infrastructure, transportation technologies, or - heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting, - and eating disorders\\n 13. Any content intended to incite or promote violence, - abuse, or any infliction of bodily harm to an individual\\n3. Intentionally - deceive or mislead others, including use of Llama 3.2 related to the following:\\n - \ 14. Generating, promoting, or furthering fraud or the creation or promotion - of disinformation\\n 15. Generating, promoting, or furthering defamatory - content, including the creation of defamatory statements, images, or other content\\n - \ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating - another individual without consent, authorization, or legal right\\n 18. - Representing that the use of Llama 3.2 or outputs are human-generated\\n 19. - Generating or facilitating false online engagement, including fake reviews and - other means of fake online engagement\\n4. Fail to appropriately disclose to - end users any known dangers of your AI system\\n5. Interact with third party - tools, models, or software designed to generate unlawful content or engage in - unlawful or harmful conduct and/or represent that the outputs of such tools, - models, or software are associated with Meta or Llama 3.2\\n\\nWith respect - to any multimodal models included in Llama 3.2, the rights granted under Section - 1(a) of the Llama 3.2 Community License Agreement are not being granted to you - if you are an individual domiciled in, or a company with a principal place of - business in, the European Union. This restriction does not apply to end users - of a product or service that incorporates any such multimodal models.\\n\\nPlease - report any violation of this Policy, software \u201Cbug,\u201D or other problems - that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n* - Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n* - Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n* - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n* - Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama - 3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop - \ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting - Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{- - if .Tools }}When you receive a tool call response, use the output to format - an answer to the orginal user question.\\n\\nYou are a helpful assistant with - tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i, - $_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{- - if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{- - if and $.Tools $last }}\\n\\nGiven the following functions, please respond with - a JSON for a function call with its proper arguments that best answers the given - prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\": - dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range - $.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- - else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{- - if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name - }}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{ - .Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{- - else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{ - .Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{ - end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}" + body: + string: '{"model":"llama3.2:3b","created_at":"2025-01-02T20:24:24.812595Z","response":"I''m + an AI, specifically a large language model, designed to understand and respond + to user queries with accuracy.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,16299,1646,527,499,71291,128009,128006,78191,128007,271,40,2846,459,15592,11,11951,264,3544,4221,1646,11,6319,311,3619,323,6013,311,1217,20126,449,13708,13],"total_duration":827817584,"load_duration":41560542,"prompt_eval_count":39,"prompt_eval_duration":384000000,"eval_count":23,"eval_duration":400000000}' headers: + Content-Length: + - '683' Content-Type: - application/json; charset=utf-8 Date: - - Tue, 31 Dec 2024 17:00:06 GMT - Transfer-Encoding: - - chunked - http_version: HTTP/1.1 - status_code: 200 + - Thu, 02 Jan 2025 20:24:24 GMT + status: + code: 200 + message: OK version: 1 diff --git a/tests/cli/tools/test_main.py b/tests/cli/tools/test_main.py index 10c29b920d..b06c0b28cc 100644 --- a/tests/cli/tools/test_main.py +++ b/tests/cli/tools/test_main.py @@ -28,9 +28,10 @@ def test_create_success(mock_subprocess): with in_temp_dir(): tool_command = ToolCommand() - with patch.object(tool_command, "login") as mock_login, patch( - "sys.stdout", new=StringIO() - ) as fake_out: + with ( + patch.object(tool_command, "login") as mock_login, + patch("sys.stdout", new=StringIO()) as fake_out, + ): tool_command.create("test-tool") output = fake_out.getvalue() @@ -82,7 +83,7 @@ def test_install_success(mock_get, mock_subprocess_run): capture_output=False, text=True, check=True, - env=unittest.mock.ANY + env=unittest.mock.ANY, ) assert "Successfully installed sample-tool" in output diff --git a/tests/crew_test.py b/tests/crew_test.py index 0cb8f469cd..8354f65845 100644 --- a/tests/crew_test.py +++ b/tests/crew_test.py @@ -333,16 +333,16 @@ def test_manager_agent_delegating_to_assigned_task_agent(): ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) # Because we are mocking execute_sync, we never hit the underlying _execute_core # which sets the output attribute of the task task.output = mock_task_output - with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Verify execute_sync was called once @@ -350,12 +350,20 @@ def test_manager_agent_delegating_to_assigned_task_agent(): # Get the tools argument from the call _, kwargs = mock_execute_sync.call_args - tools = kwargs['tools'] + tools = kwargs["tools"] # Verify the delegation tools were passed correctly assert len(tools) == 2 - assert any("Delegate a specific task to one of the following coworkers: Researcher" in tool.description for tool in tools) - assert any("Ask a specific question to one of the following coworkers: Researcher" in tool.description for tool in tools) + assert any( + "Delegate a specific task to one of the following coworkers: Researcher" + in tool.description + for tool in tools + ) + assert any( + "Ask a specific question to one of the following coworkers: Researcher" + in tool.description + for tool in tools + ) @pytest.mark.vcr(filter_headers=["authorization"]) @@ -404,7 +412,7 @@ def test_manager_agent_delegates_with_varied_role_cases(): backstory="A researcher with spaces in role name", allow_delegation=False, ) - + writer_caps = Agent( role="SENIOR WRITER", # All caps goal="Write with caps in role", @@ -426,13 +434,13 @@ def test_manager_agent_delegates_with_varied_role_cases(): ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) task.output = mock_task_output - with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Verify execute_sync was called once @@ -440,20 +448,32 @@ def test_manager_agent_delegates_with_varied_role_cases(): # Get the tools argument from the call _, kwargs = mock_execute_sync.call_args - tools = kwargs['tools'] + tools = kwargs["tools"] # Verify the delegation tools were passed correctly and can handle case/whitespace variations assert len(tools) == 2 - + # Check delegation tool descriptions (should work despite case/whitespace differences) delegation_tool = tools[0] question_tool = tools[1] - - assert "Delegate a specific task to one of the following coworkers:" in delegation_tool.description - assert " Researcher " in delegation_tool.description or "SENIOR WRITER" in delegation_tool.description - - assert "Ask a specific question to one of the following coworkers:" in question_tool.description - assert " Researcher " in question_tool.description or "SENIOR WRITER" in question_tool.description + + assert ( + "Delegate a specific task to one of the following coworkers:" + in delegation_tool.description + ) + assert ( + " Researcher " in delegation_tool.description + or "SENIOR WRITER" in delegation_tool.description + ) + + assert ( + "Ask a specific question to one of the following coworkers:" + in question_tool.description + ) + assert ( + " Researcher " in question_tool.description + or "SENIOR WRITER" in question_tool.description + ) @pytest.mark.vcr(filter_headers=["authorization"]) @@ -479,6 +499,7 @@ def test_crew_with_delegating_agents(): == "In the rapidly evolving landscape of technology, AI agents have emerged as formidable tools, revolutionizing how we interact with data and automate tasks. These sophisticated systems leverage machine learning and natural language processing to perform a myriad of functions, from virtual personal assistants to complex decision-making companions in industries such as finance, healthcare, and education. By mimicking human intelligence, AI agents can analyze massive data sets at unparalleled speeds, enabling businesses to uncover valuable insights, enhance productivity, and elevate user experiences to unprecedented levels.\n\nOne of the most striking aspects of AI agents is their adaptability; they learn from their interactions and continuously improve their performance over time. This feature is particularly valuable in customer service where AI agents can address inquiries, resolve issues, and provide personalized recommendations without the limitations of human fatigue. Moreover, with intuitive interfaces, AI agents enhance user interactions, making technology more accessible and user-friendly, thereby breaking down barriers that have historically hindered digital engagement.\n\nDespite their immense potential, the deployment of AI agents raises important ethical and practical considerations. Issues related to privacy, data security, and the potential for job displacement necessitate thoughtful dialogue and proactive measures. Striking a balance between technological innovation and societal impact will be crucial as organizations integrate these agents into their operations. Additionally, ensuring transparency in AI decision-making processes is vital to maintain public trust as AI agents become an integral part of daily life.\n\nLooking ahead, the future of AI agents appears bright, with ongoing advancements promising even greater capabilities. As we continue to harness the power of AI, we can expect these agents to play a transformative role in shaping various sectors—streamlining workflows, enabling smarter decision-making, and fostering more personalized experiences. Embracing this technology responsibly can lead to a future where AI agents not only augment human effort but also inspire creativity and efficiency across the board, ultimately redefining our interaction with the digital world." ) + @pytest.mark.vcr(filter_headers=["authorization"]) def test_crew_with_delegating_agents_should_not_override_task_tools(): from typing import Type @@ -489,6 +510,7 @@ def test_crew_with_delegating_agents_should_not_override_task_tools(): class TestToolInput(BaseModel): """Input schema for TestTool.""" + query: str = Field(..., description="Query to process") class TestTool(BaseTool): @@ -516,24 +538,29 @@ def _run(self, query: str) -> str: ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) # Because we are mocking execute_sync, we never hit the underlying _execute_core # which sets the output attribute of the task tasks[0].output = mock_task_output - with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Execute the task and verify both tools are present _, kwargs = mock_execute_sync.call_args - tools = kwargs['tools'] + tools = kwargs["tools"] + + assert any( + isinstance(tool, TestTool) for tool in tools + ), "TestTool should be present" + assert any( + "delegate" in tool.name.lower() for tool in tools + ), "Delegation tool should be present" - assert any(isinstance(tool, TestTool) for tool in tools), "TestTool should be present" - assert any("delegate" in tool.name.lower() for tool in tools), "Delegation tool should be present" @pytest.mark.vcr(filter_headers=["authorization"]) def test_crew_with_delegating_agents_should_not_override_agent_tools(): @@ -545,6 +572,7 @@ def test_crew_with_delegating_agents_should_not_override_agent_tools(): class TestToolInput(BaseModel): """Input schema for TestTool.""" + query: str = Field(..., description="Query to process") class TestTool(BaseTool): @@ -563,7 +591,7 @@ def _run(self, query: str) -> str: Task( description="Produce and amazing 1 paragraph draft of an article about AI Agents.", expected_output="A 4 paragraph article about AI.", - agent=new_ceo + agent=new_ceo, ) ] @@ -574,24 +602,29 @@ def _run(self, query: str) -> str: ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) # Because we are mocking execute_sync, we never hit the underlying _execute_core # which sets the output attribute of the task tasks[0].output = mock_task_output - with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Execute the task and verify both tools are present _, kwargs = mock_execute_sync.call_args - tools = kwargs['tools'] + tools = kwargs["tools"] + + assert any( + isinstance(tool, TestTool) for tool in new_ceo.tools + ), "TestTool should be present" + assert any( + "delegate" in tool.name.lower() for tool in tools + ), "Delegation tool should be present" - assert any(isinstance(tool, TestTool) for tool in new_ceo.tools), "TestTool should be present" - assert any("delegate" in tool.name.lower() for tool in tools), "Delegation tool should be present" @pytest.mark.vcr(filter_headers=["authorization"]) def test_task_tools_override_agent_tools(): @@ -603,6 +636,7 @@ def test_task_tools_override_agent_tools(): class TestToolInput(BaseModel): """Input schema for TestTool.""" + query: str = Field(..., description="Query to process") class TestTool(BaseTool): @@ -630,14 +664,10 @@ def _run(self, query: str) -> str: description="Write a test task", expected_output="Test output", agent=new_researcher, - tools=[AnotherTestTool()] + tools=[AnotherTestTool()], ) - crew = Crew( - agents=[new_researcher], - tasks=[task], - process=Process.sequential - ) + crew = Crew(agents=[new_researcher], tasks=[task], process=Process.sequential) crew.kickoff() @@ -650,6 +680,7 @@ def _run(self, query: str) -> str: assert len(new_researcher.tools) == 1 assert isinstance(new_researcher.tools[0], TestTool) + @pytest.mark.vcr(filter_headers=["authorization"]) def test_task_tools_override_agent_tools_with_allow_delegation(): """ @@ -702,13 +733,13 @@ def _run(self, query: str) -> str: ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) # We mock execute_sync to verify which tools get used at runtime - with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Inspect the call kwargs to verify the actual tools passed to execution @@ -716,16 +747,23 @@ def _run(self, query: str) -> str: used_tools = kwargs["tools"] # Confirm AnotherTestTool is present but TestTool is not - assert any(isinstance(tool, AnotherTestTool) for tool in used_tools), "AnotherTestTool should be present" - assert not any(isinstance(tool, TestTool) for tool in used_tools), "TestTool should not be present among used tools" + assert any( + isinstance(tool, AnotherTestTool) for tool in used_tools + ), "AnotherTestTool should be present" + assert not any( + isinstance(tool, TestTool) for tool in used_tools + ), "TestTool should not be present among used tools" # Confirm delegation tool(s) are present - assert any("delegate" in tool.name.lower() for tool in used_tools), "Delegation tool should be present" + assert any( + "delegate" in tool.name.lower() for tool in used_tools + ), "Delegation tool should be present" # Finally, make sure the agent's original tools remain unchanged assert len(researcher_with_delegation.tools) == 1 assert isinstance(researcher_with_delegation.tools[0], TestTool) + @pytest.mark.vcr(filter_headers=["authorization"]) def test_crew_verbose_output(capsys): tasks = [ @@ -1012,8 +1050,8 @@ def test_three_task_with_async_execution(): ) -@pytest.mark.vcr(filter_headers=["authorization"]) @pytest.mark.asyncio +@pytest.mark.vcr(filter_headers=["authorization"]) async def test_crew_async_kickoff(): inputs = [ {"topic": "dog"}, @@ -1060,8 +1098,9 @@ async def test_crew_async_kickoff(): assert result[0].token_usage.successful_requests > 0 # type: ignore +@pytest.mark.asyncio @pytest.mark.vcr(filter_headers=["authorization"]) -def test_async_task_execution_call_count(): +async def test_async_task_execution_call_count(): from unittest.mock import MagicMock, patch list_ideas = Task( @@ -1188,7 +1227,6 @@ def test_kickoff_for_each_empty_input(): assert results == [] -@pytest.mark.vcr(filter_headers=["authorization"]) def test_kickoff_for_each_invalid_input(): """Tests if kickoff_for_each raises TypeError for invalid input types.""" @@ -1211,7 +1249,6 @@ def test_kickoff_for_each_invalid_input(): crew.kickoff_for_each("invalid input") -@pytest.mark.vcr(filter_headers=["authorization"]) def test_kickoff_for_each_error_handling(): """Tests error handling in kickoff_for_each when kickoff raises an error.""" from unittest.mock import patch @@ -1248,7 +1285,6 @@ def test_kickoff_for_each_error_handling(): crew.kickoff_for_each(inputs=inputs) -@pytest.mark.vcr(filter_headers=["authorization"]) @pytest.mark.asyncio async def test_kickoff_async_basic_functionality_and_output(): """Tests the basic functionality and output of kickoff_async.""" @@ -1283,7 +1319,6 @@ async def test_kickoff_async_basic_functionality_and_output(): mock_kickoff.assert_called_once_with(inputs) -@pytest.mark.vcr(filter_headers=["authorization"]) @pytest.mark.asyncio async def test_async_kickoff_for_each_async_basic_functionality_and_output(): """Tests the basic functionality and output of kickoff_for_each_async.""" @@ -1330,7 +1365,6 @@ async def mock_kickoff_async(**kwargs): mock_kickoff_async.assert_any_call(inputs=input_data) -@pytest.mark.vcr(filter_headers=["authorization"]) @pytest.mark.asyncio async def test_async_kickoff_for_each_async_empty_input(): """Tests if akickoff_for_each_async handles an empty input list.""" @@ -1514,12 +1548,12 @@ def test_code_execution_flag_adds_code_tool_upon_kickoff(): crew = Crew(agents=[programmer], tasks=[task]) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) - with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Get the tools that were actually used in execution @@ -1528,7 +1562,10 @@ def test_code_execution_flag_adds_code_tool_upon_kickoff(): # Verify that exactly one tool was used and it was a CodeInterpreterTool assert len(used_tools) == 1, "Should have exactly one tool" - assert isinstance(used_tools[0], CodeInterpreterTool), "Tool should be CodeInterpreterTool" + assert isinstance( + used_tools[0], CodeInterpreterTool + ), "Tool should be CodeInterpreterTool" + @pytest.mark.vcr(filter_headers=["authorization"]) def test_delegation_is_not_enabled_if_there_are_only_one_agent(): @@ -1639,16 +1676,16 @@ def test_hierarchical_crew_creation_tasks_with_agents(): ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) # Because we are mocking execute_sync, we never hit the underlying _execute_core # which sets the output attribute of the task task.output = mock_task_output - with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Verify execute_sync was called once @@ -1656,12 +1693,20 @@ def test_hierarchical_crew_creation_tasks_with_agents(): # Get the tools argument from the call _, kwargs = mock_execute_sync.call_args - tools = kwargs['tools'] + tools = kwargs["tools"] # Verify the delegation tools were passed correctly assert len(tools) == 2 - assert any("Delegate a specific task to one of the following coworkers: Senior Writer" in tool.description for tool in tools) - assert any("Ask a specific question to one of the following coworkers: Senior Writer" in tool.description for tool in tools) + assert any( + "Delegate a specific task to one of the following coworkers: Senior Writer" + in tool.description + for tool in tools + ) + assert any( + "Ask a specific question to one of the following coworkers: Senior Writer" + in tool.description + for tool in tools + ) @pytest.mark.vcr(filter_headers=["authorization"]) @@ -1684,9 +1729,7 @@ def test_hierarchical_crew_creation_tasks_with_async_execution(): ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) # Create a mock Future that returns our TaskOutput @@ -1697,7 +1740,9 @@ def test_hierarchical_crew_creation_tasks_with_async_execution(): # which sets the output attribute of the task task.output = mock_task_output - with patch.object(Task, 'execute_async', return_value=mock_future) as mock_execute_async: + with patch.object( + Task, "execute_async", return_value=mock_future + ) as mock_execute_async: crew.kickoff() # Verify execute_async was called once @@ -1705,12 +1750,20 @@ def test_hierarchical_crew_creation_tasks_with_async_execution(): # Get the tools argument from the call _, kwargs = mock_execute_async.call_args - tools = kwargs['tools'] + tools = kwargs["tools"] # Verify the delegation tools were passed correctly assert len(tools) == 2 - assert any("Delegate a specific task to one of the following coworkers: Senior Writer\n" in tool.description for tool in tools) - assert any("Ask a specific question to one of the following coworkers: Senior Writer\n" in tool.description for tool in tools) + assert any( + "Delegate a specific task to one of the following coworkers: Senior Writer\n" + in tool.description + for tool in tools + ) + assert any( + "Ask a specific question to one of the following coworkers: Senior Writer\n" + in tool.description + for tool in tools + ) @pytest.mark.vcr(filter_headers=["authorization"]) @@ -2039,7 +2092,6 @@ def test_crew_output_file_end_to_end(tmp_path): assert expected_file.exists(), f"Output file {expected_file} was not created" -@pytest.mark.vcr(filter_headers=["authorization"]) def test_crew_output_file_validation_failures(): """Test output file validation failures in a crew context.""" agent = Agent( @@ -2055,7 +2107,7 @@ def test_crew_output_file_validation_failures(): description="Analyze data", expected_output="Analysis results", agent=agent, - output_file="../output.txt" + output_file="../output.txt", ) Crew(agents=[agent], tasks=[task]).kickoff() @@ -2065,7 +2117,7 @@ def test_crew_output_file_validation_failures(): description="Analyze data", expected_output="Analysis results", agent=agent, - output_file="output.txt | rm -rf /" + output_file="output.txt | rm -rf /", ) Crew(agents=[agent], tasks=[task]).kickoff() @@ -2075,7 +2127,7 @@ def test_crew_output_file_validation_failures(): description="Analyze data", expected_output="Analysis results", agent=agent, - output_file="~/output.txt" + output_file="~/output.txt", ) Crew(agents=[agent], tasks=[task]).kickoff() @@ -2085,12 +2137,11 @@ def test_crew_output_file_validation_failures(): description="Analyze data", expected_output="Analysis results", agent=agent, - output_file="{invalid-name}/output.txt" + output_file="{invalid-name}/output.txt", ) Crew(agents=[agent], tasks=[task]).kickoff() -@pytest.mark.vcr(filter_headers=["authorization"]) def test_manager_agent(): from unittest.mock import patch @@ -3049,6 +3100,7 @@ def test_task_tools_preserve_code_execution_tools(): class TestToolInput(BaseModel): """Input schema for TestTool.""" + query: str = Field(..., description="Query to process") class TestTool(BaseTool): @@ -3082,7 +3134,7 @@ def _run(self, query: str) -> str: description="Write a program to calculate fibonacci numbers.", expected_output="A working fibonacci calculator.", agent=programmer, - tools=[TestTool()] + tools=[TestTool()], ) crew = Crew( @@ -3092,12 +3144,12 @@ def _run(self, query: str) -> str: ) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) - with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Get the tools that were actually used in execution @@ -3105,12 +3157,21 @@ def _run(self, query: str) -> str: used_tools = kwargs["tools"] # Verify all expected tools are present - assert any(isinstance(tool, TestTool) for tool in used_tools), "Task's TestTool should be present" - assert any(isinstance(tool, CodeInterpreterTool) for tool in used_tools), "CodeInterpreterTool should be present" - assert any("delegate" in tool.name.lower() for tool in used_tools), "Delegation tool should be present" + assert any( + isinstance(tool, TestTool) for tool in used_tools + ), "Task's TestTool should be present" + assert any( + isinstance(tool, CodeInterpreterTool) for tool in used_tools + ), "CodeInterpreterTool should be present" + assert any( + "delegate" in tool.name.lower() for tool in used_tools + ), "Delegation tool should be present" # Verify the total number of tools (TestTool + CodeInterpreter + 2 delegation tools) - assert len(used_tools) == 4, "Should have TestTool, CodeInterpreter, and 2 delegation tools" + assert ( + len(used_tools) == 4 + ), "Should have TestTool, CodeInterpreter, and 2 delegation tools" + @pytest.mark.vcr(filter_headers=["authorization"]) def test_multimodal_flag_adds_multimodal_tools(): @@ -3139,13 +3200,13 @@ def test_multimodal_flag_adds_multimodal_tools(): crew = Crew(agents=[multimodal_agent], tasks=[task], process=Process.sequential) mock_task_output = TaskOutput( - description="Mock description", - raw="mocked output", - agent="mocked agent" + description="Mock description", raw="mocked output", agent="mocked agent" ) # Mock execute_sync to verify the tools passed at runtime - with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync: + with patch.object( + Task, "execute_sync", return_value=mock_task_output + ) as mock_execute_sync: crew.kickoff() # Get the tools that were actually used in execution @@ -3153,13 +3214,14 @@ def test_multimodal_flag_adds_multimodal_tools(): used_tools = kwargs["tools"] # Check that the multimodal tool was added - assert any(isinstance(tool, AddImageTool) for tool in used_tools), ( - "AddImageTool should be present when agent is multimodal" - ) + assert any( + isinstance(tool, AddImageTool) for tool in used_tools + ), "AddImageTool should be present when agent is multimodal" # Verify we have exactly one tool (just the AddImageTool) assert len(used_tools) == 1, "Should only have the AddImageTool" + @pytest.mark.vcr(filter_headers=["authorization"]) def test_multimodal_agent_image_tool_handling(): """ @@ -3201,10 +3263,10 @@ def test_multimodal_agent_image_tool_handling(): mock_task_output = TaskOutput( description="Mock description", raw="A detailed analysis of the image", - agent="Image Analyst" + agent="Image Analyst", ) - with patch.object(Task, 'execute_sync') as mock_execute_sync: + with patch.object(Task, "execute_sync") as mock_execute_sync: # Set up the mock to return our task output mock_execute_sync.return_value = mock_task_output @@ -3213,7 +3275,7 @@ def test_multimodal_agent_image_tool_handling(): # Get the tools that were passed to execute_sync _, kwargs = mock_execute_sync.call_args - tools = kwargs['tools'] + tools = kwargs["tools"] # Verify the AddImageTool is present and properly configured image_tools = [tool for tool in tools if tool.name == "Add image to content"] @@ -3223,7 +3285,7 @@ def test_multimodal_agent_image_tool_handling(): image_tool = image_tools[0] result = image_tool._run( image_url="https://example.com/test-image.jpg", - action="Please analyze this image" + action="Please analyze this image", ) # Verify the tool returns the expected format @@ -3233,6 +3295,7 @@ def test_multimodal_agent_image_tool_handling(): assert result["content"][0]["type"] == "text" assert result["content"][1]["type"] == "image_url" + @pytest.mark.vcr(filter_headers=["authorization"]) def test_multimodal_agent_live_image_analysis(): """ @@ -3246,7 +3309,7 @@ def test_multimodal_agent_live_image_analysis(): allow_delegation=False, multimodal=True, verbose=True, - llm="gpt-4o" + llm="gpt-4o", ) # Create a task for image analysis @@ -3257,19 +3320,18 @@ def test_multimodal_agent_live_image_analysis(): Image: {image_url} """, expected_output="A comprehensive description of the image contents.", - agent=image_analyst + agent=image_analyst, ) # Create and run the crew - crew = Crew( - agents=[image_analyst], - tasks=[analyze_image] - ) + crew = Crew(agents=[image_analyst], tasks=[analyze_image]) # Execute with an image URL - result = crew.kickoff(inputs={ - "image_url": "https://media.istockphoto.com/id/946087016/photo/aerial-view-of-lower-manhattan-new-york.jpg?s=612x612&w=0&k=20&c=viLiMRznQ8v5LzKTt_LvtfPFUVl1oiyiemVdSlm29_k=" - }) + result = crew.kickoff( + inputs={ + "image_url": "https://media.istockphoto.com/id/946087016/photo/aerial-view-of-lower-manhattan-new-york.jpg?s=612x612&w=0&k=20&c=viLiMRznQ8v5LzKTt_LvtfPFUVl1oiyiemVdSlm29_k=" + } + ) # Verify we got a meaningful response assert isinstance(result.raw, str) diff --git a/tests/knowledge/knowledge_test.py b/tests/knowledge/knowledge_test.py index 6704d30319..fad2d2513c 100644 --- a/tests/knowledge/knowledge_test.py +++ b/tests/knowledge/knowledge_test.py @@ -578,14 +578,6 @@ def test_multiple_docling_sources(): assert docling_source.content is not None -def test_docling_source_with_local_file(): - current_dir = Path(__file__).parent - pdf_path = current_dir / "crewai_quickstart.pdf" - docling_source = CrewDoclingSource(file_paths=[pdf_path]) - assert docling_source.file_paths == [pdf_path] - assert docling_source.content is not None - - def test_file_path_validation(): """Test file path validation for knowledge sources.""" current_dir = Path(__file__).parent @@ -606,6 +598,6 @@ def test_file_path_validation(): # Test neither file_path nor file_paths provided with pytest.raises( ValueError, - match="file_path/file_paths must be a Path, str, or a list of these types" + match="file_path/file_paths must be a Path, str, or a list of these types", ): PDFKnowledgeSource() diff --git a/tests/task_test.py b/tests/task_test.py index dc15c251fc..0fcb499b21 100644 --- a/tests/task_test.py +++ b/tests/task_test.py @@ -719,7 +719,7 @@ def test_interpolate_inputs(): task = Task( description="Give me a list of 5 interesting ideas about {topic} to explore for an article, what makes them unique and interesting.", expected_output="Bullet point list of 5 interesting ideas about {topic}.", - output_file="/tmp/{topic}/output_{date}.txt" + output_file="/tmp/{topic}/output_{date}.txt", ) task.interpolate_inputs(inputs={"topic": "AI", "date": "2024"}) @@ -742,41 +742,35 @@ def test_interpolate_inputs(): def test_interpolate_only(): """Test the interpolate_only method for various scenarios including JSON structure preservation.""" task = Task( - description="Unused in this test", - expected_output="Unused in this test" + description="Unused in this test", expected_output="Unused in this test" ) - + # Test JSON structure preservation json_string = '{"info": "Look at {placeholder}", "nested": {"val": "{nestedVal}"}}' result = task.interpolate_only( input_string=json_string, - inputs={"placeholder": "the data", "nestedVal": "something else"} + inputs={"placeholder": "the data", "nestedVal": "something else"}, ) assert '"info": "Look at the data"' in result assert '"val": "something else"' in result assert "{placeholder}" not in result assert "{nestedVal}" not in result - + # Test normal string interpolation normal_string = "Hello {name}, welcome to {place}!" result = task.interpolate_only( - input_string=normal_string, - inputs={"name": "John", "place": "CrewAI"} + input_string=normal_string, inputs={"name": "John", "place": "CrewAI"} ) assert result == "Hello John, welcome to CrewAI!" - + # Test empty string - result = task.interpolate_only( - input_string="", - inputs={"unused": "value"} - ) + result = task.interpolate_only(input_string="", inputs={"unused": "value"}) assert result == "" - + # Test string with no placeholders no_placeholders = "Hello, this is a test" result = task.interpolate_only( - input_string=no_placeholders, - inputs={"unused": "value"} + input_string=no_placeholders, inputs={"unused": "value"} ) assert result == no_placeholders @@ -880,56 +874,65 @@ def test_key(): def test_output_file_validation(): """Test output file path validation.""" # Valid paths - assert Task( - description="Test task", - expected_output="Test output", - output_file="output.txt" - ).output_file == "output.txt" - assert Task( - description="Test task", - expected_output="Test output", - output_file="/tmp/output.txt" - ).output_file == "tmp/output.txt" - assert Task( - description="Test task", - expected_output="Test output", - output_file="{dir}/output_{date}.txt" - ).output_file == "{dir}/output_{date}.txt" - + assert ( + Task( + description="Test task", + expected_output="Test output", + output_file="output.txt", + ).output_file + == "output.txt" + ) + assert ( + Task( + description="Test task", + expected_output="Test output", + output_file="/tmp/output.txt", + ).output_file + == "tmp/output.txt" + ) + assert ( + Task( + description="Test task", + expected_output="Test output", + output_file="{dir}/output_{date}.txt", + ).output_file + == "{dir}/output_{date}.txt" + ) + # Invalid paths with pytest.raises(ValueError, match="Path traversal"): Task( description="Test task", expected_output="Test output", - output_file="../output.txt" + output_file="../output.txt", ) with pytest.raises(ValueError, match="Path traversal"): Task( description="Test task", expected_output="Test output", - output_file="folder/../output.txt" + output_file="folder/../output.txt", ) with pytest.raises(ValueError, match="Shell special characters"): Task( description="Test task", expected_output="Test output", - output_file="output.txt | rm -rf /" + output_file="output.txt | rm -rf /", ) with pytest.raises(ValueError, match="Shell expansion"): Task( description="Test task", expected_output="Test output", - output_file="~/output.txt" + output_file="~/output.txt", ) with pytest.raises(ValueError, match="Shell expansion"): Task( description="Test task", expected_output="Test output", - output_file="$HOME/output.txt" + output_file="$HOME/output.txt", ) with pytest.raises(ValueError, match="Invalid template variable"): Task( description="Test task", expected_output="Test output", - output_file="{invalid-name}/output.txt" + output_file="{invalid-name}/output.txt", ) diff --git a/tests/test_manager_llm_delegation.py b/tests/test_manager_llm_delegation.py index d1f2068e4c..6f8671255f 100644 --- a/tests/test_manager_llm_delegation.py +++ b/tests/test_manager_llm_delegation.py @@ -8,48 +8,49 @@ class TestAgentTool(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 - ('futel official infopoint', True), # lowercase - ('FUTEL OFFICIAL INFOPOINT', True), # uppercase - ('Non Existent Agent', False), # non-existent agent - (None, False), # None agent name -]) + +@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 + ("futel official infopoint", True), # lowercase + ("FUTEL OFFICIAL INFOPOINT", True), # uppercase + ("Non Existent Agent", False), # non-existent agent + (None, False), # None agent name + ], +) 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 + role="Futel Official Infopoint", + goal="Answer questions about Futel", + backstory="Futel Football Club info", + allow_delegation=False, ) # Create test agent tool agent_tool = TestAgentTool( - name="test_tool", - description="Test tool", - agents=[test_agent] + 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 - ) + 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}" + 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}" + assert ( + "coworker mentioned not found" in result.lower() + ), f"Should not find agent with role name: {role_name}" diff --git a/tests/test_task_guardrails.py b/tests/test_task_guardrails.py index dc96cb8789..e22e762343 100644 --- a/tests/test_task_guardrails.py +++ b/tests/test_task_guardrails.py @@ -15,10 +15,7 @@ def test_task_without_guardrail(): agent.execute_task.return_value = "test result" agent.crew = None - task = Task( - description="Test task", - expected_output="Output" - ) + task = Task(description="Test task", expected_output="Output") result = task.execute_sync(agent=agent) assert isinstance(result, TaskOutput) @@ -27,6 +24,7 @@ def test_task_without_guardrail(): def test_task_with_successful_guardrail(): """Test that successful guardrail validation passes transformed result.""" + def guardrail(result: TaskOutput): return (True, result.raw.upper()) @@ -35,11 +33,7 @@ def guardrail(result: TaskOutput): agent.execute_task.return_value = "test result" agent.crew = None - task = Task( - description="Test task", - expected_output="Output", - guardrail=guardrail - ) + task = Task(description="Test task", expected_output="Output", guardrail=guardrail) result = task.execute_sync(agent=agent) assert isinstance(result, TaskOutput) @@ -48,22 +42,20 @@ def guardrail(result: TaskOutput): def test_task_with_failing_guardrail(): """Test that failing guardrail triggers retry with error context.""" + def guardrail(result: TaskOutput): return (False, "Invalid format") agent = Mock() agent.role = "test_agent" - agent.execute_task.side_effect = [ - "bad result", - "good result" - ] + agent.execute_task.side_effect = ["bad result", "good result"] agent.crew = None task = Task( description="Test task", expected_output="Output", guardrail=guardrail, - max_retries=1 + max_retries=1, ) # First execution fails guardrail, second succeeds @@ -77,6 +69,7 @@ def guardrail(result: TaskOutput): def test_task_with_guardrail_retries(): """Test that guardrail respects max_retries configuration.""" + def guardrail(result: TaskOutput): return (False, "Invalid format") @@ -89,7 +82,7 @@ def guardrail(result: TaskOutput): description="Test task", expected_output="Output", guardrail=guardrail, - max_retries=2 + max_retries=2, ) with pytest.raises(Exception) as exc_info: @@ -102,6 +95,7 @@ def guardrail(result: TaskOutput): def test_guardrail_error_in_context(): """Test that guardrail error is passed in context for retry.""" + def guardrail(result: TaskOutput): return (False, "Expected JSON, got string") @@ -113,11 +107,12 @@ def guardrail(result: TaskOutput): description="Test task", expected_output="Output", guardrail=guardrail, - max_retries=1 + max_retries=1, ) # Mock execute_task to succeed on second attempt first_call = True + def execute_task(task, context, tools): nonlocal first_call if first_call: diff --git a/uv.lock b/uv.lock index dad7b150ea..0e3e632760 100644 --- a/uv.lock +++ b/uv.lock @@ -1,18 +1,18 @@ version = 1 requires-python = ">=3.10, <3.13" resolution-markers = [ - "python_full_version < '3.11' and platform_system == 'Darwin'", - "python_full_version < '3.11' and platform_machine == 'aarch64' and platform_system == 'Linux'", - "(python_full_version < '3.11' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version < '3.11' and platform_system != 'Darwin' and platform_system != 'Linux')", - "python_full_version == '3.11.*' and platform_system == 'Darwin'", - "python_full_version == '3.11.*' and platform_machine == 'aarch64' and platform_system == 'Linux'", - "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version == '3.11.*' and platform_system != 'Darwin' and platform_system != 'Linux')", - "python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_system == 'Darwin'", - "python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine == 'aarch64' and platform_system == 'Linux'", - "(python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_system != 'Darwin' and platform_system != 'Linux')", - "python_full_version >= '3.12.4' and platform_system == 'Darwin'", - "python_full_version >= '3.12.4' and platform_machine == 'aarch64' and platform_system == 'Linux'", - "(python_full_version >= '3.12.4' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version >= '3.12.4' and platform_system != 'Darwin' and platform_system != 'Linux')", + "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')", + "python_full_version == '3.11.*' and sys_platform == 'darwin'", + "python_full_version == '3.11.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version == '3.11.*' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version == '3.11.*' and sys_platform != 'darwin' and sys_platform != 'linux')", + "python_full_version >= '3.12' and python_full_version < '3.12.4' and sys_platform == 'darwin'", + "python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.12.4' and sys_platform != 'darwin' and sys_platform != 'linux')", + "python_full_version >= '3.12.4' and sys_platform == 'darwin'", + "python_full_version >= '3.12.4' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "(python_full_version >= '3.12.4' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12.4' and sys_platform != 'darwin' and sys_platform != 'linux')", ] [[package]] @@ -683,7 +683,7 @@ requires-dist = [ { name = "instructor", specifier = ">=1.3.3" }, { name = "json-repair", specifier = ">=0.25.2" }, { name = "jsonref", specifier = ">=1.1.0" }, - { name = "litellm", specifier = ">=1.56.4" }, + { name = "litellm", specifier = ">=1.44.22" }, { name = "mem0ai", marker = "extra == 'mem0'", specifier = ">=0.1.29" }, { name = "openai", specifier = ">=1.13.3" }, { name = "openpyxl", specifier = ">=3.1.5" }, @@ -2229,24 +2229,24 @@ wheels = [ [[package]] name = "litellm" -version = "1.56.4" +version = "1.50.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohttp" }, { name = "click" }, - { name = "httpx" }, { name = "importlib-metadata" }, { name = "jinja2" }, { name = "jsonschema" }, { name = "openai" }, { name = "pydantic" }, { name = "python-dotenv" }, + { name = "requests" }, { name = "tiktoken" }, { name = "tokenizers" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/83/ea/2c51d16c244a64dd3f0bdb1757aef798cf943b92e5695da04e3e42ba09e0/litellm-1.56.4.tar.gz", hash = "sha256:2808ca21878d200f7676a3d11e5bf2b5e3349ae504628f279cd7297c7dbd2038", size = 6284983 } +sdist = { url = "https://files.pythonhosted.org/packages/a7/45/4d54617b267a96f1f7c17c0010ea1aba20e30a3672b873fe92a6001e5952/litellm-1.50.2.tar.gz", hash = "sha256:b244c9a0e069cc626b85fb9f5cc252114aaff1225500da30ce0940f841aef8ea", size = 6096949 } wheels = [ - { url = "https://files.pythonhosted.org/packages/8f/25/2fd7b28a270b2963e8fa0ecf6aab4db47c54d932cc5aac8bc87e7ebc3755/litellm-1.56.4-py3-none-any.whl", hash = "sha256:699a8db46f7de045069a77c435e13244b5fdaf5df1c8cb5e6ad675ef7e104ccd", size = 6564370 }, + { url = "https://files.pythonhosted.org/packages/22/f3/89a4d65d1b9286eb5ac6a6e92dd93523d92f3142a832e60c00d5cad64176/litellm-1.50.2-py3-none-any.whl", hash = "sha256:99cac60c78037946ab809b7cfbbadad53507bb2db8ae39391b4be215a0869fdd", size = 6318265 }, ] [[package]] @@ -2900,7 +2900,7 @@ name = "nvidia-cudnn-cu12" version = "9.1.0.70" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/9f/fd/713452cd72343f682b1c7b9321e23829f00b842ceaedcda96e742ea0b0b3/nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f", size = 664752741 }, @@ -2927,9 +2927,9 @@ name = "nvidia-cusolver-cu12" version = "11.4.5.107" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, - { name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, - { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" }, + { name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" }, + { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/bc/1d/8de1e5c67099015c834315e333911273a8c6aaba78923dd1d1e25fc5f217/nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl", hash = "sha256:8a7ec542f0412294b15072fa7dab71d31334014a69f953004ea7a118206fe0dd", size = 124161928 }, @@ -2940,7 +2940,7 @@ name = "nvidia-cusparse-cu12" version = "12.1.0.106" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/65/5b/cfaeebf25cd9fdec14338ccb16f6b2c4c7fa9163aefcf057d86b9cc248bb/nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:f3b50f42cf363f86ab21f720998517a659a48131e8d538dc02f8768237bd884c", size = 195958278 }, @@ -3040,7 +3040,7 @@ wheels = [ [[package]] name = "openai" -version = "1.58.1" +version = "1.52.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -3052,9 +3052,9 @@ dependencies = [ { name = "tqdm" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/27/3c/b1ecce430ed56fa3ac1b0676966d3250aab9c70a408232b71e419ea62148/openai-1.58.1.tar.gz", hash = "sha256:f5a035fd01e141fc743f4b0e02c41ca49be8fab0866d3b67f5f29b4f4d3c0973", size = 343411 } +sdist = { url = "https://files.pythonhosted.org/packages/80/ac/54c76352d493866637756b7c0ecec44f0b5bafb8fe753d98472cf6cfe4ce/openai-1.52.1.tar.gz", hash = "sha256:383b96c7e937cbec23cad5bf5718085381e4313ca33c5c5896b54f8e1b19d144", size = 310069 } wheels = [ - { url = "https://files.pythonhosted.org/packages/8e/5a/d22cd07f1a99b9e8b3c92ee0c1959188db4318828a3d88c9daac120bdd69/openai-1.58.1-py3-none-any.whl", hash = "sha256:e2910b1170a6b7f88ef491ac3a42c387f08bd3db533411f7ee391d166571d63c", size = 454279 }, + { url = "https://files.pythonhosted.org/packages/ad/31/28a83e124e9f9dd04c83b5aeb6f8b1770f45addde4dd3d34d9a9091590ad/openai-1.52.1-py3-none-any.whl", hash = "sha256:f23e83df5ba04ee0e82c8562571e8cb596cd88f9a84ab783e6c6259e5ffbfb4a", size = 386945 }, ] [[package]] @@ -5165,7 +5165,7 @@ name = "triton" version = "3.0.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "filelock", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" }, + { name = "filelock", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/45/27/14cc3101409b9b4b9241d2ba7deaa93535a217a211c86c4cc7151fb12181/triton-3.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e1efef76935b2febc365bfadf74bcb65a6f959a9872e5bddf44cc9e0adce1e1a", size = 209376304 },