Skip to content

Commit dcaf1e5

Browse files
iamfaranraheeliftikhar5
authored andcommitted
fix table name for better queries
1 parent c5d90f3 commit dcaf1e5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client/packages/lowcoder/src/comps/comps/chatComp/chatComp.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,5 @@ const handleConversationUpdate = (conversationHistory: any[]) => {
253253
export const ChatComp = withExposingConfigs(ChatTmpComp, [
254254
new NameConfig("currentMessage", "Current user message"),
255255
new NameConfig("conversationHistory", "Full conversation history as JSON array (includes system prompt for API calls)"),
256+
new NameConfig("databaseName", "Database name for SQL queries (ChatDB_<componentName>)"),
256257
]);

client/packages/lowcoder/src/comps/comps/chatComp/utils/storageFactory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { ChatMessage, ChatThread, ChatStorage } from "../types/chatTypes";
99

1010
export function createChatStorage(tableName: string): ChatStorage {
1111
const dbName = `ChatDB_${tableName}`;
12-
const threadsTable = `${dbName}.${tableName}_threads`;
13-
const messagesTable = `${dbName}.${tableName}_messages`;
12+
const threadsTable = `${dbName}.threads`;
13+
const messagesTable = `${dbName}.messages`;
1414

1515
return {
1616
async initialize() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy