From aa9b618786757c301e93caeb3253c56b56d05602 Mon Sep 17 00:00:00 2001 From: "C. J. Tantay" Date: Mon, 16 Oct 2023 14:54:07 -0700 Subject: [PATCH] fix: update llm_streaming_stream_method.ts doc (#2929) * fix: update llm_streaming_stream_method.ts doc Removes reference to `handleLLMNewToken` since `handleLLMNewToken` does not exist within this example * Adds `streaming: true` to docs Adds missing property in the expected configuration for streaming * Update llm_streaming_stream_method.ts Remove unneeded comments and unnecessary code - `.stream()` works without the need to add `streaming: true` as part of the LLM constructor --- examples/src/models/llm/llm_streaming_stream_method.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/src/models/llm/llm_streaming_stream_method.ts b/examples/src/models/llm/llm_streaming_stream_method.ts index 04310c190d23..574e87127f47 100644 --- a/examples/src/models/llm/llm_streaming_stream_method.ts +++ b/examples/src/models/llm/llm_streaming_stream_method.ts @@ -1,7 +1,5 @@ import { OpenAI } from "langchain/llms/openai"; -// To enable streaming, we pass in `streaming: true` to the LLM constructor. -// Additionally, we pass in a handler for the `handleLLMNewToken` event. const model = new OpenAI({ maxTokens: 25, });