-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduce structure keys * Add agent key to tasks * Rebasing is hard * Rename task output telemetry * Feedback
- Loading branch information
Showing
7 changed files
with
133 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import hashlib | ||
from typing import Any, List, Optional | ||
|
||
from crewai.agents.agent_builder.base_agent import BaseAgent | ||
from pydantic import BaseModel | ||
|
||
|
||
class TestAgent(BaseAgent): | ||
def execute_task( | ||
self, | ||
task: Any, | ||
context: Optional[str] = None, | ||
tools: Optional[List[Any]] = None, | ||
) -> str: | ||
return "" | ||
|
||
def create_agent_executor(self, tools=None) -> None: ... | ||
|
||
def _parse_tools(self, tools: List[Any]) -> List[Any]: | ||
return [] | ||
|
||
def get_delegation_tools(self, agents: List["BaseAgent"]): ... | ||
|
||
def get_output_converter( | ||
self, llm: Any, text: str, model: type[BaseModel] | None, instructions: str | ||
): ... | ||
|
||
|
||
def test_key(): | ||
agent = TestAgent( | ||
role="test role", | ||
goal="test goal", | ||
backstory="test backstory", | ||
) | ||
hash = hashlib.md5("test role|test goal|test backstory".encode()).hexdigest() | ||
assert agent.key == hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters