Skip to content

Commit de47e6e

Browse files
authored
chore(aws): Update BedrockAgents integ tests to use langchain-classic (langchain-ai#718)
Re-enabling BedrockAgents integ tests as the legacy `AgentExecutor` is now available with the `langchain-classic` release.
1 parent e6a56d3 commit de47e6e

File tree

3 files changed

+849
-715
lines changed

3 files changed

+849
-715
lines changed

libs/aws/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ test = [
3232
"syrupy>=4.9.1",
3333
"pytest-asyncio>=0.20,<1",
3434
"pytest-watcher>=0.4.3",
35+
"langchain-classic>=1.0.0",
3536
"langchain-tests>=1.0.0",
3637
"langchain>=1.0.0rc2",
3738
]

libs/aws/tests/integration_tests/agents/test_bedrock_agents.py

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,24 @@
11
# type: ignore
22

3-
import pytest
3+
import json
4+
import operator
5+
import time
6+
import uuid
7+
from typing import Any, Tuple, Union
48

5-
pytest.skip(
6-
"Temporarily skipping Bedrock agent tests due to AgentExecutor usage.",
7-
allow_module_level=True,
9+
import boto3
10+
import pytest
11+
from langchain_classic.agents import AgentExecutor
12+
from langchain_core.tools import tool
13+
from typing_extensions import Annotated, TypedDict
14+
15+
import langchain_aws.agents.base
16+
from langchain_aws.agents import (
17+
BedrockAgentAction,
18+
BedrockAgentFinish,
19+
BedrockAgentsRunnable,
20+
BedrockInlineAgentsRunnable,
821
)
9-
try:
10-
import json
11-
import operator
12-
import time
13-
import uuid
14-
from typing import Any, Tuple, Union
15-
16-
import boto3
17-
from langchain.agents import AgentExecutor
18-
from langchain_core.tools import tool
19-
from typing_extensions import Annotated, TypedDict
20-
21-
import langchain_aws.agents.base
22-
from langchain_aws.agents import (
23-
BedrockAgentAction,
24-
BedrockAgentFinish,
25-
BedrockAgentsRunnable,
26-
BedrockInlineAgentsRunnable,
27-
)
28-
except ImportError:
29-
pass
3022

3123

3224
def _create_iam_client() -> Any:

0 commit comments

Comments
 (0)