This pull request introduces a new stream method to the AI class, allowing for streaming of AI-generated responses. The method utilizes the BaseChatModel.stream(...) method from the langchain library to yield BaseMessageChunk instances as they are generated.
This pull request introduces a new
stream
method to theAI
class, allowing for streaming of AI-generated responses. The method utilizes theBaseChatModel.stream(...)
method from thelangchain
library to yieldBaseMessageChunk
instances as they are generated.