patterns-ai-core / langchainrb

Build LLM-powered applications in Ruby
https://rubydoc.info/gems/langchainrb
MIT License
1.18k stars 156 forks source link

Added ChatMessage class to generalize chat interface #652

Open kokuyouwind opened 3 weeks ago

kokuyouwind commented 3 weeks ago

Description

This PR is the first prototype based on discussion #629.

The purpose is to make it possible to use ChatMessage instead of raw Hash for chat messages, and to generalize it so that it can be used regardless of LLM. First of all, this PR will aim to handle the basic roles such as system, user, and assistant.