diff --git a/js/ai/src/chat.ts b/js/ai/src/chat.ts index f22b351ba..e84131057 100644 --- a/js/ai/src/chat.ts +++ b/js/ai/src/chat.ts @@ -33,7 +33,7 @@ import { Session, SessionStore, runWithSession, -} from './session'; +} from './session.js'; export const MAIN_THREAD = 'main'; @@ -242,7 +242,7 @@ export class Chat { return this._messages ?? []; } - async updateMessages(messages: MessageData[]): Promise { + private async updateMessages(messages: MessageData[]): Promise { this._messages = messages; await this.session.updateMessages(this.threadName, messages); } diff --git a/js/ai/src/session.ts b/js/ai/src/session.ts index 2d5af2fd9..2e7f0cf6d 100644 --- a/js/ai/src/session.ts +++ b/js/ai/src/session.ts @@ -17,7 +17,7 @@ import { z } from '@genkit-ai/core'; import { Registry } from '@genkit-ai/core/registry'; import { v4 as uuidv4 } from 'uuid'; -import { Chat, ChatOptions, MAIN_THREAD, PromptRenderOptions } from './chat'; +import { Chat, ChatOptions, MAIN_THREAD, PromptRenderOptions } from './chat.js'; import { ExecutablePrompt, GenerateOptions, diff --git a/js/genkit/src/index.ts b/js/genkit/src/index.ts index 723dee1fb..62f27c242 100644 --- a/js/genkit/src/index.ts +++ b/js/genkit/src/index.ts @@ -104,7 +104,12 @@ export { type ToolRequestPart, type ToolResponsePart, } from '@genkit-ai/ai'; -export { type SessionData, type SessionStore } from '@genkit-ai/ai/session'; +export { Chat } from '@genkit-ai/ai/chat'; +export { + Session, + type SessionData, + type SessionStore, +} from '@genkit-ai/ai/session'; export { FlowServer, GENKIT_CLIENT_HEADER,