Commit Graph

44 Commits

Author SHA1 Message Date
Greyson LaLonde
1f0001b644 Implement CrewAIBaseModel and Update to ConfigDict (#29)
New CrewAIBaseModel:

Base for Agent, Crew, Task.
Includes generated, frozen UUID.
Adds hashing capability
Migrate to ConfigDict:

Replaces class Config with model_config, see this deprecation note .
Benefits:
Adds auditing capability with frozen UUIDs.
2023-12-30 21:52:04 -03:00
João Moura
8547d4651b Small updates to the code formatting 2023-12-30 10:53:10 -03:00
João Moura
2b06dd263f Adding verbose levels 2023-12-30 07:41:38 -03:00
Greyson LaLonde
ed61f467b1 Update to use absolute imports (#17)
Update to use absolute imports
2023-12-29 22:39:59 -03:00
João Moura
d3ecd1d490 Adding tool caching a loop execution prevention. (#25)
* Adding tool caching a loop execution prevention.

This adds some guardrails, to both prevent the same tool to be used
consecutively and also caching tool's results across the entire crew
so it cuts down execution time and eventual LLM calls.

This plays a huge role for smaller opensource models that usually fall
into those behaviors patterns.

It also includes some smaller improvements around the tool prompt and
agent tools, all with the same intention of guiding models into
better conform with agent instructions.
2023-12-29 22:35:23 -03:00
Greyson LaLonde
d214100f0a Refactor Codebase to Use Pydantic v2 and Enhance Type Hints, Documentation (#24)
Update to Pydantic v2:

Transitioned all references from pydantic.v1 to pydantic (v2), ensuring compatibility with the latest Pydantic features and improvements.
Affected components include agent tools, prompts, crew, and task modules.
Refactoring & Alignment with Pydantic Standards:

Refactored the agent module away from traditional __init__ to align more closely with Pydantic best practices.
Updated the crew module to Pydantic v2 and enhanced configurations, allowing JSON and dictionary inputs. Additionally, some (not all) exceptions have been migrated to leverage Pydantic's error-handling capabilities.
Enhancements to Validators and Typings:

Improved validators and type annotations across multiple modules, enhancing code readability and maintainability.
Streamlined the validation process in line with Pydantic v2's methodologies.
Import and Configuration Adjustments:

Updated to test-related absolute imports due to issues with Pytest finding packages through relative imports.
2023-12-29 21:24:30 -03:00
Greyson Lalonde
1547986b69 Make tools a subpackage 2023-12-27 15:13:42 -05:00
Greyson Lalonde
73716f35fc Run pre-commit hooks
In the title !
2023-12-27 15:13:42 -05:00
João Moura
f00e7e89f4 removing AgentVote class 2023-12-27 16:18:08 -03:00
Jerry Liu
fdb94450d6 cr 2023-12-27 09:27:15 -08:00
João Moura
fb511a6488 small updates 2023-12-25 11:18:47 -03:00
João Moura
9e03b5d50e adding more specific guidelines to agent delegation tools 2023-12-25 11:13:46 -03:00
JamesChannel1
571da68fab Update agent.py
updated docstring
2023-12-25 00:38:21 +00:00
João Moura
2bd15411da Updating openai version 2023-12-20 17:21:48 -03:00
João Moura
8c785b2c72 Adding proper support to memory-less agents 2023-12-20 11:30:56 -03:00
Joao Moura
cb2be30949 rolling back prompt with --- 2023-12-05 00:09:44 -08:00
Joao Moura
cd30e2a5ba Making config optional with default value as it's WIP and Adding new treatment for wrong agent tool calls 2023-12-04 23:58:48 -08:00
Joao Moura
601b35acc8 slightly modifications on prompt 2023-12-04 00:12:36 -08:00
Joao Moura
c9b2e898ee Allwoing to use other LLM that are not OpenAI 2023-11-24 17:09:06 -03:00
Joao Moura
7b66df22b1 Preparing to cut new version 2023-11-18 22:11:10 -03:00
Joao Moura
f1b3875073 Adding verbose option for crew 2023-11-15 17:29:47 -03:00
Joao Moura
492f361634 adding extra detail on delegtion errors so LLM can recover 2023-11-15 00:41:17 -03:00
Joao Moura
a99b460164 adding verbose option to agents 2023-11-14 01:37:24 -03:00
Joao Moura
4e984e9317 adding extra tests 2023-11-12 22:54:47 -03:00
Joao Moura
e6f928abef Adding JSON config support 2023-11-12 22:50:55 -03:00
Joao Moura
7fe3d630bb Updating prompt 2023-11-10 18:15:54 -03:00
Joao Moura
6ff18128a7 Add support to delegate work 2023-11-10 18:15:45 -03:00
Joao Moura
d6989b7959 Using only summary memory for now and intial work on work delegation 2023-11-10 18:14:52 -03:00
Joao Moura
9d3015e63d Adding new specs 2023-11-08 22:23:05 -03:00
Joao Moura
3a37dd76f9 rolling abckt o pydantic v1 2023-11-05 23:51:45 -03:00
Joao Moura
f412c69b00 commenting out non-implemented processes 2023-11-05 23:47:44 -03:00
Joao Moura
57ecd52ba5 Removing Import 2023-11-05 23:47:31 -03:00
Joao Moura
ca3859067a Adding emotional pressure to prompt 2023-11-05 23:45:29 -03:00
Joao Moura
6329d724e3 implementing sequential process 2023-11-05 23:45:16 -03:00
Joao Moura
48aa2a8750 adding context to agent task execution 2023-11-05 23:44:02 -03:00
Joao Moura
1f02c0b276 updating code to usinf pydantic v1 2023-11-05 18:21:47 -03:00
Joao Moura
ca0ce2b353 starting agent voting system 2023-11-05 17:44:09 -03:00
Joao Moura
c936181cc1 updating agente with long term memory 2023-11-05 17:43:23 -03:00
Joao Moura
c4f86a60bb adding agent vote 2023-11-05 16:21:22 -03:00
Joao Moura
15d4871b52 initial crew class 2023-11-05 14:26:59 -03:00
Joao Moura
ffd0444f11 adding process and task modules 2023-11-05 14:21:35 -03:00
Joao Moura
afd8ae40e0 updating agent_test 2023-11-05 14:19:55 -03:00
Joao Moura
29d91513d5 updating agent 2023-11-05 14:19:32 -03:00
Joao Moura
308349442c first stab at early concepts 2023-10-29 19:51:59 -03:00