Skip to content

Commit

Permalink
chore: Adjust amazon bedrock helper classes names (#297)
Browse files Browse the repository at this point in the history
* Adjust amazon bedrock helper classes names

* Linting

* Update tests

* More linting

* Small update
  • Loading branch information
vblagoje authored Jan 30, 2024
1 parent 9014494 commit b6115c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional

from .amazon_bedrock_handlers import TokenStreamingHandler
from .handlers import TokenStreamingHandler


class BedrockModelAdapter(ABC):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
from botocore.exceptions import BotoCoreError, ClientError
from haystack import component, default_from_dict, default_to_dict

from .amazon_bedrock_adapters import (
from .adapters import (
AI21LabsJurassic2Adapter,
AmazonTitanAdapter,
AnthropicClaudeAdapter,
BedrockModelAdapter,
CohereCommandAdapter,
MetaLlama2ChatAdapter,
)
from .amazon_bedrock_handlers import (
DefaultPromptHandler,
DefaultTokenStreamingHandler,
TokenStreamingHandler,
)
from .errors import (
AmazonBedrockConfigurationError,
AmazonBedrockInferenceError,
AWSConfigurationError,
)
from .handlers import (
DefaultPromptHandler,
DefaultTokenStreamingHandler,
TokenStreamingHandler,
)

logger = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions integrations/amazon_bedrock/tests/test_amazon_bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from botocore.exceptions import BotoCoreError

from haystack_integrations.components.generators.amazon_bedrock import AmazonBedrockGenerator
from haystack_integrations.components.generators.amazon_bedrock.amazon_bedrock_adapters import (
from haystack_integrations.components.generators.amazon_bedrock.adapters import (
AI21LabsJurassic2Adapter,
AmazonTitanAdapter,
AnthropicClaudeAdapter,
Expand Down Expand Up @@ -34,7 +34,7 @@ def mock_boto3_session():
@pytest.fixture
def mock_prompt_handler():
with patch(
"haystack_integrations.components.generators.amazon_bedrock.amazon_bedrock_handlers.DefaultPromptHandler"
"haystack_integrations.components.generators.amazon_bedrock.handlers.DefaultPromptHandler"
) as mock_prompt_handler:
yield mock_prompt_handler

Expand Down

0 comments on commit b6115c2

Please sign in to comment.