{"id":377,"date":"2026-09-14T11:46:29","date_gmt":"2026-09-14T11:46:29","guid":{"rendered":"https:\/\/samriddhighar.com\/?page_id=377"},"modified":"2026-09-17T09:49:44","modified_gmt":"2026-09-17T09:49:44","slug":"ai-property-assistant-test","status":"publish","type":"page","link":"https:\/\/samriddhighar.com\/ne\/ai-property-assistant-test\/","title":{"rendered":"AI Property Assistant"},"content":{"rendered":"<body>        <div class=\"sg143-box\" data-sg143>\n            <div class=\"sg143-head\">Samriddhi Ghar Property Assistant<div class=\"sg143-sub\">English \/ \u0928\u0947\u092a\u093e\u0932\u0940 \u2022 Phase 1.4.3<\/div><\/div>\n            <div class=\"sg143-log\" data-sg143-log>\n                <div class=\"sg143-msg sg143-bot\">Namaste! \ud83d\udc4b Ask me about properties in English or \u0928\u0947\u092a\u093e\u0932\u0940.<br>Example: <em>I want a house in Dhungedhara.<\/em><br>\u0909\u0926\u093e\u0939\u0930\u0923: <em>\u0922\u0941\u0902\u0917\u0947\u0927\u093e\u0930\u093e\u092e\u093e \u0918\u0930 \u091a\u093e\u0939\u093f\u092f\u094b\u0964<\/em><\/div>\n            <\/div>\n            <form class=\"sg143-form\" data-sg143-form><input class=\"sg143-input\" data-sg143-input autocomplete=\"off\" placeholder=\"Ask about a property \/ \u0938\u092e\u094d\u092a\u0924\u094d\u0924\u093f\u092c\u093e\u0930\u0947 \u0938\u094b\u0927\u094d\u0928\u0941\u0939\u094b\u0938\u094d\u2026\" \/><button class=\"sg143-send\" type=\"submit\">Send<\/button><\/form>\n        <\/div>\n        <script>\n        document.addEventListener(\"DOMContentLoaded\",function(){document.querySelectorAll(\"[data-sg143]\").forEach(function(box){\n          var form=box.querySelector(\"[data-sg143-form]\"),input=box.querySelector(\"[data-sg143-input]\"),log=box.querySelector(\"[data-sg143-log]\"),endpoint=\"https:\\\/\\\/samriddhighar.com\\\/ne\\\/wp-json\\\/samriddhi\\\/v15\\\/property-search\",state=null;\n          function esc(s){return String(s==null?\"\":s).replace(\/[&<>\"']\/g,function(c){return {\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#039;\"}[c];});}\n          function add(html,cls){var d=document.createElement(\"div\");d.className=\"sg143-msg \"+cls;d.innerHTML=html;log.appendChild(d);log.scrollTop=log.scrollHeight;return d;}\n          function money(n){return n==null||n===\"\"?\"\":\"NPR \"+Number(n).toLocaleString(\"en-IN\");}\n          function card(x){var meta=[];if(x.property_id)meta.push(\"<strong>\"+esc(x.property_id)+\"<\/strong>\");if(x.price!=null)meta.push(esc(money(x.price)));if(x.land_area!=null)meta.push(esc(x.land_area)+\" \"+esc((x.land_unit||[]).join(\", \")));if(x.builtup_area!=null)meta.push(\"Built-up \"+esc(x.builtup_area)+\" \"+esc((x.builtup_unit||[]).join(\", \")));if(x.road_width!=null)meta.push(esc(x.road_width)+\" ft road\");if((x.road_type||[]).length)meta.push(esc(x.road_type.join(\", \")));if(x.bedrooms!=null)meta.push(esc(x.bedrooms)+\" bedrooms\");if(x.bathrooms!=null)meta.push(esc(x.bathrooms)+\" bathrooms\");if(x.location)meta.push(esc(x.location));return '<div class=\"sg143-card\"><a href=\"'+esc(x.url)+'\">'+esc(x.title)+'<\/a><div class=\"sg143-meta\">'+meta.join(\" \u2022 \")+\"<\/div>\"+(x.match_reasons&&x.match_reasons.length?'<div class=\"sg143-reasons\">Matched: '+esc(x.match_reasons.join(\", \"))+'<\/div>':\"\")+\"<\/div>\";}\n          form.addEventListener(\"submit\",function(e){e.preventDefault();var q=input.value.trim();if(!q)return;add(esc(q),\"sg143-user\");input.value=\"\";var loading=add(\"Searching actual Samriddhi Ghar listings\u2026\",\"sg143-bot\");var body={q:q};if(state)body.state=state;fetch(endpoint,{method:\"POST\",headers:{\"Content-Type\":\"application\/json\",\"Accept\":\"application\/json\"},body:JSON.stringify(body)}).then(function(r){return r.json();}).then(function(data){loading.remove();if(data.code){add(\"WordPress returned an error: \"+esc(data.message||data.code),\"sg143-bot\");return;}var html=esc(data.message||\"Search complete.\");if(data.filters_summary)html+='<div class=\"sg143-understood\"><strong>Search understanding:<\/strong> '+esc(data.filters_summary)+'<\/div>';if(data.results&&data.results.length)data.results.forEach(function(x){html+=card(x);});state=data.state||state;add(html,\"sg143-bot\");}).catch(function(err){loading.remove();add(\"The search request failed. Please check the WordPress REST endpoint.\",\"sg143-bot\");if(window.console)console.error(err);});});\n        });});\n        <\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"footnotes":""},"class_list":["post-377","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/pages\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":3,"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/pages\/377\/revisions"}],"predecessor-version":[{"id":390,"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/pages\/377\/revisions\/390"}],"wp:attachment":[{"href":"https:\/\/samriddhighar.com\/ne\/wp-json\/wp\/v2\/media?parent=377"}],"curies":[{"name":"\u0921\u092c\u094d\u0932\u0941\u092a\u0940","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}