Commit Graph

1168 Commits

Author SHA1 Message Date
Devin AI
47919a60a0 fix: Replace json with model_json to avoid overriding BaseModel methods
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:32:42 +00:00
Devin AI
6b9ed90510 fix: Update base_agent_tools and base_tool to fix type errors
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:30:44 +00:00
Devin AI
f6a65486f1 fix: Update json and model_dump_json signatures to match BaseModel
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:27:57 +00:00
Devin AI
bf6db93bdf fix: Add proper type hints to EmbeddingConfigurator
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:23:04 +00:00
Devin AI
25e68bc459 fix: Restore agent.py and fix merge conflicts
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:21:31 +00:00
Devin AI
6f6010db1c fix: Resolve merge conflicts properly
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:19:18 +00:00
Devin AI
a95227deef fix: Resolve merge conflicts, keeping our changes
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:18:12 +00:00
Devin AI
636dac6efb fix: Update embedding configuration and fix type errors
- Add configurable embedding providers (OpenAI, Ollama)
- Fix type hints in base_tool and structured_tool
- Add proper json property implementations
- Update documentation for memory configuration
- Add environment variables for embedding configuration
- Fix type errors in task and crew output classes

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:16:51 +00:00
João Moura
a4e2b17bae Merge branch 'main' into devin/1738752192-fix-memory-reset-openai-dependency 2025-02-09 15:43:20 -03:00
João Moura
8eef02739a adding shoutout to enterprise 2025-02-09 12:55:33 -05:00
Brandon Hancock (bhancock_ai)
6f4ad532e6 Brandon/general cleanup (#2059)
* clean up. fix type safety. address memory config docs

* improve manager

* Include fix for o1 models not supporting system messages

* more broad with o1

* address fix: Typo in expected_output string #2045

* drop prints

* drop prints

* wip

* wip

* fix failing memory tests

* Fix memory provider issue

* clean up short term memory

* revert ltm

* drop

* clean up linting issues

* more linting
2025-02-07 17:00:41 -05:00
Brandon Hancock (bhancock_ai)
74a1de8550 clean up google docs (#2061) 2025-02-07 16:58:13 -05:00
Lorenze Jay
e529766391 Enhance embedding configuration with custom embedder support (#2060)
* Enhance embedding configuration with custom embedder support

- Add support for custom embedding functions in EmbeddingConfigurator
- Update type hints for embedder configuration
- Extend configuration options for various embedding providers
- Add optional embedder configuration to Memory class

* added docs

* Refine custom embedder configuration support

- Update custom embedder configuration method to handle custom embedding functions
- Modify type hints for embedder configuration
- Remove unused model_name parameter in custom embedder configuration
2025-02-07 16:49:46 -05:00
Brandon Hancock (bhancock_ai)
a7f5d574dc General Clean UP (#2042)
* clean up. fix type safety. address memory config docs

* improve manager

* Include fix for o1 models not supporting system messages

* more broad with o1

* address fix: Typo in expected_output string #2045

* drop prints

* drop prints

* wip

* wip

* fix failing memory tests

* Fix memory provider issue

* clean up short term memory

* revert ltm

* drop
2025-02-07 14:45:36 -05:00
Vidit Ostwal
0cc02d9492 Added support for logging in JSON format as well. (#1985)
* Added functionality to have json format as well for the logs

* Added additional comments, refractored logging functionality

* Fixed documentation to include the new paramter

* Fixed typo

* Added a Pydantic Error Check between output_log_file and save_as_json parameter

* Removed the save_to_json parameter, incorporated the functionality directly with output_log_file

* Fixed typo

* Sorted the imports using isort

---------

Co-authored-by: Vidit Ostwal <vidit.ostwal@piramal.com>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-07 13:16:44 -05:00
Vidit Ostwal
fa26f6ebae Added reset memories function inside crew class (#2047)
* Added reset memories function inside crew class

* Fixed typos

* Refractored the code

* Refactor memory reset functionality in Crew class

- Improved error handling and logging for memory reset operations
- Added private methods to modularize memory reset logic
- Enhanced type hints and docstrings
- Updated CLI reset memories command to use new Crew method
- Added utility function to get crew instance in CLI utils

* fix linting issues

* knowledge: Add null check in reset method for storage

* cli: Update memory reset tests to use Crew's reset_memories method

* cli: Enhance memory reset command with improved error handling and validation

---------

Co-authored-by: Lorenze Jay <lorenzejaytech@gmail.com>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-07 09:49:25 -08:00
Brandon Hancock (bhancock_ai)
f6c2982619 fix manager (#2056) 2025-02-07 10:58:38 -05:00
hyjbrave
5a8649a97f fix unstructured example flow (#2052) 2025-02-07 10:38:15 -05:00
Nicolas Lorin
e6100debac agent: improve knowledge naming (#2041) 2025-02-06 15:19:22 -05:00
João Moura
abee94d056 fix version 2025-02-05 21:19:28 -08:00
Thiago Moretto
92731544ae Fix ignored Crew task callback when one is set on the Task (#2040)
* Fix ignored Crew task callback when one is set on the Task

* type checking
2025-02-05 15:53:15 -05:00
Nicolas Lorin
77c7b7dfa1 FIX: correctly initialize embedder for crew knowledge (#2035) 2025-02-05 10:55:09 -05:00
Devin AI
823f22a601 fix: Remove OpenAI dependency for memory reset when using alternative LLMs
- Add environment variables for default embedding provider
- Support Ollama as default embedding provider
- Add tests for memory reset with different providers
- Update documentation

Fixes #2023

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 11:09:36 +00:00
Devin AI
649414805d fix: Remove OpenAI dependency for memory reset when using alternative LLMs
- Add environment variables for default embedding provider
- Support Ollama as default embedding provider
- Add tests for memory reset with different providers
- Update documentation

Fixes #2023

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:56:01 +00:00
Devin AI
8017ab2dfd docs: Add memory configuration documentation
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:46:43 +00:00
Devin AI
6445cda35a fix: Use custom path for memory reset
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:46:21 +00:00
Devin AI
6116c73721 test: Use temporary directory for memory reset tests
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:45:53 +00:00
Devin AI
a038b751ef test: Add memory reset tests for different embedding providers
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:45:21 +00:00
Devin AI
5006161d31 fix: Add type safety to RAGStorage initialization
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:45:07 +00:00
Devin AI
85a13751ba fix: Add type safety to embedding configurator
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:44:59 +00:00
Devin AI
1c7c4cb828 refactor: Remove duplicate embedding function from RAGStorage
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:44:40 +00:00
Devin AI
509fb375ca feat: Update embedding configurator to support configurable default providers
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:43:58 +00:00
Devin AI
d01d44b29c feat: Add default embedding provider and model constants
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-05 10:43:38 +00:00
Juan Figuera
ea64c29fee Added expected_output field to tasks to prevent ValidationError from Pydantic (#1971)
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-04 16:49:29 -05:00
Brandon Hancock (bhancock_ai)
f4bb040ad8 Brandon/improve llm structured output (#2029)
* code and tests work

* update docs

---------

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-02-04 16:46:48 -05:00
rishi154
515478473a Fix : short_term_memory with bedrock - using user defined model(when passed as attribute) rather than default (#1959)
* Update embedding_configurator.py

Modified  _configure_bedrock method to use user submitted model_name rather than default  amazon.titan-embed-text-v1.

Sending model_name in short_term_memory (embedder_config/config) was not working.


 # Passing model_name to use model_name provide by user than using default. Added if/else for backward compatibility

* Update embedding_configurator.py

Incorporated review comments

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-04 16:44:07 -05:00
TomuHirata
9cf3fadd0f Add documentation for mlflow tracing integration (#1988)
Signed-off-by: Tomu Hirata <tomu.hirata@gmail.com>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-04 16:18:50 -05:00
jinx
89c4b3fe88 Correct current year in tasks, to get more up to date results (#2010)
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-04 16:07:22 -05:00
Vidit Ostwal
9e5c599f58 Fixed the memory documentation (#2031) 2025-02-04 16:03:38 -05:00
Vidit Ostwal
a950e67c7d Fixed the documentation (#2017)
* Fixed the documentation

* Fixed typo, improved description

---------

Co-authored-by: Vidit Ostwal <vidit.ostwal@piramal.com>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-04 12:56:00 -05:00
Tony Kipkemboi
de6933b2d2 Merge pull request #2028 from crewAIInc/brandon/update-litellm-for-o3
update litellm to support o3-mini and deepseek. Update docs.
2025-02-04 12:40:36 -05:00
Brandon Hancock
748383d74c update litellm to support o3-mini and deepseek. Update docs. 2025-02-04 10:58:34 -05:00
Brandon Hancock (bhancock_ai)
23b9e10323 Brandon/provide llm additional params (#2018)
Some checks failed
Mark stale issues and pull requests / stale (push) Has been cancelled
* Clean up to match enterprise

* add additional params to LLM calls

* make sure additional params are getting passed to llm

* update docs

* drop print
2025-01-31 12:53:58 -05:00
Brandon Hancock (bhancock_ai)
ddb7958da7 Clean up to match enterprise (#2009)
* Clean up to match enterprise

* improve feedback prompting
2025-01-30 18:16:10 -05:00
Brandon Hancock (bhancock_ai)
477cce321f Fix llms (#2003)
* iwp

* add in api_base

---------

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-01-29 19:41:09 -05:00
Brandon Hancock (bhancock_ai)
7bed63a693 Bugfix/fix broken training (#1993)
* Fixing training while refactoring code

* improve prompts

* make sure to raise an error when missing training data

* Drop comment

* fix failing tests

* add clear

* drop bad code

* fix failing test

* Fix type issues pointed out by lorenze

* simplify training
2025-01-29 19:11:14 -05:00
Lorenze Jay
2709a9205a fixes interpolation issues when inputs are type dict,list specificall… (#1992)
* fixes interpolation issues when inputs are type dict,list specifically when defined on expected_output

* improvements with type hints, doc fixes and rm print statements

* more tests

* test passing

---------

Co-authored-by: Brandon Hancock <brandon@brandonhancock.io>
2025-01-29 13:24:50 -05:00
Daniel Barreto
d19d7b01ec docs: add a "Human Input" row to the Task Attributes table (#1999) 2025-01-29 10:11:48 -05:00
Lorenze Jay
a3ad2c1957 fix breakage when cloning agent/crew using knowledge_sources and enable custom knowledge_storage (#1927)
* fix breakage when cloning agent/crew using knowledge_sources

* fixed typo

* better

* ensure use of other knowledge storage works

* fix copy and custom storage

* added tests

* normalized name

* updated cassette

* fix test

* remove fixture

* fixed test

* fix

* add fixture to this

* add fixture to this

* patch twice since

* fix again

* with fixtures

* better mocks

* fix

* simple

* try

* another

* hopefully fixes test

* hopefully fixes test

* this should fix it !

* WIP: test check with prints

* try this

* exclude knowledge

* fixes

* just drop clone for now

* rm print statements

* printing agent_copy

* checker

* linted

* cleanup

* better docs

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-01-29 09:37:22 -05:00
Paul Nugent
c3e7a3ec19 Merge pull request #1991 from crewAIInc/feat/update-litellm-for-deepseek-support
update litellm for deepseek
2025-01-28 17:32:05 +00:00