Skip to content

Commit

Permalink
Rename decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Mar 25, 2024
1 parent 4828c7b commit 4a0d010
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/honcho/ext/langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from honcho.schemas import Message


def requires_langchain(func):
def _requires_langchain(func):
"""A utility to check if langchain is installed before running a function"""

@functools.wraps(func)
Expand All @@ -25,7 +25,7 @@ def wrapper(*args, **kwargs):
return wrapper


@requires_langchain
@_requires_langchain
def messages_to_langchain(messages: List[Message]):
"""Converts Honcho messages to Langchain messages
Expand All @@ -47,7 +47,7 @@ def messages_to_langchain(messages: List[Message]):
return new_messages


@requires_langchain
@_requires_langchain
def langchain_to_messages(
messages, session: Union[Session, AsyncSession]
) -> List[Message]:
Expand Down

0 comments on commit 4a0d010

Please sign in to comment.