Skip to content

Commit faa2a60

Browse files
committed
fixup! 🚧(back) manage steaming with the ai service
1 parent 80e35c9 commit faa2a60

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/frontend/apps/e2e/__tests__/app-impress/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const CONFIG = {
77
},
88
AI_FEATURE_ENABLED: true,
99
AI_MODEL: 'llama',
10+
AI_STREAM: false,
1011
CRISP_WEBSITE_ID: null,
1112
COLLABORATION_WS_URL: 'ws://localhost:4444/collaboration/ws/',
1213
COLLABORATION_WS_NOT_CONNECTED_READY_ONLY: false,

src/frontend/apps/impress/src/core/config/api/useConfig.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface ConfigResponse {
1515
AI_BOT: { name: string; color: string };
1616
AI_FEATURE_ENABLED?: boolean;
1717
AI_MODEL?: string;
18+
AI_STREAM: boolean;
1819
COLLABORATION_WS_URL?: string;
1920
COLLABORATION_WS_NOT_CONNECTED_READY_ONLY?: boolean;
2021
CRISP_WEBSITE_ID?: string;

src/frontend/apps/impress/src/features/docs/doc-editor/components/AI/useAI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const useAI = (docId: Doc['id'], aiAllowed: boolean) => {
3333
const model = openai.chat(conf.AI_MODEL);
3434

3535
const extension = createAIExtension({
36-
stream: false,
36+
stream: conf.AI_STREAM,
3737
model,
3838
agentCursor: conf?.AI_BOT,
3939
promptBuilder: promptBuilder(llmFormats.html.defaultPromptBuilder),

0 commit comments

Comments
 (0)