import axios from 'axios'
const api_key = 'edb62d77-5926-4a92-95f2-ddfdc9f61208'
const assistant_id = 'ac0dbbf2-fc89-49a1-8a5d-2a43a62f591a'
let session_id;
// Create a new chat session
const chatSession = await axios.post(
'https://agentivehub.com/api/chat',
{
"api_key" = api_key,
"assistsant_id" = "ac0dbbf2-fc89-49a1-8a5d-2a43a62f591a",
}
)
session_id = chatSession.data.session_id;
// Send a message to the chat session
const chatReponse = {
api_key,
session_id,
assistant_id,
messages:[{ role: 'user', content: 'Say Hello!' }]
};
const chat = await axios.post(
'https://agentivehub.com/api/chat',
chatReponse
);
Home | Ai Assistant Demo Pa
top of page
bottom of page