Commit Graph

1178 Commits

Author SHA1 Message Date
Devin AI
86844ff3df fix: Update _generate_embedding signature to match BaseRAGStorage
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:43:24 +00:00
Devin AI
b442fe20a2 fix: Add to_structured_tool method to BaseTool
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:42:17 +00:00
Devin AI
9b1b1d33ba fix: Handle exclude parameter type conversion in Task.copy
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:40:55 +00:00
Devin AI
3c350e8933 fix: Update copy method in Task to match BaseModel signature
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:39:59 +00:00
Devin AI
a3a5507f9a fix: Update default_factory in BaseAgent to use lambda functions
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:38:14 +00:00
Devin AI
a175167aaf fix: Update default_factory in Task to use lambda functions
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:38:13 +00:00
Devin AI
1dc62b0d0a fix: Update args_schema type in BaseTool
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:36:55 +00:00
Devin AI
75b376ebac fix: Use UsageMetrics as default_factory for token_usage
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:35:50 +00:00
Devin AI
29106068b7 fix: Use pydantic.main.IncEx and fix default_factory types
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:34:53 +00:00
Devin AI
3bf531189f fix: Update type hints in TaskOutput and CrewOutput to match BaseModel
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-09 19:33:54 +00:00
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