IMing
EngageinnaturallanguageconversationswithourAIchatbot.
IMing Chatter!
HowtoUseIMingModel?
LearnhowtoleveragetheIMingModelusingAPItotailorinstantmessagingfunctionalitiestofityourrequirements.
JavaScript (Request Format):
1async function sendRequestToIming(event) {
2 event.preventDefault();
3 const prompt = document.getElementById("prompt").value;
4 const role = document.getElementById("role").value;
5 const api_key = document.getElementById("api_key").value;
6
7 const formData = new FormData();
8 formData.append("prompt", prompt);
9 formData.append("role", role);
10 formData.append("api_key", api_key);
11
12 const response = await fetch("https://wxm-back.vercel.app//request_iming", {
13 method: "POST",
14 body: formData,
15 });
16
17 const result = await response.json();
18 document.getElementById("output").innerHTML = result.text;
19}HTML (Structure Example):
1<h1>SEND REQUEST TO IMING MODEL</h1>
2<h2>Send Request</h2>
3<form onsubmit="sendRequestToIming(event)">
4 <input type="text" id="prompt" placeholder="Enter prompt" />
5 <input type="text" id="role" placeholder="Enter role" />
6 <input type="text" id="api_key" placeholder="Enter API Key" required />
7 <button type="submit">Send Request</button>
8</form>
9
10<h2>Output</h2>
11<p>Response: <span id="output"></span></p>JSON (Response Format):
1{
2 "text": "Text Generated By IMing Model on Valid API Key"
3}CURL (API Testing):
1curl -X POST "https://wxm-back.vercel.app//request_iming" -F "prompt=What is AI?" -F "role=Researcher" -F "api_key=your_api_key"