diff --git a/.context/log.txt b/.context/log.txt index 7f31e2d..e52994c 100644 --- a/.context/log.txt +++ b/.context/log.txt @@ -1,4 +1,6 @@ -websocket.ts:28 WebSocketService: Received and parsed message: {type: 'STATE_UPDATE', payload: {…}}payload: session: clients: Array(2)0: "24620bff-a27e-49f7-8e1a-bebc5f4aeec7"1: "685ac684-d79c-4ae6-89cb-7665870f7c0e"length: 2[[Prototype]]: Array(0)expectedResponses: 2finalResult: nullresponses: 685ac684-d79c-4ae6-89cb-7665870f7c0e: {participantId: '685ac684-d79c-4ae6-89cb-7665870f7c0e', wants: Array(1), accepts: Array(1), noGoes: Array(1)}24620bff-a27e-49f7-8e1a-bebc5f4aeec7: {participantId: '24620bff-a27e-49f7-8e1a-bebc5f4aeec7', wants: Array(1), accepts: Array(1), noGoes: Array(1)}[[Prototype]]: Objectstate: "HARMONIZING"submittedCount: 2topic: "Drinks?"[[Prototype]]: Object[[Prototype]]: Objecttype: "STATE_UPDATE"[[Prototype]]: Object -useSession.ts:81 useSession: Processing incoming message: {type: 'STATE_UPDATE', payload: {…}}payload: session: {state: 'HARMONIZING', topic: 'Drinks?', expectedResponses: 2, submittedCount: 2, responses: {…}, …}[[Prototype]]: Objecttype: "STATE_UPDATE"[[Prototype]]: Object -websocket.ts:28 WebSocketService: Received and parsed message: {type: 'STATE_UPDATE', payload: {…}}payload: session: clients: Array(2)0: "24620bff-a27e-49f7-8e1a-bebc5f4aeec7"1: "685ac684-d79c-4ae6-89cb-7665870f7c0e"length: 2[[Prototype]]: Array(0)expectedResponses: 2finalResult: nullresponses: 685ac684-d79c-4ae6-89cb-7665870f7c0e: {participantId: '685ac684-d79c-4ae6-89cb-7665870f7c0e', wants: Array(1), accepts: Array(1), noGoes: Array(1)}24620bff-a27e-49f7-8e1a-bebc5f4aeec7: {participantId: '24620bff-a27e-49f7-8e1a-bebc5f4aeec7', wants: Array(1), accepts: Array(1), noGoes: Array(1)}[[Prototype]]: Objectstate: "GATHERING"submittedCount: 2topic: "Drinks?"[[Prototype]]: Object[[Prototype]]: Objecttype: "STATE_UPDATE"[[Prototype]]: Object -useSession.ts:81 useSession: Processing incoming message: {type: 'STATE_UPDATE', payload: {…}}payload: session: clients: Array(2)0: "24620bff-a27e-49f7-8e1a-bebc5f4aeec7"1: "685ac684-d79c-4ae6-89cb-7665870f7c0e"length: 2[[Prototype]]: Array(0)expectedResponses: 2finalResult: nullresponses: 685ac684-d79c-4ae6-89cb-7665870f7c0e: {participantId: '685ac684-d79c-4ae6-89cb-7665870f7c0e', wants: Array(1), accepts: Array(1), noGoes: Array(1)}24620bff-a27e-49f7-8e1a-bebc5f4aeec7: {participantId: '24620bff-a27e-49f7-8e1a-bebc5f4aeec7', wants: Array(1), accepts: Array(1), noGoes: Array(1)}[[Prototype]]: Objectstate: "GATHERING"submittedCount: 2topic: "Drinks?"[[Prototype]]: Object[[Prototype]]: Objecttype: "STATE_UPDATE"[[Prototype]]: Object + +useSession.ts:82 useSession: Processing incoming message: {type: 'STATE_UPDATE', payload: {…}}payload: session: clients: Array(2)0: "24620bff-a27e-49f7-8e1a-bebc5f4aeec7"1: "685ac684-d79c-4ae6-89cb-7665870f7c0e"length: 2[[Prototype]]: Array(0)expectedResponses: 2finalResult: nullresponses: 685ac684-d79c-4ae6-89cb-7665870f7c0e: accepts: Array(1)0: "qwe"length: 1[[Prototype]]: Array(0)noGoes: Array(1)0: "asd"length: 1[[Prototype]]: Array(0)participantId: "685ac684-d79c-4ae6-89cb-7665870f7c0e"wants: Array(1)0: "123"length: 1[[Prototype]]: Array(0)[[Prototype]]: Object24620bff-a27e-49f7-8e1a-bebc5f4aeec7: accepts: Array(1)0: "234"length: 1[[Prototype]]: Array(0)noGoes: Array(1)0: "345"length: 1[[Prototype]]: Array(0)participantId: "24620bff-a27e-49f7-8e1a-bebc5f4aeec7"wants: Array(1)0: "123"length: 1[[Prototype]]: Array(0)[[Prototype]]: Object[[Prototype]]: Objectstate: "ERROR"submittedCount: 2topic: "Drinks?"[[Prototype]]: Object[[Prototype]]: Objecttype: "STATE_UPDATE"[[Prototype]]: Object +VM824 browser-integration.js:2 port disconnected from addon code: e7c21e78-7118-44fb-85c6-4f68eb4f3386 +(anonymous) @ VM824 browser-integration.js:2 +browser-integration.js:2 port disconnected from addon code: a6050e56-c219-45dc-8cdb-aecdd8082bf4 +(anonymous) @ browser-integration.js:2 diff --git a/backend/src/services/LLMService.ts b/backend/src/services/LLMService.ts index a2d94a9..7d5e618 100644 --- a/backend/src/services/LLMService.ts +++ b/backend/src/services/LLMService.ts @@ -12,7 +12,7 @@ export class LLMService { constructor(apiKey: string) { this.genAI = new GoogleGenerativeAI(apiKey); - this.model = this.genAI.getGenerativeModel({ model: "gemini-pro" }); + this.model = this.genAI.getGenerativeModel({ model: "gemini-2.5-flash-lite" }); } async analyzeDesires(desireSets: DesireSet[]): Promise> { diff --git a/backend/src/ws/index.ts b/backend/src/ws/index.ts index b0a08e5..8c90f28 100644 --- a/backend/src/ws/index.ts +++ b/backend/src/ws/index.ts @@ -222,8 +222,8 @@ export const createWebSocketServer = (server: any) => { broadcastToSession(sessionId, { type: 'STATE_UPDATE', payload: {} }); console.log(`Analysis complete for session ${sessionId}. Result:`, decision); - } catch (error) { - console.error(`Error during analysis for session ${sessionId}:`, error); + } catch (error: any) { + console.error(`Error during analysis for session ${sessionId}:`, error.message); sessionData.state = SessionState.ERROR; broadcastToSession(sessionId, { type: 'STATE_UPDATE', payload: {} }); }