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
I searched existing ideas and did not find a similar one
I added a very descriptive title
I've clearly described the feature request and motivation for it
Feature request
The parsing of the message is handled by the revive function in langchain-core/src/runnables/remote.ts but most message attributes are never parsed by the function like name, additional_kwargs, response_metadata and id.
Motivation
All these attributes are send to the RemoteRunnable so I see no reason to not parse them.
Some of these attributes are actually really useful. For example the response_metadata can contains a finish_reason attribute which tell if a chunk is the last of a message.
Proposal (If applicable)
For example the parsing of the AIMessageChunk is done like this:
if (obj.type === "AIMessageChunk") {
return new AIMessageChunk({
content: obj.content,
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked
Feature request
The parsing of the message is handled by the
revive
function inlangchain-core/src/runnables/remote.ts
but most message attributes are never parsed by the function likename
,additional_kwargs
,response_metadata
andid
.Motivation
response_metadata
can contains afinish_reason
attribute which tell if a chunk is the last of a message.Proposal (If applicable)
For example the parsing of the AIMessageChunk is done like this:
but I would expect it to be done like this:
Beta Was this translation helpful? Give feedback.
All reactions