Skip to content

Commit

Permalink
chore: lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jun 26, 2024
1 parent 611114c commit ddcc08b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion langchain/src/experimental/chrome_ai/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { BaseLanguageModelCallOptions } from "@langchain/core/language_mode
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
import { BaseMessage, AIMessageChunk } from "@langchain/core/messages";
import { ChatGenerationChunk } from "@langchain/core/outputs";
import { IterableReadableStream } from "@langchain/core/utils/stream";

export interface AI {
canCreateTextSession(): Promise<AIModelAvailability>;
Expand Down Expand Up @@ -138,7 +139,7 @@ export class ChatChromeAI extends SimpleChatModel<ChromeAICallOptions> {
const textPrompt = formatPrompt(messages);

const stream = this.session.promptStreaming(textPrompt);
const iterableStream = stream.pipeThrough(new TextDecoderStream()).getIterator();
const iterableStream = IterableReadableStream.fromReadableStream(stream);

let previousContent = "";
for await (const chunk of iterableStream) {
Expand Down

0 comments on commit ddcc08b

Please sign in to comment.