import axios from 'axios' let session_id; const chatSession = await axios.post( 'https://agentivehub.com/api/chat/session', { "api_key": "fa0cb960-beb2-4878-b368-9d3d4e106913", "assistant_id": "3777a221-0509-4625-9201-2d62b112f813", } ) session_id = chatSession.data.session_id; const chatReponse = { api_key: "fa0cb960-beb2-4878-b368-9d3d4e106913", session_id, type: 'custom_code', assistant_id: "3777a221-0509-4625-9201-2d62b112f813", messages:[{ role: 'user', content: 'Say Hello!' }], }; const chat = await axios.post( 'https://agentivehub.com/api/chat', chatReponse ); return chat.data;