Skip to content

Commit a0b44a2

Browse files
committed
Fix langgraph
1 parent 000c2a4 commit a0b44a2

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

eval_protocol/pytest/__init__.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from .default_mcp_gym_rollout_processor import MCPGymRolloutProcessor
44
from .default_no_op_rollout_processor import NoOpRolloutProcessor
55
from .default_single_turn_rollout_process import SingleTurnRolloutProcessor
6-
from .default_langchain_rollout_processor import LangGraphRolloutProcessor
76
from .evaluation_test import evaluation_test
87
from .exception_config import ExceptionHandlerConfig, BackoffConfig, get_default_exception_handler_config
98
from .rollout_processor import RolloutProcessor
@@ -18,12 +17,20 @@
1817
PYDANTIC_AI_AVAILABLE = False
1918
PydanticAgentRolloutProcessor = None
2019

20+
# Conditional import for optional LangChain dependency
21+
try:
22+
from .default_langchain_rollout_processor import LangGraphRolloutProcessor
23+
24+
LANGCHAIN_AVAILABLE = True
25+
except ImportError:
26+
LANGCHAIN_AVAILABLE = False
27+
LangGraphRolloutProcessor = None
28+
2129
__all__ = [
2230
"AgentRolloutProcessor",
2331
"MCPGymRolloutProcessor",
2432
"RolloutProcessor",
2533
"SingleTurnRolloutProcessor",
26-
"LangGraphRolloutProcessor",
2734
"NoOpRolloutProcessor",
2835
"default_dataset_adapter",
2936
"RolloutProcessorConfig",
@@ -36,3 +43,6 @@
3643
# Only add to __all__ if available
3744
if PYDANTIC_AI_AVAILABLE:
3845
__all__.append("PydanticAgentRolloutProcessor")
46+
47+
if LANGCHAIN_AVAILABLE:
48+
__all__.append("LangGraphRolloutProcessor")

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ supabase = [
130130
chinook = [
131131
"psycopg2-binary>=2.9.10",
132132
]
133+
langchain = [
134+
"langchain-core>=0.3.0",
135+
]
133136

134137
[tool.pytest.ini_options]
135138
addopts = "-q"

0 commit comments

Comments
 (0)