mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
fix: fix typing hinting issue on code
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
import inspect
|
import inspect
|
||||||
import yaml
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pydantic import ConfigDict
|
|
||||||
|
|
||||||
|
import yaml
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
from pydantic import ConfigDict
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
@@ -13,7 +12,7 @@ load_dotenv()
|
|||||||
def CrewBase(cls):
|
def CrewBase(cls):
|
||||||
class WrappedClass(cls):
|
class WrappedClass(cls):
|
||||||
model_config = ConfigDict(arbitrary_types_allowed=True)
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
||||||
is_crew_class: bool = True
|
is_crew_class: bool = True # type: ignore
|
||||||
|
|
||||||
base_directory = None
|
base_directory = None
|
||||||
for frame_info in inspect.stack():
|
for frame_info in inspect.stack():
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class AgentTools(BaseModel):
|
|||||||
):
|
):
|
||||||
"""Useful to delegate a specific task to a co-worker passing all necessary context and names."""
|
"""Useful to delegate a specific task to a co-worker passing all necessary context and names."""
|
||||||
coworker = coworker or kwargs.get("co_worker") or kwargs.get("co-worker")
|
coworker = coworker or kwargs.get("co_worker") or kwargs.get("co-worker")
|
||||||
|
if coworker is not None:
|
||||||
is_list = coworker.startswith("[") and coworker.endswith("]")
|
is_list = coworker.startswith("[") and coworker.endswith("]")
|
||||||
if is_list:
|
if is_list:
|
||||||
coworker = coworker[1:-1].split(",")[0]
|
coworker = coworker[1:-1].split(",")[0]
|
||||||
@@ -48,6 +49,7 @@ class AgentTools(BaseModel):
|
|||||||
):
|
):
|
||||||
"""Useful to ask a question, opinion or take from a co-worker passing all necessary context and names."""
|
"""Useful to ask a question, opinion or take from a co-worker passing all necessary context and names."""
|
||||||
coworker = coworker or kwargs.get("co_worker") or kwargs.get("co-worker")
|
coworker = coworker or kwargs.get("co_worker") or kwargs.get("co-worker")
|
||||||
|
if coworker is not None:
|
||||||
is_list = coworker.startswith("[") and coworker.endswith("]")
|
is_list = coworker.startswith("[") and coworker.endswith("]")
|
||||||
if is_list:
|
if is_list:
|
||||||
coworker = coworker[1:-1].split(",")[0]
|
coworker = coworker[1:-1].split(",")[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user