Refactor Langchain::Assistant::Messages::*#to_hash
methods and split by roles
#856
Labels
enhancement
New feature or request
thoughtbot-open-summit-2024
https://thoughtbot.com/events/open-summit
Description
The current
to_hash()
method is lengthy and has too much logic in it. Example: https://github.com/patterns-ai-core/langchainrb/blob/main/lib/langchain/assistant/messages/openai_message.rb#L52-L80Tasks:
to_hash()
methods in all ofLangchain::Assistant::Messages::*
subclasses and split them by role. Similar to https://github.com/patterns-ai-core/langchainrb/blob/main/lib/langchain/assistant/messages/mistral_ai_message.rb#L47-L57.The text was updated successfully, but these errors were encountered: