https://retellai.com/?utm_source=discord&utm_medium=seo logo
Custom LLM websockets don't seem to be working
# ❓・bug-report
v
I'm using a custom LLM, taken from your NodeJS repo. Everything used to work but I can't get the agent to speak back. I've tested this with a simple DraftResponse implementation (below).
Copy code
typescript
async DraftResponse(request: CustomLlmRequest, ws: WebSocket) {
        this.Speak(ws, request.response_id, "is it speaking text right now");
    }
Where Speak is a simple wrapper func around websocket sending:
Copy code
typescript
private Speak(
        ws: WebSocket,
        response_id: number,
        content: string,
        content_complete?: boolean,
        end_call?: boolean
    ) {
        const res: CustomLlmResponse = {
            response_id,
            content,
            content_complete: content_complete ?? false,
            end_call: end_call ?? false,
        };
        ws.send(JSON.stringify(res));
    }
Ah just saw the thread below. Looks like I have to set content_complete to "true" to get it to actually speak. I don't think this is intuitive.
n
Yes that's right, you will need to set that flag to true at some point to get it to start sending response