Skip to content
Discussion options

You must be logged in to vote

The error you're encountering is due to a type mismatch in the RunnablePassthrough.assign method. The filterMessages function's input type does not match the expected type for RunnablePassthrough.assign. To resolve this, you need to ensure that the input type for filterMessages matches the expected structure.

Here's the corrected code:

import { InMemoryChatMessageHistory } from "@langchain/core/chat_history";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { AzureChatOpenAI } from "@langchain/openai";
import { RunnableWithMessageHistory } from "@langchain/core/runnables";
import { StringOutputParser } from "@langchain/core/output_parsers";

import type { BaseMessage } 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sarangan12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant