@reititin/client 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -24,7 +24,7 @@ export const ReititinClient = ({ agentId, onMessage }) => {
24
24
  const agent_id = lines.find(line => line.startsWith('agent_id:'))?.split(': ')[1];
25
25
  const rawData = lines.find(line => line.startsWith('data:'))?.replace('data: ', '');
26
26
  if (onMessage) {
27
- const processedMessage = await onMessage(rawData);
27
+ const processedMessage = await onMessage(JSON.parse(rawData));
28
28
  await axios.post(FINALIZE_URL, { chat_id: chat_id, agent_id: agent_id, message: processedMessage });
29
29
  console.log(`Response sent.`);
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reititin/client",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Reititin client allows you to connect your LLM system to Reititin platform.",
5
5
  "keywords": [
6
6
  "AI",