Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions DeepResearch/src/tools/bioinformatics_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
from typing import Dict, List, Optional, Any
from pydantic import BaseModel, Field

# Note: defer decorator is not available in current pydantic-ai version

from .base import ToolSpec, ToolRunner, ExecutionResult, registry
from ..datatypes.bioinformatics import (
GOAnnotation,
Expand Down Expand Up @@ -55,8 +53,7 @@ def from_config(cls, config: Dict[str, Any], **kwargs) -> "BioinformaticsToolDep
)


# Deferred tool definitions for bioinformatics data processing
# @defer - not available in current pydantic-ai version
# Tool definitions for bioinformatics data processing
def go_annotation_processor(
annotations: List[Dict[str, Any]],
papers: List[Dict[str, Any]],
Expand All @@ -68,7 +65,6 @@ def go_annotation_processor(
return []


# @defer - not available in current pydantic-ai version
def pubmed_paper_retriever(
query: str, max_results: int = 100, year_min: Optional[int] = None
) -> List[PubMedPaper]:
Expand All @@ -78,7 +74,6 @@ def pubmed_paper_retriever(
return []


# @defer - not available in current pydantic-ai version
def geo_data_retriever(
series_ids: List[str], include_expression: bool = True
) -> List[GEOSeries]:
Expand All @@ -88,7 +83,6 @@ def geo_data_retriever(
return []


# @defer - not available in current pydantic-ai version
def drug_target_mapper(
drug_ids: List[str], target_types: Optional[List[str]] = None
) -> List[DrugTarget]:
Expand All @@ -98,7 +92,6 @@ def drug_target_mapper(
return []


# @defer - not available in current pydantic-ai version
def protein_structure_retriever(
pdb_ids: List[str], include_interactions: bool = True
) -> List[ProteinStructure]:
Expand All @@ -108,7 +101,6 @@ def protein_structure_retriever(
return []


# @defer - not available in current pydantic-ai version
def data_fusion_engine(
fusion_request: DataFusionRequest, deps: BioinformaticsToolDeps
) -> DataFusionResult:
Expand All @@ -127,7 +119,6 @@ def data_fusion_engine(
)


# @defer - not available in current pydantic-ai version
def reasoning_engine(
task: ReasoningTask, dataset: FusedDataset, deps: BioinformaticsToolDeps
) -> ReasoningResult:
Expand Down
8 changes: 0 additions & 8 deletions DeepResearch/src/tools/deep_agent_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
from typing import Any, Dict
from pydantic_ai import RunContext

# Note: defer decorator is not available in current pydantic-ai version

# Import existing DeepCritical types
from ..datatypes.deep_agent_state import (
TaskStatus,
Expand All @@ -39,7 +37,6 @@


# Pydantic AI tool functions
# @defer - not available in current pydantic-ai version
def write_todos_tool(
request: WriteTodosRequest, ctx: RunContext[DeepAgentState]
) -> WriteTodosResponse:
Expand Down Expand Up @@ -81,7 +78,6 @@ def write_todos_tool(
)


# @defer - not available in current pydantic-ai version
def list_files_tool(ctx: RunContext[DeepAgentState]) -> ListFilesResponse:
"""Tool for listing files in the filesystem."""
try:
Expand All @@ -97,7 +93,6 @@ def list_files_tool(ctx: RunContext[DeepAgentState]) -> ListFilesResponse:
return ListFilesResponse(files=[], count=0)


# @defer - not available in current pydantic-ai version
def read_file_tool(
request: ReadFileRequest, ctx: RunContext[DeepAgentState]
) -> ReadFileResponse:
Expand Down Expand Up @@ -174,7 +169,6 @@ def read_file_tool(
)


# @defer - not available in current pydantic-ai version
def write_file_tool(
request: WriteFileRequest, ctx: RunContext[DeepAgentState]
) -> WriteFileResponse:
Expand Down Expand Up @@ -205,7 +199,6 @@ def write_file_tool(
)


# @defer - not available in current pydantic-ai version
def edit_file_tool(
request: EditFileRequest, ctx: RunContext[DeepAgentState]
) -> EditFileResponse:
Expand Down Expand Up @@ -287,7 +280,6 @@ def edit_file_tool(
)


# @defer - not available in current pydantic-ai version
def task_tool(
request: TaskRequestModel, ctx: RunContext[DeepAgentState]
) -> TaskResponse:
Expand Down
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ python -m deepresearch.app flows.prime.params.adaptive_replanning=false

⚠️ **Known Issues:**
- Circular import issues in some tool modules (bioinformatics_tools, deep_agent_tools)
- Some pydantic-ai API compatibility issues (defer decorator not available in current version)
- These issues are being addressed and will be resolved in future updates

## 🏗️ Architecture
Expand Down Expand Up @@ -481,16 +480,6 @@ DeepCritical/
return AssessDataQuality()
```

4. **Register Deferred Tools**:
```python
from pydantic_ai.tools import defer

@defer
def go_annotation_processor(annotations, papers, evidence_codes):
# Processing logic
return processed_annotations
```

## 🚀 Advanced Usage

### Batch Processing
Expand Down