Skip to content

Commit

Permalink
Backport pr 212 (#227)
Browse files Browse the repository at this point in the history
Backport for PR #212 

Note: Dependent on langchain-ai/langchain#27114
to fix the tests failing in CI.
  • Loading branch information
3coins authored Oct 11, 2024
1 parent 647e8b2 commit 7a2ce56
Show file tree
Hide file tree
Showing 3 changed files with 563 additions and 375 deletions.
16 changes: 16 additions & 0 deletions libs/aws/langchain_aws/chat_models/bedrock_converse.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,22 @@ def _llm_type(self) -> str:
"""Return type of chat model."""
return "amazon_bedrock_converse_chat"

@classmethod
def is_lc_serializable(cls) -> bool:
return True

@classmethod
def get_lc_namespace(cls) -> List[str]:
return ["langchain_aws", "chat_models"]

@property
def lc_secrets(self) -> Dict[str, str]:
return {
"aws_access_key_id": "AWS_ACCESS_KEY_ID",
"aws_secret_access_key": "AWS_SECRET_ACCESS_KEY",
"aws_session_token": "AWS_SESSION_TOKEN",
}


def _messages_to_bedrock(
messages: List[BaseMessage],
Expand Down
Loading

0 comments on commit 7a2ce56

Please sign in to comment.