I'll create a chatbot page that integrates with your external API endpoint. Based on the URL you provided, I'll build a Next.js application that communicates with your chatbot API at 0c4e-41-65-227-203.ngrok-free.app/docs#/default/ask_question_ask_post.
This chatbot implementation:
https://0c4e-41-65-227-203.ngrok-free.app/ask/ask based on the URL pattern. If your endpoint is different, you'll need to update the fetch URL.question field and returns a JSON response with an answer or response field. You may need to adjust the request and response handling based on your API's actual requirements.I see you've shared the API documentation link again. Since the image shows a loading screen, I can't see the specific API details. Let me enhance the chatbot I created previously with some additional features that would make it more robust when working with external APIs.
I've enhanced the chatbot interface with several improvements:
UI Enhancements:
UX Improvements:
To use this chatbot:
If you're having trouble connecting to the ngrok URL, you might need to: