{"id":96666,"date":"2025-02-09T06:04:28","date_gmt":"2025-02-09T02:34:28","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/chatbot-application-using-models-available-in-ollama-17n9\/"},"modified":"2025-02-09T06:04:28","modified_gmt":"2025-02-09T02:34:28","slug":"chatbot-application-using-models-available-in-ollama-17n9","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/chatbot-application-using-models-available-in-ollama-17n9\/","title":{"rendered":"\u0628\u0631\u0646\u0627\u0645\u0647 Chatbot \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u062f\u0631 Ollama"},"content":{"rendered":"<div data-article-id=\"2266775\" id=\"article-body\">\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter-rtl ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/nabfollower.com\/blog\/chatbot-application-using-models-available-in-ollama-17n9\/#%D8%A7%D9%88%D9%84%D8%A7%D9%85%D8%A7_%DA%86%DB%8C%D8%B3%D8%AA\" >\u0627\u0648\u0644\u0627\u0645\u0627 \u0686\u06cc\u0633\u062a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/nabfollower.com\/blog\/chatbot-application-using-models-available-in-ollama-17n9\/#%D9%88%DB%8C%DA%98%DA%AF%DB%8C_%D9%87%D8%A7%DB%8C_%DA%A9%D9%84%DB%8C%D8%AF%DB%8C\" >\u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u06a9\u0644\u06cc\u062f\u06cc:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/nabfollower.com\/blog\/chatbot-application-using-models-available-in-ollama-17n9\/#%D8%A8%D8%B1%D8%A7%DB%8C_%D8%AA%D8%B9%D8%A7%D9%85%D9%84_%D8%A8%D8%A7_%D9%85%D8%AF%D9%84_%D9%87%D8%A7%DB%8C_Ollama_%DB%8C%DA%A9_%D9%85%DB%8C%DA%A9%D8%B1%D9%88%D8%B3%D8%B1%D9%88%DB%8C%D8%B3_API_%D8%A7%DB%8C%D8%AC%D8%A7%D8%AF_%DA%A9%D9%86%DB%8C%D8%AF\" >\u0628\u0631\u0627\u06cc \u062a\u0639\u0627\u0645\u0644 \u0628\u0627 \u0645\u062f\u0644 \u0647\u0627\u06cc Ollama \u06cc\u06a9 \u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 API \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/nabfollower.com\/blog\/chatbot-application-using-models-available-in-ollama-17n9\/#%D8%A7%DB%8C%D8%AC%D8%A7%D8%AF_%DB%8C%DA%A9_%D8%B1%D8%A8%D8%A7%D8%AA_%DA%86%D8%AA_%D8%A8%D9%88%D9%85%DB%8C_React_%D8%A8%D8%B1%D8%A7%DB%8C_%D8%AA%D9%85%D8%A7%D8%B3_%D8%A8%D8%A7_%D9%85%DB%8C%DA%A9%D8%B1%D9%88%D8%B3%D8%B1%D9%88%DB%8C%D8%B3_API_%D8%A8%D8%B1%D8%A7%DB%8C_%D9%BE%D8%B1%D8%AF%D8%A7%D8%B2%D8%B4_%D9%BE%D8%B1%D8%B3_%D9%88_%D8%AC%D9%88_%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1\" >\u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0631\u0628\u0627\u062a \u0686\u062a \u0628\u0648\u0645\u06cc React \u0628\u0631\u0627\u06cc \u062a\u0645\u0627\u0633 \u0628\u0627 \u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 API \u0628\u0631\u0627\u06cc \u067e\u0631\u062f\u0627\u0632\u0634 \u067e\u0631\u0633 \u0648 \u062c\u0648 \u06a9\u0627\u0631\u0628\u0631<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/nabfollower.com\/blog\/chatbot-application-using-models-available-in-ollama-17n9\/#%D9%BE%D8%A7%DB%8C%D8%A7%D9%86\" >\u067e\u0627\u06cc\u0627\u0646<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%D8%A7%D9%88%D9%84%D8%A7%D9%85%D8%A7_%DA%86%DB%8C%D8%B3%D8%AA\"><\/span>\n<p>  \u0627\u0648\u0644\u0627\u0645\u0627 \u0686\u06cc\u0633\u062a<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Ollama \u0627\u0628\u0632\u0627\u0631\u06cc \u0642\u062f\u0631\u062a\u0645\u0646\u062f \u0648 \u0645\u0646\u0628\u0639 \u0628\u0627\u0632 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0634\u0645\u0627 \u0627\u0645\u06a9\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u0628\u062f\u0648\u0646 \u062a\u06a9\u06cc\u0647 \u0628\u0631 \u062e\u062f\u0645\u0627\u062a \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0627\u0628\u0631 \u060c \u0645\u062f\u0644 \u0647\u0627\u06cc \u0628\u0632\u0631\u06af \u0632\u0628\u0627\u0646 (LLM) \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0627\u0645\u0644 \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0645\u062d\u0644\u06cc \u062e\u0648\u062f \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u06cc\u06a9 \u0631\u0648\u0634 \u0622\u0633\u0627\u0646 \u0628\u0631\u0627\u06cc \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc \u060c \u0645\u062f\u06cc\u0631\u06cc\u062a \u0648 \u0627\u062c\u0631\u0627\u06cc \u0645\u062f\u0644 \u0647\u0627\u06cc AI \u0628\u0627 \u0639\u0645\u0644\u06a9\u0631\u062f \u0628\u0647\u06cc\u0646\u0647 \u0634\u062f\u0647 \u0648 \u062f\u0631 \u0635\u0648\u0631\u062a \u0648\u062c\u0648\u062f \u0634\u062a\u0627\u0628 GPU \u0631\u0627 \u0627\u0639\u0645\u0627\u0644 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D9%88%DB%8C%DA%98%DA%AF%DB%8C_%D9%87%D8%A7%DB%8C_%DA%A9%D9%84%DB%8C%D8%AF%DB%8C\"><\/span>\n<p>  \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u06a9\u0644\u06cc\u062f\u06cc:<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u2705 LLMS \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f &#8211; \u067e\u0633 \u0627\u0632 \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc \u0645\u062f\u0644 \u0647\u0627 \u0628\u0647 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a \u0644\u0627\u0632\u0645 \u0646\u06cc\u0633\u062a.<br \/>management \u0645\u062f\u06cc\u0631\u06cc\u062a \u0645\u062f\u0644 \u0622\u0633\u0627\u0646 &#8211; \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc \u060c \u0633\u0648\u0626\u06cc\u0686 \u0648 \u0628\u0647 \u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0645\u062f\u0644 \u0647\u0627 \u0631\u0627 \u0628\u0627 \u0632\u062d\u0645\u062a.<br \/>\u2705 \u0628\u0647\u06cc\u0646\u0647 \u0633\u0627\u0632\u06cc \u0634\u062f\u0647 \u0628\u0631\u0627\u06cc \u0639\u0645\u0644\u06a9\u0631\u062f &#8211; \u0627\u0632 \u0634\u062a\u0627\u0628 GPU \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0646\u0628\u0627\u0637 \u0633\u0631\u06cc\u0639\u062a\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f.<br \/>\u2705 \u062e\u0635\u0648\u0635\u06cc \u0648 \u0627\u06cc\u0645\u0646 &#8211; \u0647\u06cc\u0686 \u062f\u0627\u062f\u0647 \u0627\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0634\u0645\u0627 \u0631\u0627 \u062a\u0631\u06a9 \u0646\u0645\u06cc \u06a9\u0646\u062f.<br \/>the \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0645\u062f\u0644 \u0633\u0641\u0627\u0631\u0634\u06cc-\u0628\u0631\u0627\u06cc \u06a9\u0627\u0631\u0647\u0627\u06cc \u062e\u0627\u0635 \u060c \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0635\u0644\u0627\u062d \u0648 \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642 \u0631\u0627 \u0627\u0635\u0644\u0627\u062d \u0648 \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u06cc\u062f.<br \/>\u2705 API \u0648 CLI \u0633\u0627\u062f\u0647 &#8211; \u0628\u0627 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u06cc \u06cc\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0628\u0627 \u0645\u062f\u0644 \u0647\u0627 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0631\u0642\u0631\u0627\u0631 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0686\u06af\u0648\u0646\u0647 \u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u062f:<\/p>\n<ol>\n<li>Ollama \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f &#8211; \u06cc\u06a9 \u062f\u0633\u062a\u0648\u0631 \u0646\u0635\u0628 \u0633\u0627\u062f\u0647 \u0622\u0646 \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u0645\u06cc \u06a9\u0646\u062f.<\/li>\n<li>\u06cc\u06a9 \u0645\u062f\u0644 \u0631\u0627 \u0628\u06a9\u0634\u06cc\u062f &#8211; \u0645\u062b\u0627\u0644: <strong>\u0627\u0648\u0644\u0627\u0645\u0627 mistral \u0631\u0627 \u0628\u06a9\u0634\u06cc\u062f<\/strong> \u0628\u0631\u0627\u06cc \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc MISTRAL-7B.<\/li>\n<li>\u06cc\u06a9 \u0645\u062f\u0644 \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f &#8211; \u0645\u062b\u0627\u0644: <strong>\u0627\u0648\u0644\u0627\u0645\u0627 mistral \u0631\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc \u06a9\u0646\u062f<\/strong> \u0628\u0631\u0627\u06cc \u0634\u0631\u0648\u0639 \u062a\u0639\u0627\u0645\u0644<\/li>\n<li>\u0628\u0627 \u06a9\u062f \u0627\u062f\u063a\u0627\u0645 \u0634\u0648\u06cc\u062f &#8211; \u0627\u0632 API \u0628\u0631\u0627\u06cc \u0627\u062a\u0648\u0645\u0627\u0633\u06cc\u0648\u0646 \u0648 \u062a\u0648\u0633\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/li>\n<\/ol>\n<hr\/>\n<h2><span class=\"ez-toc-section\" id=\"%D8%A8%D8%B1%D8%A7%DB%8C_%D8%AA%D8%B9%D8%A7%D9%85%D9%84_%D8%A8%D8%A7_%D9%85%D8%AF%D9%84_%D9%87%D8%A7%DB%8C_Ollama_%DB%8C%DA%A9_%D9%85%DB%8C%DA%A9%D8%B1%D9%88%D8%B3%D8%B1%D9%88%DB%8C%D8%B3_API_%D8%A7%DB%8C%D8%AC%D8%A7%D8%AF_%DA%A9%D9%86%DB%8C%D8%AF\"><\/span>\n<p>  \u0628\u0631\u0627\u06cc \u062a\u0639\u0627\u0645\u0644 \u0628\u0627 \u0645\u062f\u0644 \u0647\u0627\u06cc Ollama \u06cc\u06a9 \u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 API \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0645\u0627 \u0627\u0632 FastAPI \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 \u06a9\u0647 \u0628\u0627 \u0645\u062f\u0644 \u0647\u0627\u06cc Ollama \u062f\u0631 \u062a\u0639\u0627\u0645\u0644 \u0627\u0633\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f.<\/p>\n<p><strong>\u06a9\u062f FASTAPI:<\/strong><\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>from fastapi import FastAPI, HTTPException\nfrom pydantic import BaseModel\nimport json\nimport httpx\nimport asyncio\n\napp = FastAPI()\n\n# Input Schema\nclass RequestModel(BaseModel):\n    prompt: str\n    model_name: str\n\n# Response Schema\nclass ResponseModel(BaseModel):\n    response: str\n    request: str\n\nasync def get_response(prompt: str, model_name: str):\n    url = \"http:\/\/localhost:11434\/api\/generate\"\n    headers = {\"Content-Type\": \"application\/json\"}\n    data = {\"model\": model_name, \"prompt\": prompt}\n\n    try:\n        async with httpx.AsyncClient() as client:\n            response = await client.post(url, headers=headers, json=data)\n\n            if response.status_code != 200:\n                raise HTTPException(status_code=response.status_code, detail=f\"HTTP error! Status: {response.status_code}\")\n\n            combined_response = \"\"\n\n            async for line in response.aiter_lines():\n                line = line.strip()\n                if not line:\n                    continue\n                try:\n                    parsed_response = json.loads(line)\n                    if \"response\" in parsed_response:\n                        response_text = parsed_response[\"response\"]\n                        combined_response += response_text\n                        if parsed_response.get(\"done\", False):\n                            break\n                except json.JSONDecodeError:\n                    print(\"Failed to parse line as JSON:\", line)\n                    continue\n            return combined_response\n    except Exception as e:\n        print(\"Error fetching response:\", e)\n        raise HTTPException(status_code=500, detail=\"Error fetching response\")\n\n@app.post(\"\/generate\", response_model=ResponseModel)\nasync def generate_text(request: RequestModel):\n    response_text = await get_response(request.prompt, request.model_name)\n    return ResponseModel(response=response_text, request=request.prompt)\n\nif __name__ == \"__main__\":\n    import uvicorn\n    uvicorn.run(app, host=\"0.0.0.0\", port=8000)\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><strong>\u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 API \u0631\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f<\/strong><\/p>\n<p><code>uvicorn dummy:app --host 0.0.0.0 --port 8000<\/code><\/p>\n<p><strong>\u062e\u0631\u0648\u062c\u06cc \u062f\u0631 \u067e\u0633\u062a\u0686\u06cc:<\/strong> <\/p>\n<p><\/p>\n<hr\/>\n<h2><span class=\"ez-toc-section\" id=\"%D8%A7%DB%8C%D8%AC%D8%A7%D8%AF_%DB%8C%DA%A9_%D8%B1%D8%A8%D8%A7%D8%AA_%DA%86%D8%AA_%D8%A8%D9%88%D9%85%DB%8C_React_%D8%A8%D8%B1%D8%A7%DB%8C_%D8%AA%D9%85%D8%A7%D8%B3_%D8%A8%D8%A7_%D9%85%DB%8C%DA%A9%D8%B1%D9%88%D8%B3%D8%B1%D9%88%DB%8C%D8%B3_API_%D8%A8%D8%B1%D8%A7%DB%8C_%D9%BE%D8%B1%D8%AF%D8%A7%D8%B2%D8%B4_%D9%BE%D8%B1%D8%B3_%D9%88_%D8%AC%D9%88_%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1\"><\/span>\n<p>  \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0631\u0628\u0627\u062a \u0686\u062a \u0628\u0648\u0645\u06cc React \u0628\u0631\u0627\u06cc \u062a\u0645\u0627\u0633 \u0628\u0627 \u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 API \u0628\u0631\u0627\u06cc \u067e\u0631\u062f\u0627\u0632\u0634 \u067e\u0631\u0633 \u0648 \u062c\u0648 \u06a9\u0627\u0631\u0628\u0631<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u062d\u0627\u0644 \u060c \u0628\u06cc\u0627\u06cc\u06cc\u062f \u06cc\u06a9 chatbot \u0628\u0648\u0645\u06cc React \u0628\u0633\u0627\u0632\u06cc\u0645 \u06a9\u0647 \u0628\u0627 \u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 API \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0631\u0642\u0631\u0627\u0631 \u06a9\u0646\u062f.<\/p>\n<p><strong><u>App.js (UI \u0627\u0635\u0644\u06cc chatbot)<\/u><\/strong><\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>import React, { useState, useEffect, useRef } from 'react';\nimport { StyleSheet, Text, View, TouchableOpacity, StatusBar, AppRegistry } from 'react-native';\nimport ChatbotUI from '.\/components\/ChatbotUI';\nimport { FontAwesomeIcon } from '@fortawesome\/react-native-fontawesome';\nimport { faWindowMinimize, faCircleXmark } from '@fortawesome\/free-solid-svg-icons';\n\nconst App = () =&gt; {\n\n  const [isChatVisible, setIsChatVisible] = useState(false);\n\n  const toggleChatWindow = () =&gt; {\n    setIsChatVisible(!isChatVisible);\n  };\n\n  return (\n    <view style=\"{styles.container}\">\n      <text style=\"{{\" fontweight:=\"\" fontsize:=\"\">Welcome to ChatBot using free models<\/text>\n      {isChatVisible &amp;&amp; (\n        &lt;&gt;\n          <view style=\"{styles.chatWindow}\">\n            <view style=\"{styles.chatHeader}\">\n              <text style=\"{styles.chatTitle}\">Chat with Us<\/text>\n              <view style=\"{styles.chatHeaderActions}\">\n                <touchableopacity onpress=\"{toggleChatWindow}\" style=\"{styles.minimizeButton}\">\n                  <fontawesomeicon icon=\"{faWindowMinimize}\" size=\"{30}\" color=\"black\"\/>\n                <\/touchableopacity>\n                <touchableopacity onpress=\"{toggleChatWindow}\" style=\"{styles.closeButton}\">\n                  <fontawesomeicon icon=\"{faCircleXmark}\" size=\"{30}\" color=\"black\"\/>\n                <\/touchableopacity>\n              <\/view>\n            <\/view>\n            <chatbotui\/>\n          <\/view>\n        &gt;\n      )}\n      <touchableopacity style=\"{styles.chatButton}\" onpress=\"{toggleChatWindow}\">\n        <text style=\"{styles.chatIcon}\">\ud83d\udcac<\/text>\n      <\/touchableopacity>\n    <\/view>\n  );\n};\n\nconst styles = StyleSheet.create({\n  chatButton: {\n    position: 'fixed',\n    bottom: 20,\n    right: 20,\n    backgroundColor: '#0078d4',\n    padding: 10,\n    borderRadius: 50,\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n  chatIcon: {\n    color: '#fff',\n    fontSize: 24,\n  },\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#1492c1', \/\/ Light background for the entire app\n  },\n  chatWindow: {\n    position: 'fixed',\n    bottom: 60,\n    right: 60,\n    height: 500,\n    width: 350,\n    backgroundColor: '#dae7ec', \/\/ Chat window color\n    borderRadius: 15,\n    padding: 10,\n    shadowColor: '#000',\n    shadowOffset: { width: 0, height: -2 },\n    shadowOpacity: 0.2,\n    shadowRadius: 5,\n  },\n  chatHeader: {\n    flexDirection: 'row',\n    alignItems: 'center',\n    justifyContent: 'space-between', \/\/ Ensures space between title and actions\n    padding: 5,\n    backgroundColor: '#dae7ec', \/\/ Optional styling\n  },\n  chatTitle: {\n    fontSize: 18,\n    fontWeight: 'bold',\n    flex: 1, \/\/ Ensures the title takes up remaining space\n  },\n  chatHeaderActions: {\n    flexDirection: 'row',\n    alignItems: 'center',\n  },\n  minimizeButton: {\n    marginRight: 20, \/\/ Adds spacing between minimize and close buttons\n    marginBottom: 20\n  },\n  closeButton: {\n    \/\/ Additional button styling if needed\n  }\n});\n\nexport default App;\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<hr\/>\n<p><strong><u>chatbotui.js (\u0631\u0627\u0628\u0637 \u0686\u062a)\/u><\/u><\/strong><\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>import React, { useState, useEffect, useRef } from 'react';\nimport {\n    StyleSheet,\n    View,\n    Text,\n    TextInput,\n    ScrollView,\n    KeyboardAvoidingView,\n    Platform,\n    Keyboard,\n    TouchableOpacity,\n} from 'react-native';\n\nconst ChatbotUI = () =&gt; {\n    const [messages, setMessages] = useState([]);\n    const [inputMessage, setInputMessage] = useState('');\n    const scrollViewRef = useRef();\n    const inputRef = useRef(null);\n\n\n    async function getModelResponse(prompt) {\n        try {\n            const response = await fetch(\"http:\/\/localhost:11434\/api\/generate\", {\n                method: \"POST\",\n                headers: { \"Content-Type\": \"application\/json\" },\n                body: JSON.stringify({ model: \"phi\", prompt: prompt })\n            });\n\n            \/\/ Check if the response is ok (status code 200-299)\n            if (!response.ok) {\n                throw new Error(`HTTP error! Status: ${response.status}`);\n            }\n\n            let combinedResponse = \"\";  \/\/ Initialize an empty string to store the combined response\n\n            const reader = response.body.getReader();\n            const decoder = new TextDecoder();\n            let done = false;\n\n            while (!done) {\n                const { value, done: readerDone } = await reader.read();\n                done = readerDone;\n                const decodedChunk = decoder.decode(value, { stream: true });\n\n                try {\n                    \/\/ Try to parse the decoded chunk as JSON\n                    const parsedResponse = JSON.parse(decodedChunk);\n                    if (parsedResponse &amp;&amp; parsedResponse.response) {\n                        \/\/ Check if the response contains a valid 'response' field\n                        let cleanedResponse = parsedResponse.response;\n\n                        \/\/ Remove 'User' wherever it appears in the response, ensuring spaces are preserved\n                        cleanedResponse = cleanedResponse.replace(\/\\bUser\\b\/g, '');\n\n                        \/\/ If valid, append the cleaned response incrementally\n                        combinedResponse += cleanedResponse;\n\n                        \/\/ Update the message UI progressively with each chunk\n                        setMessages((prevMessages) =&gt; {\n                            const botMessage = {\n                                id: Date.now(),\n                                text: combinedResponse.length &gt; 0 ? combinedResponse : \"Please try again\",\n                                sender: 'bot',\n                            };\n                            return [...prevMessages.slice(0, prevMessages.length - 1), botMessage]; \/\/ Update the last bot message\n                        });\n                    }\n                } catch (error) {\n                    \/\/ If parsing fails (for example, the chunk is not valid JSON), log it and continue\n                    console.warn(\"Failed to parse chunk as JSON:\", decodedChunk);\n                }\n\n            }\n        } catch (error) {\n            console.error(\"Error fetching Falcon response:\", error);\n        }\n    }\n\n    const handleSendMessage = async () =&gt; {\n        if (inputMessage.trim() === '') return;\n\n        const userQuery = {\n            id: Date.now(),\n            text: inputMessage,\n            sender: 'user',\n        };\n\n        try {\n            setMessages((prevMessages) =&gt; [...prevMessages, userQuery]);\n\n            setInputMessage('');\n\n            \/\/ Initialize a temporary bot message (empty text) for progressive rendering\n            setMessages((prevMessages) =&gt; [\n                ...prevMessages,\n                { id: Date.now() + 1, text: '', sender: 'bot' }\n            ]);\n\n            \/\/ Start fetching the response, and update as chunks are received\n            await getModelResponse(inputMessage);\n        } catch (error) {\n            console.error('Error sending message:', error);\n        }\n\n        Keyboard.dismiss();\n\n        if (inputRef.current) {\n            inputRef.current.focus();\n        }\n    };\n\n    const renderMessage = (item) =&gt; {\n        return (\n            <view key=\"{item.id}\" style=\"{[\" styles.messagecontainer=\"\" item.sender=\"==\" styles.usermessage=\"\" :=\"\" styles.botmessage=\"\">\n                <text>{item.text}<\/text>\n            <\/view>\n        );\n    };\n\n    const handleKeyPress = (e) =&gt; {\n        if (e.nativeEvent.key === 'Enter') {\n            handleSendMessage();\n        }\n    };\n\n    return (\n        &lt;&gt;\n            <keyboardavoidingview behavior=\"{Platform.OS\" :=\"\" style=\"{styles.chatContainer}\">\n                <scrollview ref=\"{scrollViewRef}\" oncontentsizechange=\"{()\">\n                        scrollViewRef.current.scrollToEnd({ animated: true })\n                    }\n                    style={styles.messagesContainer}\n                &gt;\n                    {messages.map(renderMessage)}\n                <\/scrollview>\n\n                <view style=\"{styles.inputContainer}\">\n                    <textinput ref=\"{inputRef}\" style=\"{styles.input}\" value=\"{inputMessage}\" onchangetext=\"{setInputMessage}\" onkeypress=\"{handleKeyPress}\" placeholder=\"Type your message...\" multiline=\"{true}\" numberoflines=\"{4}\" textalignvertical=\"auto\" placeholdertextcolor=\"#aaa\"\/>\n                    <touchableopacity onpress=\"{handleSendMessage}\">\n                        <text style=\"{styles.sendButton}\">Send<\/text>\n                    <\/touchableopacity>\n                <\/view>\n            <\/keyboardavoidingview>\n        &gt;\n    );\n};\n\nconst styles = StyleSheet.create({\n    chatContainer: {\n        flex: 1,\n    },\n    messagesContainer: {\n        flex: 1,\n    },\n    messageContainer: {\n        maxWidth: '80%',\n        padding: 10,\n        marginBottom: 10,\n        borderRadius: 10,\n        borderWidth: 1,\n        borderColor: 'black',\n        backgroundColor: 'white',\n        shadowColor: 'black',\n        shadowOffset: { width: 0, height: 2 },\n        shadowOpacity: 0.25,\n        shadowRadius: 3.84,\n        elevation: 5,\n    },\n    userMessage: {\n        backgroundColor: '#30b5e7',\n        alignSelf: 'flex-start',\n    },\n    botMessage: {\n        backgroundColor: '#73c4e2',\n        alignSelf: 'flex-end',\n    },\n    inputContainer: {\n        flexDirection: 'row',\n        alignItems: 'flex-end',\n    },\n    input: {\n        flex: 1,\n        padding: 10,\n        borderRadius: 20,\n        backgroundColor: '#fff',\n        marginRight: 10,\n    },\n    sendButton: {\n        backgroundColor: '#0078d4',\n        color: '#fff',\n        paddingHorizontal: 15,\n        paddingVertical: 8,\n        borderRadius: 10,\n    },\n});\n\nexport default ChatbotUI;\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><strong>\u0628\u0631\u0646\u0627\u0645\u0647 React Native \u0631\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f<\/strong><\/p>\n<p><code># npm install<\/code><br \/><code># npm run web<\/code><\/p>\n<p><strong>\u062e\u0631\u0648\u062c\u06cc:<\/strong><\/p>\n<p>\u062e\u0631\u0648\u062c\u06cc \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u062f\u0631 \u0648\u06cc\u062f\u06cc\u0648 \u062a\u0645\u0627\u0634\u0627 \u06a9\u0631\u062f<\/p>\n<hr\/>\n<h2><span class=\"ez-toc-section\" id=\"%D9%BE%D8%A7%DB%8C%D8%A7%D9%86\"><\/span>\n<p>  \u067e\u0627\u06cc\u0627\u0646<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0633\u0627\u062e\u062a\u0646 \u06cc\u06a9 \u0686\u062a \u0628\u0627\u0628\u0627\u062a \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc Ollama \u0628\u0627 \u0627\u062c\u0631\u0627\u06cc \u0645\u062f\u0644 \u0647\u0627\u06cc \u0628\u0632\u0631\u06af \u0632\u0628\u0627\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u060c \u06cc\u06a9 \u062a\u062c\u0631\u0628\u0647 \u0642\u062f\u0631\u062a\u0645\u0646\u062f \u0648 \u062e\u0635\u0648\u0635\u06cc \u0631\u0627 \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc \u06a9\u0646\u062f. \u0628\u0627 \u0627\u062f\u063a\u0627\u0645 \u0627\u0648\u0644\u0627\u0645\u0627 \u0628\u0627 \u06cc\u06a9 \u0645\u06cc\u06a9\u0631\u0648\u0633\u0631\u0648\u06cc\u0633 FastAPI \u0648 \u06cc\u06a9 \u062c\u0628\u0647\u0647 \u0628\u0648\u0645\u06cc React \u060c \u0645\u0627 \u06cc\u06a9 \u0686\u062a \u0628\u0627\u0628\u0627\u062a \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0648 \u062a\u0639\u0627\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u06cc\u0645 \u06a9\u0647 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0627\u0631\u0622\u0645\u062f \u067e\u0631\u062f\u0627\u0632\u0634 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u0631\u0648\u06cc\u06a9\u0631\u062f \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u062f\u0647\u062f:<br \/>control \u06a9\u0646\u062a\u0631\u0644 \u06a9\u0627\u0645\u0644 \u0628\u0631 \u0631\u0648\u06cc \u0645\u062f\u0644 \u0647\u0627\u06cc AI \u0628\u062f\u0648\u0646 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0628\u0647 \u0627\u0628\u0631.<br \/>performance \u0639\u0645\u0644\u06a9\u0631\u062f \u0628\u0647\u06cc\u0646\u0647 \u0633\u0627\u0632\u06cc \u0634\u062f\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0634\u062a\u0627\u0628 GPU \u062f\u0631 \u0635\u0648\u0631\u062a \u0648\u062c\u0648\u062f.<br \/>\u2705 \u062d\u0631\u06cc\u0645 \u062e\u0635\u0648\u0635\u06cc \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 \u060c \u0632\u06cc\u0631\u0627 \u0647\u06cc\u0686 \u062f\u0627\u062f\u0647 \u0627\u06cc \u0628\u0647 \u0633\u0631\u0648\u0631\u0647\u0627\u06cc \u062e\u0627\u0631\u062c\u06cc \u0627\u0631\u0633\u0627\u0644 \u0646\u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u06a9\u0647 \u0622\u06cc\u0627 \u0634\u0645\u0627 \u062f\u0631 \u062d\u0627\u0644 \u062a\u0648\u0633\u0639\u0647 \u06cc\u06a9 \u062f\u0633\u062a\u06cc\u0627\u0631 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u060c \u06cc\u06a9 \u0631\u0628\u0627\u062a \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0645\u0634\u062a\u0631\u06cc \u06cc\u0627 \u0622\u0632\u0645\u0627\u06cc\u0634 LLMS \u0647\u0633\u062a\u06cc\u062f \u060c \u0627\u06cc\u0646 \u0645\u062c\u0645\u0648\u0639\u0647 \u067e\u0627\u06cc\u0647 \u0648 \u0627\u0633\u0627\u0633 \u0645\u062d\u06a9\u0645\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u067e\u06cc\u0634\u0631\u0641\u062a \u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631 \u0648 \u0633\u0641\u0627\u0631\u0634\u06cc \u0633\u0627\u0632\u06cc \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc \u06a9\u0646\u062f. \ud83d\ude80<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0627\u0648\u0644\u0627\u0645\u0627 \u0686\u06cc\u0633\u062a Ollama \u0627\u0628\u0632\u0627\u0631\u06cc \u0642\u062f\u0631\u062a\u0645\u0646\u062f \u0648 \u0645\u0646\u0628\u0639 \u0628\u0627\u0632 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0634\u0645\u0627 \u0627\u0645\u06a9\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u0628\u062f\u0648\u0646 \u062a\u06a9\u06cc\u0647 \u0628\u0631 \u062e\u062f\u0645\u0627\u062a \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0627\u0628\u0631 \u060c \u0645\u062f\u0644 \u0647\u0627\u06cc \u0628\u0632\u0631\u06af \u0632\u0628\u0627\u0646 (LLM) \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0627\u0645\u0644 \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0645\u062d\u0644\u06cc \u062e\u0648\u062f \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u06cc\u06a9 \u0631\u0648\u0634 \u0622\u0633\u0627\u0646 \u0628\u0631\u0627\u06cc \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc \u060c \u0645\u062f\u06cc\u0631\u06cc\u062a \u0648 \u0627\u062c\u0631\u0627\u06cc \u0645\u062f\u0644 \u0647\u0627\u06cc AI \u0628\u0627 \u0639\u0645\u0644\u06a9\u0631\u062f \u0628\u0647\u06cc\u0646\u0647 \u0634\u062f\u0647 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":96667,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-96666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/96666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=96666"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/96666\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/96667"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=96666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=96666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=96666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}