Skip to content

Commit

Permalink
fix: update llm_streaming_stream_method.ts doc (#2929)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
cjbt authored Oct 16, 2023
1 parent 1f734db commit aa9b618
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions examples/src/models/llm/llm_streaming_stream_method.ts
Original file line number Diff line number Diff line change
@@ -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,
});
Expand Down

1 comment on commit aa9b618

@vercel
Copy link

@vercel vercel bot commented on aa9b618 Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.