Skip to content

Commit 872bab6

Browse files
Fix message endpoint: use POST /events instead of POST /messages
- Change message endpoint from /api/conversations/{id}/messages to /events - Add conversation_id field to the request body as required by /events endpoint - This aligns with the correct API specification for sending messages Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 75ee777 commit 872bab6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

example/src/utils/serverStatus.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,12 @@ export const testLLMConfiguration = async (settings: Settings): Promise<{ succes
120120

121121
try {
122122
// Send a simple test message
123-
const messageUrl = `${settings.agentServerUrl.replace(/\/$/, '')}/api/conversations/${conversationId}/messages`;
123+
const messageUrl = `${settings.agentServerUrl.replace(/\/$/, '')}/events`;
124124
const messageResponse = await fetch(messageUrl, {
125125
method: 'POST',
126126
headers,
127127
body: JSON.stringify({
128+
conversation_id: conversationId,
128129
role: 'user',
129130
content: [{ type: 'text', text: 'Hello, respond with just "OK" to confirm you are working.' }],
130131
run: false

0 commit comments

Comments
 (0)