You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Road-core is defining it’s own conversation history class: CacheEntry, instead of using the langchain message types, e.g. AIMessage, HumanMessage, SystemMessage etc.
the self-defined type only contains a simple string value of user query and AI response. It’s missing all other information, and has no flexibility for setting metadata information like timestamp, etc.
Secondly, consumers using the road-core service image container still need to import the CacheEntry from road-core in order to understand the content. RHDH has the worst case, it uses road-core service image and it uses NodeJS. RHDH cannot directly consume the road-core repo as a library, we need some public & standard definition, which is langchain message types.
Describe the solution you'd like
use Langchain AIMessage, HumanMessage as message type, use BaseMessage[] for storing the chat history. https://python.langchain.com/v0.2/docs/tutorials/chatbot/#managing-conversation-history. both Langchain NodeJS and Langchain Python share the same standard definition, it preserves all AI message information, and also provides flexibility to add more info in metadata.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Road-core is defining it’s own conversation history class: CacheEntry, instead of using the langchain message types, e.g. AIMessage, HumanMessage, SystemMessage etc.
the self-defined type only contains a simple string value of user query and AI response. It’s missing all other information, and has no flexibility for setting metadata information like timestamp, etc.
Secondly, consumers using the road-core service image container still need to import the
CacheEntry
from road-core in order to understand the content. RHDH has the worst case, it uses road-core service image and it uses NodeJS. RHDH cannot directly consume the road-core repo as a library, we need some public & standard definition, which is langchain message types.Describe the solution you'd like
use Langchain
AIMessage
,HumanMessage
as message type, useBaseMessage[]
for storing the chat history. https://python.langchain.com/v0.2/docs/tutorials/chatbot/#managing-conversation-history. both Langchain NodeJS and Langchain Python share the same standard definition, it preserves all AI message information, and also provides flexibility to add more info in metadata.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: