Successful LLM call

This commit is contained in:
aodulov
2025-10-10 15:35:37 +03:00
parent b8c42c4604
commit 2fdc83091f
3 changed files with 9 additions and 7 deletions

View File

@@ -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

View File

@@ -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<Record<string, string>> {

View File

@@ -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: {} });
}