Skip to content

Commit

Permalink
Separate botocore langchain and botocorelatest
Browse files Browse the repository at this point in the history
  • Loading branch information
hmstepanek committed Mar 27, 2024
1 parent dc36a86 commit a21115e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ def response_streaming(request):

@pytest.fixture(scope="module")
def exercise_model(bedrock_server, model_id, response_streaming):
# These are only available in botocore latest environment.
from langchain.chains import ConversationChain
from langchain_community.chat_models import BedrockChat
try:
# These are only available in certain botocore environments.
from langchain.chains import ConversationChain
from langchain_community.chat_models import BedrockChat
except ImportError:
pytest.skip(reason="Langchain not installed.")

def _exercise_model(prompt):
bedrock_llm = BedrockChat(
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ envlist =
python-cross_agent-pypy27-without_extensions,
python-datastore_sqlite-{py27,py37,py38,py39,py310,py311,py312,pypy27,pypy310},
python-external_botocore-{py38,py39,py310,py311,py312}-botocorelatest,
python-external_botocore-{py311}-botocorelatest-langchain,
python-external_botocore-py310-botocore0125,
python-external_botocore-py311-botocore128,
python-external_feedparser-py27-feedparser{05,06},
Expand Down Expand Up @@ -259,7 +260,7 @@ deps =
datastore_redis-redis0400: redis<4.1
external_botocore-botocorelatest: botocore
external_botocore-botocorelatest: boto3
external_botocore-botocorelatest: langchain
external_botocore-botocorelatest-langchain: langchain
external_botocore-botocore128: botocore<1.29
external_botocore-botocore0125: botocore<1.26
external_botocore-{py38,py39,py310,py311,py312}: moto
Expand Down

0 comments on commit a21115e

Please sign in to comment.