Skip to content

Commit

Permalink
removed unecessary debug statements (#358)
Browse files Browse the repository at this point in the history
The bedrock chat model has several logging statements that seem to be
left over from someone debugging the code. Some of them result in the
entire prompt being logged to the console, cluttering logging of
applications leveraging the module. This PR removes said logging
statements.
  • Loading branch information
aaronbriel authored Feb 13, 2025
1 parent 10b083a commit eb2ef6a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion libs/aws/langchain_aws/chat_models/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def _generate(
return self._as_converse._generate(
messages, stop=stop, run_manager=run_manager, **kwargs
)
logger.info(f"The input message: {messages}")

completion = ""
llm_output: Dict[str, Any] = {}
tool_calls: List[ToolCall] = []
Expand Down
1 change: 0 additions & 1 deletion libs/aws/langchain_aws/chat_models/bedrock_converse.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ def _generate(
**kwargs: Any,
) -> ChatResult:
"""Top Level call"""
logger.info(f"The input message: {messages}")
bedrock_messages, system = _messages_to_bedrock(messages)
logger.debug(f"input message to bedrock: {bedrock_messages}")
logger.debug(f"System message to bedrock: {system}")
Expand Down

0 comments on commit eb2ef6a

Please sign in to comment.