Skip to content

Commit

Permalink
Update llm_streaming_stream_method.ts
Browse files Browse the repository at this point in the history
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 bbcbcaa commit fdadbbc
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,9 +1,7 @@
import { OpenAI } from "langchain/llms/openai";

// To enable streaming, we pass in `streaming: true` to the LLM constructor.
const model = new OpenAI({
maxTokens: 25,
streaming: true,
});

const stream = await model.stream("Tell me a joke.");
Expand Down

0 comments on commit fdadbbc

Please sign in to comment.