{"id":27224,"date":"2026-07-24T22:44:27","date_gmt":"2026-07-24T22:44:27","guid":{"rendered":"https:\/\/umang.pk\/2026\/07\/24\/google-gemini-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-node-js-%d9%85%db%8c%da%ba-%d9%81%d9%86%da%a9%d8%b4%d9%86-%da%a9%d8%a7%d9%84\/"},"modified":"2026-07-24T22:44:27","modified_gmt":"2026-07-24T22:44:27","slug":"google-gemini-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-node-js-%d9%85%db%8c%da%ba-%d9%81%d9%86%da%a9%d8%b4%d9%86-%da%a9%d8%a7%d9%84","status":"publish","type":"post","link":"https:\/\/umang.pk\/en_us\/2026\/07\/24\/google-gemini-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-node-js-%d9%85%db%8c%da%ba-%d9%81%d9%86%da%a9%d8%b4%d9%86-%da%a9%d8%a7%d9%84\/","title":{"rendered":"Google Gemini \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 Node.js \u0645\u06cc\u06ba \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627\u0644\u0632 \u06a9\u06d2 \u0633\u0627\u062a\u06be AI \u0627\u06cc\u062c\u0646\u0679 \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4"},"content":{"rendered":"\n<div id=\"\">\n<p>\u067e\u0686\u06be\u0644\u06d2 \u0633\u0627\u0644\u060c \u0627\u06cc\u06a9 \u06af\u0627\u06c1\u06a9 \u0646\u06d2 \u06c1\u0645 \u0633\u06d2 \u0627\u067e\u0646\u06d2 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0631\u067e\u0648\u0631\u0679\u0646\u06af \u0679\u0648\u0644 \u0645\u06cc\u06ba \u0628\u0627\u062a \u0686\u06cc\u062a \u06a9\u0627 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0648 \u06a9\u06c1\u0627\u06d4 \u062c\u06cc\u0633\u06d2 \u06c1\u06cc \u0645\u0644\u0627\u0632\u0645\u06cc\u0646 \u0633\u0648\u0627\u0644\u0627\u062a \u062f\u0631\u062c \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0633\u0633\u0679\u0645 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0633\u06d2 \u062d\u0642\u06cc\u0642\u06cc \u0648\u0642\u062a \u06a9\u06d2 \u062c\u0648\u0627\u0628\u0627\u062a \u0646\u06a9\u0627\u0644\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u067e\u06c1\u0644\u0627 \u0648\u0631\u0698\u0646 \u0627\u06cc\u06a9 \u062f\u0646 \u0645\u06cc\u06ba \u062a\u06cc\u0627\u0631 \u0627\u0648\u0631 \u0686\u0644 \u0631\u06c1\u0627 \u062a\u06be\u0627\u06d4 \u0627\u06cc\u06a9 \u06c1\u06cc \u0633\u0648\u0627\u0644 \u0646\u06d2 \u06a9\u0627\u0645 \u06a9\u06cc\u0627\u06d4 \u062a\u0627\u06c1\u0645\u060c \u0627\u06cc\u06a9 \u06c1\u0641\u062a\u06d2 \u0628\u0639\u062f \u0679\u06cc\u0633\u0679\u0631 \u0646\u06d2 \u0679\u0627\u0626\u067e \u06a9\u06cc\u0627: &quot;\u0628\u0631\u0644\u0646 \u0645\u06cc\u06ba \u0645\u0648\u0633\u0645 \u06a9\u06cc\u0633\u0627 \u06c1\u06d2\u061f \u0627\u0628\u06be\u06cc 500 EUR \u06a9\u0648 USD \u0645\u06cc\u06ba \u06a9\u062a\u0646\u0627 \u0628\u062f\u0644\u0627 \u06c1\u06d2\u061f&#8221;<\/p>\n<p>\u0645\u0627\u0688\u0644 \u0646\u06d2 \u0627\u0633 \u062c\u0648\u0627\u0628 \u06a9\u0648 \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0648\u0633\u0645 \u06a9\u06cc \u062a\u0642\u0631\u06cc\u0628 \u06a9\u0648 \u0628\u0644\u0627\u06cc\u0627 \u0627\u0648\u0631 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u062f\u0648\u0633\u0631\u06d2 \u0646\u0635\u0641 \u062d\u0635\u06d2 \u06a9\u0648 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0646\u0638\u0631 \u0627\u0646\u062f\u0627\u0632 \u06a9\u0631 \u062f\u06cc\u0627\u06d4<\/p>\n<p>\u06cc\u06c1 \u0686\u06cc\u0679 \u0628\u0648\u0679\u0633 \u0627\u0648\u0631 \u0627\u06cc\u062c\u0646\u0679\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0641\u0631\u0642 \u06c1\u06d2\u06d4 \u0686\u06cc\u0679 \u0628\u0648\u0679\u0633 \u062a\u0631\u0628\u06cc\u062a\u06cc \u0688\u06cc\u0679\u0627 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u062a\u0648 \u062d\u062f \u06c1\u06d2\u06d4 \u0627\u06cc\u062c\u0646\u0679\u0648\u06ba \u067e\u0631 \u0627\u06cc\u0633\u06cc \u06a9\u0648\u0626\u06cc \u067e\u0627\u0628\u0646\u062f\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0679\u0648\u0644 \u06a9\u0648 \u0637\u0644\u0628 \u06a9\u0631\u06cc\u06ba\u060c \u062c\u0648 \u0648\u0627\u067e\u0633 \u0622\u062a\u0627 \u06c1\u06d2 \u0627\u0633\u06d2 \u067e\u0691\u06be\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0641\u06cc\u0635\u0644\u06c1 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u0622\u06cc\u0627 \u0622\u06af\u06d2 \u0628\u0691\u06be\u0646\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0633\u0648\u0627\u0644\u0627\u062a \u0627\u06cc\u06a9 \u06cc\u0627 \u062f\u0648 \u0679\u0648\u0644 \u06a9\u0627\u0644\u0632 \u0633\u06d2 \u062d\u0644 \u06c1\u0648 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u0644\u0679\u06cc \u0644\u06cc\u0648\u0644 \u06a9\u0648 \u06a9\u0686\u06be \u0627\u0648\u0631 \u0686\u06cc\u0632\u0648\u06ba \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2: \u0627\u06af\u0631 \u0622\u067e \u0627\u0633 \u0644\u0648\u067e \u06a9\u0648 \u06c1\u0679\u0627 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0633\u0628 \u06a9\u0686\u06be \u0679\u0648\u0679 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644 \u062f\u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06af\u0648\u06af\u0644 \u062c\u06cc\u0645\u0646\u06cc \u0645\u06cc\u06ba \u0627\u06cc\u0633\u06d2 \u0641\u0646\u06a9\u0634\u0646\u0632 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u0633 \u0644\u0648\u067e \u06a9\u0648 \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u062c\u0648 API \u0627\u0648\u0631 Node.js \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u0627\u06cc\u06a9 \u0627\u06cc\u0633\u0627 \u0627\u06cc\u062c\u0646\u0679 \u0628\u0646\u0627\u0626\u06cc\u06ba \u06af\u06d2 \u062c\u0648 \u062d\u0642\u06cc\u0642\u06cc \u062f\u0646\u06cc\u0627 \u06a9\u06d2 \u0628\u06cc\u0631\u0648\u0646\u06cc \u0679\u0648\u0644\u0632 \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u06d2\u060c \u062c\u06cc\u0633\u06d2 \u0631\u06cc\u0626\u0644 \u0679\u0627\u0626\u0645 \u0645\u0648\u0633\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 Open-Meteo\u060c \u0631\u06cc\u0626\u0644 \u0679\u0627\u0626\u0645 \u0627\u06cc\u06a9\u0633\u0686\u06cc\u0646\u062c \u0631\u06cc\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 Frankfurter.app\u060c \u06cc\u0627 \u062d\u0633\u0627\u0628\u0627\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u0631\u06cc\u0627\u0636\u06cc \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0646\u06d2 \u0648\u0627\u0644\u0627\u06d4 \u062a\u06cc\u0646\u0648\u06ba \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0641\u062a \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u06a9\u0648 \u0635\u0631\u0641 \u0627\u06cc\u06a9 API \u06a9\u0644\u06cc\u062f \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 Gemini\u060c \u0627\u0648\u0631 Google AI \u0627\u0633\u0679\u0648\u0688\u06cc\u0648 \u0628\u06be\u06cc \u0645\u0641\u062a \u0645\u06cc\u06ba \u0631\u0648\u0632\u0627\u0646\u06c1 1,500 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0622\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0628 \u06a9\u0686\u06be GitHub (github.com\/ziaogit\/nodejs-gemini-agent) \u067e\u0631 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h2>\n<h2 id=\"heading-how-function-calling-works\">\u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627\u0644\u0632 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/h2>\n<p>\u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 LLM \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644\u0632 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627\u0644\u0632 \u06a9\u0648 \u0627\u0633 \u0637\u0631\u062d \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba: \u0641\u0646\u06a9\u0634\u0646 \u0688\u06cc\u0641\u0627\u0626\u0646\u0688\u060c \u0645\u0627\u0688\u0644 \u06a9\u0627\u0644\u060c \u0645\u06a9\u0645\u0644\u06d4 \u0648\u06c1 \u0641\u0631\u06cc\u0645\u0646\u06af \u062f\u0631\u0627\u0635\u0644 \u0627\u06c1\u0645 \u062d\u0635\u06c1 \u06a9\u0648 \u0686\u06be\u0648\u0691 \u062f\u06cc\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0627\u0688\u0644 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0648 \u06a9\u0627\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u0633\u0627 \u0645\u0645\u06a9\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u0648 \u0633\u06a9\u062a\u0627\u06d4 \u062c\u0648 \u06a9\u0686\u06be \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0648\u06c1 \u0645\u0630\u0627\u06a9\u0631\u0627\u062a \u0633\u06d2 \u0645\u0644\u062a\u0627 \u062c\u0644\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0679\u0648\u0644 \u0679\u067e\u0633 \u06a9\u06cc \u0641\u06c1\u0631\u0633\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0627\u0688\u0644 \u06a9\u0648 \u067e\u06cc\u063a\u0627\u0645 \u0628\u06be\u06cc\u062c\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u062a\u0641\u0635\u06cc\u0644 \u0627\u06cc\u06a9 JSON \u0627\u0633\u06a9\u06cc\u0645\u0627 \u06c1\u06d2\u060c \u0628\u0634\u0645\u0648\u0644 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627 \u0646\u0627\u0645\u060c \u0641\u0646\u06a9\u0634\u0646\u060c \u0627\u0648\u0631 \u0645\u0637\u0644\u0648\u0628\u06c1 \u062f\u0644\u0627\u0626\u0644\u06d4 \u062c\u06cc\u0645\u0646\u06cc \u0627\u0646 \u06a9\u0648 \u067e\u0691\u06be\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u0622\u067e \u0627\u0646 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633 \u0628\u0627\u062a \u06a9\u0627 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0622\u06cc\u0627 \u06a9\u0648\u0626\u06cc \u0679\u0648\u0644 \u0622\u067e \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0633\u06d2 \u0645\u06cc\u0644 \u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0648\u06c1 \u062d\u0635\u06c1 \u06c1\u06d2 \u062c\u0648 \u0644\u0648\u06af\u0648\u06ba \u06a9\u0648 \u062d\u06cc\u0631\u0627\u0646 \u06a9\u0631 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u06cc\u0645\u0646\u06cc \u06a9\u0648\u0688 \u0646\u06c1\u06cc\u06ba \u0686\u0644\u0627\u062a\u0627\u06d4 \u0627\u0633 \u0637\u0631\u062d \u0627\u06cc\u06a9 \u0633\u0627\u062e\u062a\u06cc \u0622\u0628\u062c\u06cc\u06a9\u0679 \u0648\u0627\u067e\u0633 \u0628\u06be\u06cc\u062c\u06cc\u06ba: <code>get_weather<\/code>\u060c <code>city = Berlin<\/code>. \u0622\u067e \u06a9\u0627 \u06a9\u0648\u0688 \u0627\u0633\u06d2 \u0627\u0679\u06be\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0635\u0644 \u0641\u0646\u06a9\u0634\u0646 \u0686\u0644\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0646\u062a\u0627\u0626\u062c \u0648\u0627\u067e\u0633 \u0628\u06be\u06cc\u062c\u062a\u0627 \u06c1\u06d2\u06d4 Gemini \u0627\u0633 \u0628\u0627\u062a \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u062c\u0648\u0627\u0628 \u062f\u06cc\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06cc\u06c1 \u06a9\u0627\u0641\u06cc \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0646\u06c1\u06cc\u06ba\u060c \u062a\u0648 \u06a9\u0648\u0626\u06cc \u0627\u0648\u0631 \u0622\u0644\u06c1 \u0637\u0644\u0628 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u062a\u0628\u0627\u062f\u0644\u06c1 \u0627\u06cc\u06a9 \u0644\u0648\u067e \u06c1\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">User message\n      \u2502\n      \u25bc\nModel + tool schemas\n      \u2502\n      \u25bc\nResponse: functionCall?\n      \u2502\n   YES \u2502                          NO\n      \u25bc                            \u25bc\nRun the function(s)         Return text answer\n      \u2502\n      \u25bc\nSend result(s) back to model\n      \u2502\n      \u2514\u2500\u2500\u2500\u2500 loop back \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/code><\/pre>\n<p>\u0644\u0648\u067e \u0627\u0633 \u0648\u0642\u062a \u062a\u06a9 \u0686\u0644\u062a\u0627 \u0631\u06c1\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u0645\u0627\u0688\u0644 \u0641\u06cc\u0635\u0644\u06c1 \u0646\u06c1 \u06a9\u0631\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u062c\u0648\u0627\u0628 \u062f\u06cc\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0627\u0641\u06cc \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0648\u06c1\u06cc \u0686\u06cc\u0632 \u06c1\u06d2 \u062c\u0648 \u0632\u0646\u062c\u06cc\u0631 \u06a9\u0627\u0644\u0648\u06ba \u06a9\u0648 \u0645\u0645\u06a9\u0646 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u0645\u0648\u0633\u0645 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u062f\u06cc\u06a9\u06be\u06cc\u06ba \u06a9\u06c1 \u0622\u06cc\u0627 \u062f\u0631\u062c\u06c1 \u062d\u0631\u0627\u0631\u062a 25 \u00b0 C \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06d2\u060c \u067e\u06be\u0631 \u0641\u06cc\u0635\u0644\u06c1 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u06a9\u06cc\u0627 \u0622\u067e \u06a9\u0648 \u062c\u0648\u0627\u0628 \u062f\u06cc\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u06cc\u06a9\u0633\u0686\u06cc\u0646\u062c \u0631\u06cc\u0679 \u0628\u06be\u06cc \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06cc\u06a9 \u0627\u06cc\u0633\u06cc \u062a\u0641\u0635\u06cc\u0644 \u06c1\u06d2 \u062c\u0648 \u067e\u06c1\u0644\u06d2 \u067e\u06c1\u0644 \u0644\u0648\u06af\u0648\u06ba \u06a9\u0648 \u0686\u0648\u06a9\u0633 \u06a9\u0631 \u062f\u06cc\u062a\u06cc \u06c1\u06d2\u06d4 \u062c\u0628 \u062c\u06cc\u0645\u0646\u06cc \u0627\u06cc\u06a9 \u06c1\u06cc \u062c\u0648\u0627\u0628 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u062a\u0639\u062f\u062f \u0679\u0648\u0644\u0632 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0627\u0646 \u0633\u0628 \u06a9\u0648 \u0686\u0644\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062a\u0645\u0627\u0645 \u0646\u062a\u0627\u0626\u062c \u0627\u06cc\u06a9 \u06c1\u06cc \u067e\u06cc\u063a\u0627\u0645 \u0645\u06cc\u06ba \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0646\u06c1\u06cc\u06ba \u0627\u0644\u06af \u0627\u0644\u06af \u067e\u06cc\u063a\u0627\u0645\u0627\u062a \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0648\u0642\u062a \u0645\u06cc\u06ba \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0645\u0627\u0688\u0644 \u06a9\u06cc \u06af\u0631\u062f\u0634 \u0633\u06d2 \u0628\u0627\u062e\u0628\u0631 \u0631\u06c1\u0646\u06d2 \u06a9\u0627 \u0639\u0645\u0644 \u0679\u0648\u0679 \u062c\u0627\u0626\u06d2 \u06af\u0627 \u0627\u0648\u0631 \u0646\u0627\u0642\u0627\u0628\u0644 \u0628\u06be\u0631\u0648\u0633\u06c1 \u0622\u0624\u0679 \u067e\u0679 \u067e\u06cc\u062f\u0627 \u06c1\u0648\u06af\u0627\u06d4<\/p>\n<h2 id=\"heading-what-were-building\">\u06c1\u0645 \u06a9\u06cc\u0627 \u0628\u0646\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba<\/h2>\n<p>\u0627\u0633 \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644 \u0645\u06cc\u06ba\u060c \u06c1\u0645 \u062a\u06cc\u0646 \u0679\u0627\u0633\u06a9 \u0679\u0648\u0644\u0632 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u06cc\u06a9 AI \u0627\u06cc\u062c\u0646\u0679 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<ul>\n<li>\n<p><code>get_weather<\/code>    \u0627\u0648\u067e\u0646 \u0645\u06cc\u0679\u06cc\u0648 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0634\u06c1\u0631 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0645\u0648\u0633\u0645 \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba (\u0645\u0641\u062a\u060c \u06a9\u0648\u0626\u06cc API \u06a9\u0644\u06cc\u062f \u0646\u06c1\u06cc\u06ba)<\/p>\n<\/li>\n<li>\n<p><code>calculate<\/code>    \u2014 JavaScript \u0645\u06cc\u06ba \u0631\u06cc\u0627\u0636\u06cc \u06a9\u06d2 \u062a\u0627\u062b\u0631\u0627\u062a \u06a9\u0627 \u0645\u062d\u0641\u0648\u0638 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p><code>get_exchange_rate<\/code>    \u2014 Frankfurter.app \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0631\u06cc\u0626\u0644 \u0679\u0627\u0626\u0645 \u0627\u06cc\u06a9\u0633\u0686\u06cc\u0646\u062c \u0631\u06cc\u0679 \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba (\u0645\u0641\u062a\u060c \u06a9\u0648\u0626\u06cc API \u06a9\u06cc\u0632 \u0646\u06c1\u06cc\u06ba)<\/p>\n<\/li>\n<\/ul>\n<p>\u0627\u06cc\u0633\u0627 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u062f\u0648 \u0637\u0631\u06cc\u0642\u06d2 \u06c1\u06cc\u06ba: \u0641\u0648\u0631\u06cc \u0645\u0642\u0627\u0645\u06cc \u062c\u0627\u0646\u0686 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0631\u06cc\u0688 \u0644\u0627\u0626\u0646 CLI \u0627\u0648\u0631 \u062d\u0642\u06cc\u0642\u06cc \u0627\u06cc\u067e\u0644\u06cc \u06a9\u06cc\u0634\u0646\u0632 \u0633\u06d2 \u0645\u0646\u0633\u0644\u06a9 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9\u0633\u067e\u0631\u06cc\u0633 HTTP \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679\u06d4<\/p>\n<p>\u0645\u06a9\u0645\u0644 \u0679\u06cc\u06a9\u0646\u0627\u0644\u0648\u062c\u06cc \u0627\u0633\u0679\u06cc\u06a9:<\/p>\n<ul>\n<li>\n<p><strong>Node.js 20<\/strong>: \u0631\u0646 \u0679\u0627\u0626\u0645 (\u0645\u0642\u0627\u0645\u06cc \u062f\u0631\u0622\u0645\u062f \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0646\u0648\u0688 18)<\/p>\n<\/li>\n<li>\n<p><strong>@google\/generative-ai<\/strong>: \u0622\u0641\u06cc\u0634\u0644 \u062c\u06cc\u0645\u0646\u06cc SDK<\/p>\n<\/li>\n<li>\n<p><strong>Dotenb<\/strong>: \u0645\u0627\u062d\u0648\u0644 \u06a9\u06d2 \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u06a9\u0648 \u0644\u0648\u0688 \u06a9\u06cc\u0627 \u062c\u0627 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p><strong>\u0627\u0638\u06c1\u0627\u0631<\/strong>: API \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 HTTP \u0633\u0631\u0648\u0631<\/p>\n<\/li>\n<li>\n<p><strong>OpenMeteo API<\/strong>: \u0645\u0641\u062a \u0645\u0648\u0633\u0645 \u0627\u0648\u0631 \u062c\u06cc\u0648 \u06a9\u0648\u0688\u0646\u06af\u060c \u06a9\u0648\u0626\u06cc \u0686\u0627\u0628\u06cc\u0627\u06ba \u062f\u0631\u06a9\u0627\u0631 \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p><strong>frankfurt.app<\/strong>: \u0645\u0641\u062a \u0632\u0631 \u0645\u0628\u0627\u062f\u0644\u06c1 \u06a9\u06cc \u0634\u0631\u062d\u060c \u06a9\u0648\u0626\u06cc \u06a9\u0644\u06cc\u062f \u062f\u0631\u06a9\u0627\u0631 \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<\/ul>\n<p>\u0641\u0646 \u062a\u0639\u0645\u06cc\u0631:<\/p>\n<pre><code class=\"language-plaintext\">\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                   Client                         \u2502\n\u2502         CLI (readline) \/ HTTP POST               \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                       \u2502  user message\n                       \u25bc\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502               agent.js \u2014 Agentic Loop            \u2502\n\u2502                                                  \u2502\n\u2502  1. Send message + tool schemas to Gemini        \u2502\n\u2502  2. Receive response                             \u2502\n\u2502  3. functionCalls() present?                     \u2502\n\u2502      YES \u2192 execute tools in parallel             \u2502\n\u2502            send all results back                 \u2502\n\u2502            go to step 2                          \u2502\n\u2502      NO  \u2192 return final text answer              \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                       \u2502  tool calls\n                       \u25bc\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                  Tool Handlers                   \u2502\n\u2502                                                  \u2502\n\u2502  get_weather(city)                               \u2502\n\u2502    \u2514\u2500\u25ba geocoding-api.open-meteo.com              \u2502\n\u2502        api.open-meteo.com                        \u2502\n\u2502                                                  \u2502\n\u2502  calculate(expression)                           \u2502\n\u2502    \u2514\u2500\u25ba JS safe evaluator (no external call)      \u2502\n\u2502                                                  \u2502\n\u2502  get_exchange_rate(from, to, amount?)            \u2502\n\u2502    \u2514\u2500\u25ba api.frankfurter.app                       \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/code><\/pre>\n<h2 id=\"heading-prerequisites\">\u0634\u0631\u0637\u06cc\u06ba<\/h2>\n<p>\u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u06c1\u0648\u0646\u0627 \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2:<\/p>\n<ul>\n<li>\n<p>Node.js 18+ \u2014 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4 <code>node --version<\/code> \u0686\u06cc\u06a9 \u06a9\u0631\u06cc\u06ba<\/p>\n<\/li>\n<li>\n<p>aistudio.google.com \u067e\u0631 Gemini API \u06a9\u0644\u06cc\u062f \u2014 \u0645\u0641\u062a \u0627\u0648\u0631 \u06a9\u0627\u0631\u0688 \u0633\u06d2 \u067e\u0627\u06a9\u06d4 \u0645\u0641\u062a \u062f\u0631\u062c\u06d2 \u0645\u06cc\u06ba \u0631\u0648\u0632\u0627\u0646\u06c1 1,500 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc\u06ba \u067e\u06cc\u0634 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0628\u06be\u06cc \u062c\u0627\u0646\u0646\u0627 \u06c1\u0648\u06af\u0627 \u06a9\u06c1 \u06a9\u06cc\u0633\u06d2 <code>async\/await<\/code> \u06cc\u06c1 Node.js \u0645\u06cc\u06ba \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0628\u0633\u06d4<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"heading-project-setup\">\u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a<\/h2>\n<pre><code class=\"language-bash\">mkdir nodejs-gemini-agent && cd nodejs-gemini-agent\nnpm init -y\nnpm install @google\/generative-ai dotenv express\nmkdir src\n<\/code><\/pre>\n<p>\u0627\u0636\u0627\u0641\u06c1 <code>.gitignore<\/code>\u062c\u06cc\u0633\u06d2 \u0622\u067e \u0646\u06c1\u06cc\u06ba \u0686\u0627\u06c1\u062a\u06d2 <code>.env<\/code> \u0622\u067e \u06a9\u06d2 \u0630\u062e\u06cc\u0631\u06d2 \u0645\u06cc\u06ba:<\/p>\n<pre><code class=\"language-plaintext\">node_modules\/\n.env\n<\/code><\/pre>\n<p>\u0688\u0631\u0627\u067e <code>.env<\/code> \u062c\u0691 \u0633\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">GEMINI_API_KEY=your_api_key_here\nPORT=3000\n\n# Optional: override the default model (gemini-2.0-flash)\n# Uncomment if you hit free-tier quota limits\n# GEMINI_MODEL=gemini-2.0-flash-lite\n<\/code><\/pre>\n<p>\u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u0633\u0627\u062e\u062a:<\/p>\n<pre><code class=\"language-plaintext\">nodejs-gemini-agent\/\n\u251c\u2500\u2500 src\/\n\u2502   \u251c\u2500\u2500 tools.js        \u2190 tool schemas for Gemini\n\u2502   \u251c\u2500\u2500 functions.js    \u2190 actual implementations\n\u2502   \u251c\u2500\u2500 agent.js        \u2190 the agentic loop\n\u2502   \u251c\u2500\u2500 index.js        \u2190 CLI entry point\n\u2502   \u2514\u2500\u2500 server.js       \u2190 Express HTTP server\n\u251c\u2500\u2500 .env\n\u251c\u2500\u2500 .env.example\n\u251c\u2500\u2500 .gitignore\n\u2514\u2500\u2500 package.json\n<\/code><\/pre>\n<p>\u062c\u06cc\u0645\u0646\u06cc \u0622\u067e \u06a9\u0627 \u06a9\u0648\u0688 \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u06a9\u06be \u0633\u06a9\u062a\u0627\u06d4 \u06cc\u06c1 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u06a9\u0631\u062f\u06c1 JSON \u0627\u0633\u06a9\u06cc\u0645\u0627 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u067e\u0631 \u0627\u06cc\u06a9 \u0679\u0648\u0644 \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u0627\u0633\u06a9\u06cc\u0645\u0627 \u06a9\u0627 \u0627\u06cc\u06a9 \u0646\u0627\u0645\u060c \u062a\u0641\u0635\u06cc\u0644 \u0627\u0648\u0631 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u06a9\u06cc \u062a\u0639\u0631\u06cc\u0641 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u062a\u0641\u0635\u06cc\u0644 \u0648\u06c1\u06cc \u06c1\u06d2 \u062c\u0648 \u0631\u0648\u0679\u0646\u06af \u06a9\u0648 \u0686\u0644\u0627\u062a\u06cc \u06c1\u06d2\u06d4 Gemini \u0627\u0633\u06d2 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u067e\u0631 \u067e\u0691\u06be\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u06d2 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0648\u0646 \u0633\u0627 \u0679\u0648\u0644 \u0635\u062d\u06cc\u062d \u06c1\u06d2\u06d4 \u06a9\u0633\u06cc \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0648 \u06a9\u0628 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u0627 \u06c1\u06d2 \u0627\u0633 \u067e\u0631 \u062a\u0648\u062c\u06c1 \u0645\u0631\u06a9\u0648\u0632 \u06a9\u0631\u06cc\u06ba\u060c \u0646\u06c1 \u06a9\u06c1 \u06cc\u06c1 \u06a9\u06cc\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-js\">\/\/ src\/tools.js\n\nconst toolDefinitions = [\n  {\n    name: 'get_weather',\n    description:\n      'Get the current weather for a city. Returns temperature in Celsius, ' +\n      'humidity percentage, and wind speed. Use this when the user asks about ' +\n      'weather, temperature, or climate conditions in any location.',\n    parameters: {\n      type: 'OBJECT',\n      properties: {\n        city: {\n          type: 'STRING',\n          description: 'The city name, e.g. Tokyo, London, New York',\n        },\n      },\n      required: ['city'],\n    },\n  },\n  {\n    name: 'calculate',\n    description:\n      'Evaluate a mathematical expression and return the numeric result. ' +\n      'Use this for arithmetic, percentage calculations, or any numeric computation ' +\n      'the user asks for. Do not guess at math \u2014 always call this tool.',\n    parameters: {\n      type: 'OBJECT',\n      properties: {\n        expression: {\n          type: 'STRING',\n          description:\n            'A valid mathematical expression, e.g. \"47.50 * 0.18\" or \"1500 \/ 12\"',\n        },\n      },\n      required: ['expression'],\n    },\n  },\n  {\n    name: 'get_exchange_rate',\n    description:\n      'Get the current exchange rate between two currencies. Can also convert ' +\n      'a specific amount. Use this when the user asks about currency conversion, ' +\n      'exchange rates, or how much a foreign currency amount is worth.',\n    parameters: {\n      type: 'OBJECT',\n      properties: {\n        from: {\n          type: 'STRING',\n          description: 'The source currency code, e.g. USD, EUR, JPY, GBP',\n        },\n        to: {\n          type: 'STRING',\n          description: 'The target currency code, e.g. USD, EUR, JPY, GBP',\n        },\n        amount: {\n          type: 'NUMBER',\n          description:\n            'Amount to convert. Optional \u2014 defaults to 1 if not provided.',\n        },\n      },\n      required: ['from', 'to'],\n    },\n  },\n];\n\nmodule.exports = { toolDefinitions };\n<\/code><\/pre>\n<p>\u0645\u0628\u06c1\u0645 \u0648\u0636\u0627\u062d\u062a\u06cc\u06ba \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0645\u0639\u0627\u0645\u0644\u0627\u062a \u0645\u06cc\u06ba \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0645\u0633\u0626\u0644\u06c1 \u06a9\u0646\u0627\u0631\u0648\u06ba \u067e\u0631 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 &quot;\u06a9\u06cc\u0627 \u0622\u067e \u0641\u0648\u0646 \u0633\u06d2 \u0645\u062a\u0639\u0644\u0642 \u06a9\u0648\u0626\u06cc \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u061f&#8221; \u0627\u06cc\u06a9 \u0633\u0627\u062f\u06c1 \u0633\u0627 \u0633\u0648\u0627\u0644 \u06c1\u06d2 \u062c\u0648 \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0628\u0648\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u0628 \u0627\u0628\u06c1\u0627\u0645 \u06a9\u06cc \u0628\u0627\u062a \u0622\u062a\u06cc \u06c1\u06d2 \u062a\u0648 \u06cc\u06c1 \u0627\u0644\u06af \u06c1\u0648\u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 &quot;\u062f\u0648 \u06a9\u0631\u0646\u0633\u06cc\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0634\u0631\u062d \u0645\u0628\u0627\u062f\u0644\u06c1 \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 \u062c\u0628 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0631\u0646\u0633\u06cc \u06a9\u06cc \u062a\u0628\u062f\u06cc\u0644\u06cc \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u067e\u0648\u0686\u06be\u06cc\u06ba \u062a\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4&#8221; \u067e\u06a9\u0691\u0648\u06d4 \u0627\u0636\u0627\u0641\u06cc \u0627\u0644\u0641\u0627\u0638 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u062e\u0631\u0686 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba. \u063a\u0644\u0637 \u0631\u0648\u0679\u0646\u06af \u06a9\u0648 \u0688\u06cc\u0628\u06af \u06a9\u0631\u0646\u0627 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u06c1\u0646\u06af\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0627\u0635\u0644 \u0641\u0646\u06a9\u0634\u0646 \u06c1\u06d2 \u062c\u0648 \u0686\u0644\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u0645\u0627\u0688\u0644 \u0627\u0633 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u0627\u06cc\u06a9 \u06a9\u0648 \u062c\u0648 \u0628\u06be\u06cc \u062f\u0644\u0627\u0626\u0644 \u0645\u0648\u0635\u0648\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u0645\u0627\u0688\u0644 \u067e\u0627\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0641\u06cc\u0635\u0644\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0635\u0644 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0633\u0627\u062f\u06c1 JavaScript \u0622\u0628\u062c\u06cc\u06a9\u0679 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-js\">\/\/ src\/functions.js\n\nasync function get_weather({ city }) {\n  \/\/ Open-Meteo uses a two-step approach: geocode the city first, then fetch weather.\n  \/\/ Both APIs are free with no key required.\n  const geoUrl = `https:\/\/geocoding-api.open-meteo.com\/v1\/search?name=${encodeURIComponent(city)}&count=1`;\n  const geoRes  = await fetch(geoUrl);\n  const geoData = await geoRes.json();\n\n  if (!geoData.results?.length) {\n    return { error: `City not found: ${city}` };\n  }\n\n  const { latitude, longitude, name, country } = geoData.results[0];\n\n  const weatherUrl =\n    `https:\/\/api.open-meteo.com\/v1\/forecast` +\n    `?latitude=${latitude}&longitude=${longitude}` +\n    `&current=temperature_2m,relative_humidity_2m,wind_speed_10m,weather_code`;\n\n  const weatherRes  = await fetch(weatherUrl);\n  const weatherData = await weatherRes.json();\n  const current     = weatherData.current;\n\n  return {\n    city:        `${name}, ${country}`,\n    temperature: `${current.temperature_2m}\u00b0C`,\n    humidity:    `${current.relative_humidity_2m}%`,\n    wind_speed:  `${current.wind_speed_10m} km\/h`,\n  };\n}\n\nfunction calculate({ expression }) {\n  try {\n    \/\/ Strip anything that is not a number or basic operator before eval.\n    \/\/ This is not a complete sandbox \u2014 use a proper math parser like mathjs\n    \/\/ in production if expressions come from untrusted users.\n    const safe = expression.replace(\/[^0-9+\\-*\/.() %]\/g, '');\n    if (!safe.trim()) return { error: 'Invalid or empty expression' };\n\n    const result = Function('\"use strict\"; return (' + safe + ')')();\n    return { expression, result };\n  } catch {\n    return { error: `Could not evaluate: ${expression}` };\n  }\n}\n\nasync function get_exchange_rate({ from, to, amount = 1 }) {\n  const url  = `https:\/\/api.frankfurter.app\/latest?from=${from.toUpperCase()}&to=${to.toUpperCase()}`;\n  const res  = await fetch(url);\n  const data = await res.json();\n\n  if (data.error) return { error: data.error };\n\n  const rate      = data.rates[to.toUpperCase()];\n  if (!rate) return { error: `No rate found for ${from} \u2192 ${to}` };\n\n  const converted = parseFloat((amount * rate).toFixed(4));\n\n  return { from: from.toUpperCase(), to: to.toUpperCase(), rate, amount, converted };\n}\n\nmodule.exports = { get_weather, calculate, get_exchange_rate };\n<\/code><\/pre>\n<p>\u06cc\u06c1\u0627\u06ba \u0686\u0646\u062f \u0628\u0627\u062a\u06cc\u06ba \u0642\u0627\u0628\u0644 \u062a\u0648\u062c\u06c1 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>Open-Meteo \u0645\u0648\u0633\u0645 \u0644\u0627\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u062c\u06cc\u0648 \u06a9\u0648\u0688\u0646\u06af \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0637\u0648\u0644 \u0627\u0644\u0628\u0644\u062f \u0627\u0648\u0631 \u0637\u0648\u0644 \u0627\u0644\u0628\u0644\u062f \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0645\u0648\u0633\u0645 \u06a9\u06d2 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u067e\u0631 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631\u0646\u0627 \u0634\u06c1\u0631 \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06cc \u062a\u0627\u0631 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0639\u062a\u0645\u0627\u062f \u06c1\u06d2\u060c \u0627\u0648\u0631 geocoding API \u06c1\u062c\u06d2 \u06a9\u06cc \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0645\u0639\u0642\u0648\u0644 \u062d\u062f \u062a\u06a9 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1\u0627\u06ba \u062f\u0648 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0627\u0644\u06cc\u06ba \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u06cc\u06c1 \u062f\u0631\u0633\u062a\u06af\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u062a\u062c\u0627\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<p>\u06a9\u06c1 <code>calculate<\/code> \u0641\u0646\u06a9\u0634\u0646 \u062a\u0634\u062e\u06cc\u0635 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0646\u0645\u0628\u0631\u0632 \u0627\u0648\u0631 \u0622\u067e\u0631\u06cc\u0679\u0631\u0632 \u06a9\u06d2 \u0639\u0644\u0627\u0648\u06c1 \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u06c1\u0679\u0627 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u06d2 \u062e\u0637\u0631\u06d2 \u06a9\u0648 \u06a9\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u06cc\u06c1 \u0627\u06cc\u06a9 \u062d\u0642\u06cc\u0642\u06cc \u0633\u06cc\u0646\u0688 \u0628\u0627\u06a9\u0633 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u0633\u06d2 HTTP \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u06af\u0645\u0646\u0627\u0645 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u0633\u0627\u0645\u0646\u06d2 \u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0627\u06cc\u06a9 \u0645\u0646\u0627\u0633\u0628 \u0631\u06cc\u0627\u0636\u06cc \u06a9\u0627 \u062a\u062c\u0632\u06cc\u06c1 \u06a9\u0627\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u06cc\u0633\u06d2 \u06a9\u06c1 mathjs\u06d4<\/p>\n<p>\u0641\u0631\u06cc\u0646\u06a9\u0641\u0631\u0679 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u0631\u0646\u0633\u06cc \u06a9\u0648\u0688\u0632 \u06a9\u0648 \u0628\u0691\u06d2 \u0645\u06cc\u06ba \u0628\u062f\u0644 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0635\u0627\u0631\u0641 &quot;usd&#8221; \u06cc\u0627 &quot;Usd&#8221; \u0679\u0627\u0626\u067e \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u062f\u0648\u0646\u0648\u06ba \u06a9\u0627\u0645 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4 API \u0622\u062e\u0631 \u0645\u06cc\u06ba \u06a9\u06cc\u0633 \u062d\u0633\u0627\u0633 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-building-the-agentic-loop\">\u0627\u06cc\u06a9 \u0627\u06cc\u062c\u0646\u0679 \u0644\u0648\u067e \u0628\u0646\u0627\u0646\u0627<\/h2>\n<p>\u06cc\u06c1 \u0648\u06c1 \u0641\u0627\u0626\u0644 \u06c1\u06d2 \u062c\u0633\u06d2 \u0628\u0627\u0642\u06cc \u0633\u0628 \u0633\u067e\u0648\u0631\u0679 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0644\u0648\u067e \u062e\u0648\u062f \u062a\u0642\u0631\u06cc\u0628\u0627\u064b 20 \u0644\u0627\u0626\u0646\u0648\u06ba \u06a9\u0627 \u06c1\u06d2\u06d4 \u0628\u0627\u0642\u06cc \u0644\u0627\u06af\u0646\u06af \u0627\u0648\u0631 \u0627\u06cc\u0631\u0631 \u06c1\u06cc\u0646\u0688\u0644\u0646\u06af \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-js\">\/\/ src\/agent.js\nconst { GoogleGenerativeAI } = require('@google\/generative-ai');\nconst { toolDefinitions }    = require('.\/tools');\nconst { get_weather, calculate, get_exchange_rate } = require('.\/functions');\n\nconst genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);\n\n\/\/ Map tool names to handler functions\nconst toolHandlers = { get_weather, calculate, get_exchange_rate };\n\nasync function runAgent(userMessage) {\n  const model = genAI.getGenerativeModel({\n    model: process.env.GEMINI_MODEL || 'gemini-2.0-flash',\n    tools: [{ functionDeclarations: toolDefinitions }],\n  });\n\n  const chat = model.startChat();\n\n  console.log(`\\nUser: ${userMessage}`);\n  console.log('---');\n\n  let response = await chat.sendMessage(userMessage);\n  let iterations = 0;\n  const MAX_ITERATIONS = 10; \/\/ safety cap against infinite loops\n\n  \/\/ Agentic loop\n  while (iterations < MAX_ITERATIONS) {\n    iterations++;\n    const calls = response.response.functionCalls();\n\n    \/\/ No tool calls \u2014 model is done, return the answer\n    if (!calls || calls.length === 0) break;\n\n    \/\/ Run all requested tools, collect results\n    const toolResults = await Promise.allSettled(\n      calls.map(async (call) => {\n        console.log(`Calling tool: ${call.name}(${JSON.stringify(call.args)})`);\n\n        const handler = toolHandlers[call.name];\n\n        if (!handler) {\n          return {\n            functionResponse: {\n              name:     call.name,\n              response: { error: `Unknown tool: ${call.name}` },\n            },\n          };\n        }\n\n        try {\n          const result = await handler(call.args);\n          console.log(`Tool result: ${JSON.stringify(result)}`);\n          return {\n            functionResponse: {\n              name:     call.name,\n              response: result,\n            },\n          };\n        } catch (err) {\n          return {\n            functionResponse: {\n              name:     call.name,\n              response: { error: err.message },\n            },\n          };\n        }\n      })\n    );\n\n    \/\/ Extract values from allSettled (fulfilled only \u2014 errors already caught above)\n    const parts = toolResults\n      .filter(r => r.status === 'fulfilled')\n      .map(r => r.value);\n\n    \/\/ Send all results back to the model in one message\n    response = await chat.sendMessage(parts);\n  }\n\n  return response.response.text();\n}\n\nmodule.exports = { runAgent };\n<\/code><\/pre>\n<p>\u06a9\u06c1 <code>MAX_ITERATIONS<\/code> \u0679\u0648\u067e\u06cc \u067e\u0627\u06af\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2. \u0627\u06af\u0631 \u0679\u0648\u0644 \u063a\u0644\u0637\u06cc\u0627\u06ba \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u0631\u06c1\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0645\u0627\u0688\u0644 \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u0631\u062a\u0627 \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0645\u0627\u0688\u0644 \u0627\u06cc\u06a9 \u0644\u0648\u067e \u0645\u06cc\u06ba \u067e\u06be\u0646\u0633 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u062d\u0642\u06cc\u0642\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06d2 \u0644\u06cc\u06d2\u060c 10 \u062a\u06a9\u0631\u0627\u0631 \u06a9\u0627\u0641\u06cc \u06c1\u06cc\u06ba\u06d4 \u067e\u06cc\u0686\u06cc\u062f\u06c1 \u0645\u0644\u0679\u06cc \u0679\u0648\u0644 \u0633\u0648\u0627\u0644\u0627\u062a \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 2-3 \u0645\u0648\u0691 \u0645\u06cc\u06ba \u062d\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><code>Promise.allSettled<\/code>    \u062a\u0645\u0627\u0645 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u062f\u06c1 \u0679\u0648\u0644\u0632 \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u0648\u0627\u0631 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0645\u062a\u0648\u0627\u0632\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0686\u0644\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0645\u0627\u0688\u0644 \u0627\u06cc\u06a9 \u06c1\u06cc \u062c\u0648\u0627\u0628 \u0645\u06cc\u06ba \u0645\u0648\u0633\u0645 \u0627\u0648\u0631 \u0634\u0631\u062d \u0645\u0628\u0627\u062f\u0644\u06c1 \u062f\u0648\u0646\u0648\u06ba \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0648\u06c1 \u0628\u06cc\u06a9 \u0648\u0642\u062a \u062d\u0627\u0635\u0644 \u06a9\u06cc\u06d2 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06d2\u06d4 \u0627\u0646\u0641\u0631\u0627\u062f\u06cc \u0679\u0648\u0644 \u06a9\u06cc \u063a\u0644\u0637\u06cc\u0627\u06ba \u0646\u0642\u0634\u06d2 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u067e\u06a9\u0691\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u060c \u0628\u063a\u06cc\u0631 \u0627\u06cc\u06a9 \u063a\u0644\u0637\u06cc \u06a9\u06d2 \u062f\u0648\u0633\u0631\u06cc \u062e\u0631\u0627\u0628\u06cc \u06a9\u06d2\u06d4<\/p>\n<p>\u0644\u0627\u06af\u0646\u06af \u062c\u0627\u0646 \u0628\u0648\u062c\u06be \u06a9\u0631 \u06c1\u06d2\u06d4 \u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u0622\u067e \u0627\u067e\u0646\u06d2 \u0627\u06cc\u062c\u0646\u0679\u0648\u06ba \u06a9\u0648 \u0628\u0646\u0627\u062a\u06d2 \u0627\u0648\u0631 \u062c\u0627\u0646\u0686\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0622\u067e \u062d\u0642\u06cc\u0642\u06cc \u0648\u0642\u062a \u0645\u06cc\u06ba \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0679\u0648\u0644 \u06a9\u0627\u0644\u0632 \u06a9\u0648 \u062f\u06cc\u06a9\u06be \u06a9\u0631 \u0628\u062a\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0622\u06cc\u0627 \u0622\u067e \u06a9\u06cc \u0631\u0648\u0679\u0646\u06af \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u06cc \u06c1\u06d2\u06d4 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u0648\u0688 \u0627\u0633\u06d2 \u06a9\u0646\u0633\u0648\u0644 \u0622\u0624\u0679 \u067e\u0679 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u06cc\u06a9 \u0633\u0679\u0631\u06a9\u0686\u0631\u0688 \u0644\u0627\u06af\u0631 \u06a9\u06cc \u0637\u0631\u0641 \u0644\u06d2 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u06cc\u06a9 \u062c\u06cc\u0633\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-the-cli-entry-point\">CLI \u0627\u0646\u0679\u0631\u06cc \u067e\u0648\u0627\u0626\u0646\u0679<\/h2>\n<p><code>require('dotenv').config()<\/code>    \u06cc\u06c1 \u067e\u06c1\u0644\u06d2 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0622\u067e \u06a9\u06cc API \u06a9\u0644\u06cc\u062f \u06a9\u0633\u06cc \u0627\u0648\u0631 \u0686\u06cc\u0632 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0644\u0648\u0688 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u0627\u06cc\u06a9 \u0645\u0639\u06cc\u0627\u0631\u06cc \u0631\u06cc\u0688 \u0644\u0627\u0626\u0646 \u0644\u0648\u067e \u06c1\u06d2\u06d4 \u062f\u0631\u062c \u06a9\u06cc \u06af\u0626\u06cc \u06c1\u0631 \u0644\u0627\u0626\u0646 \u06c1\u06d2\u06d4 <code>runAgent<\/code>\u062c\u0648\u0627\u0628 \u067e\u0631\u0646\u0679 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0644\u0648\u067e \u0627\u06af\u0644\u06d2 \u0627\u0646 \u067e\u0679 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-js\">\/\/ src\/index.js\nrequire('dotenv').config();\nconst readline     = require('readline');\nconst { runAgent } = require('.\/agent');\n\nconst rl = readline.createInterface({\n  input:  process.stdin,\n  output: process.stdout,\n});\n\nfunction ask(prompt) {\n  return new Promise(resolve => rl.question(prompt, resolve));\n}\n\nasync function main() {\n  console.log('Gemini Agent \u2014 type your question, or \"exit\" to quit\\n');\n\n  while (true) {\n    const input = await ask('You: ');\n    if (input.toLowerCase() === 'exit') break;\n    if (!input.trim()) continue;\n\n    try {\n      const answer = await runAgent(input);\n      console.log(`\\nAgent: ${answer}\\n`);\n    } catch (err) {\n      console.error(`Error: ${err.message}`);\n    }\n  }\n\n  rl.close();\n}\n\nmain();\n<\/code><\/pre>\n<h2 id=\"heading-adding-an-express-http-server\">\u0627\u06cc\u06a9\u0633\u067e\u0631\u06cc\u0633 HTTP \u0633\u0631\u0648\u0631 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>CLI \u062c\u0627\u0646\u0686 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0641\u06cc\u062f \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u0645\u06cc\u06ba \u0627\u0646\u0636\u0645\u0627\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 HTTP \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u062f\u0631\u06a9\u0627\u0631 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-js\">\/\/ src\/server.js\nrequire('dotenv').config();\nconst express      = require('express');\nconst { runAgent } = require('.\/agent');\n\nconst app  = express();\nconst PORT = process.env.PORT || 3000;\n\napp.use(express.json());\n\napp.post('\/agent', async (req, res) => {\n  const { message } = req.body;\n\n  if (!message || typeof message !== 'string') {\n    return res.status(400).json({ error: 'message is required and must be a string' });\n  }\n\n  try {\n    const answer = await runAgent(message);\n    res.json({ answer });\n  } catch (err) {\n    console.error('[agent error]', err.message);\n    res.status(500).json({ error: 'Agent failed to process the request' });\n  }\n});\n\napp.listen(PORT, () => {\n  console.log(`Agent server running on http:\/\/localhost:${PORT}`);\n});\n<\/code><\/pre>\n<p>\u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">node src\/server.js\n<\/code><\/pre>\n<p>\u0628\u0631\u0627\u06c1 \u06a9\u0631\u0645 \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">curl -X POST http:\/\/localhost:3000\/agent \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"message\": \"What is the weather in Paris?\"}'\n<\/code><\/pre>\n<p>\u062c\u0648\u0627\u0628:<\/p>\n<pre><code class=\"language-json\">{\n  \"answer\": \"The current weather in Paris, France is 19\u00b0C with 65% humidity and wind speeds of 12 km\/h.\"\n}\n<\/code><\/pre>\n<p>POST \u0628\u0627\u0688\u06cc \u0622\u0633\u0627\u0646 \u06c1\u06d2\u06d4 <code>{ message }<\/code> \u0627\u0639\u062a\u0631\u0627\u0636 \u062c\u0648\u0627\u0628 \u0635\u0627\u0641 \u06c1\u06d2\u06d4 <code>{ answer }<\/code> \u062a\u0627\u0631 \u0622\u067e \u06a9\u0627 \u0627\u06cc\u062c\u0646\u0679 \u0628\u0627\u0642\u06cc \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u06d2 \u06af\u0627\u06d4<\/p>\n<h2 id=\"heading-testing-the-agent\">\u0627\u06cc\u062c\u0646\u0679 \u0679\u06cc\u0633\u0679<\/h2>\n<p>CLI \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">node src\/index.js\n<\/code><\/pre>\n<p>\u06a9\u06c1 <code>You:<\/code> \u067e\u0631\u0627\u0645\u067e\u0679 \u0631\u06cc\u0688 \u0644\u0627\u0626\u0646 \u0633\u06d2 \u0622\u062a\u0627 \u06c1\u06d2\u06d4 <code>index.js<\/code>. \u06a9\u06c1 <code>User:<\/code> \u0644\u0627\u0626\u0646 \u0627\u0648\u0631 <code>---<\/code> \u062d\u062f \u0628\u0646\u062f\u06cc \u0628\u0630\u0631\u06cc\u0639\u06c1 \u0644\u06a9\u06be\u0627 \u06af\u06cc\u0627 \u06c1\u06d2: <code>agent.js<\/code> \u06c1\u0631 \u0631\u0646 \u06a9\u06d2 \u0622\u063a\u0627\u0632 \u0645\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0648\u06c1\u06cc \u0644\u0627\u06af\u0646\u06af \u06c1\u06d2 \u062c\u0633\u06d2 \u0627\u06cc\u062c\u0646\u0679 \u0644\u0648\u067e \u0633\u06cc\u06a9\u0634\u0646 \u0645\u06cc\u06ba \u0628\u06cc\u0627\u0646 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0646\u06af\u0644 \u0679\u0648\u0644 &#8211; \u0645\u0648\u0633\u0645:<\/p>\n<pre><code class=\"language-plaintext\">You: What's the weather in Tokyo?\n\nUser: What's the weather in Tokyo?\n---\nCalling tool: get_weather({\"city\":\"Tokyo\"})\nTool result: {\"city\":\"Tokyo, JP\",\"temperature\":\"31\u00b0C\",\"humidity\":\"72%\",\"wind_speed\":\"8 km\/h\"}\n\nAgent: The current weather in Tokyo, Japan is 31\u00b0C with 72% humidity and wind speeds of 8 km\/h.\n<\/code><\/pre>\n<p>\u062f\u0648 \u0679\u0648\u0644\u0632 &#8211; \u0633\u0644\u0633\u0644\u06c1 \u06a9\u0627 \u0627\u0646\u062f\u0627\u0632\u06c1:<\/p>\n<pre><code class=\"language-plaintext\">You: What is the weather in Tokyo? If it's above 20\u00b0C, convert 10000 JPY to EUR.\n\nUser: What is the weather in Tokyo? If it's above 20\u00b0C, convert 10000 JPY to EUR.\n---\nCalling tool: get_weather({\"city\":\"Tokyo\"})\nTool result: {\"city\":\"Tokyo, JP\",\"temperature\":\"31\u00b0C\",\"humidity\":\"72%\",\"wind_speed\":\"8 km\/h\"}\n\nCalling tool: get_exchange_rate({\"from\":\"JPY\",\"to\":\"EUR\",\"amount\":10000})\nTool result: {\"from\":\"JPY\",\"to\":\"EUR\",\"rate\":0.006,\"amount\":10000,\"converted\":60.0}\n\nAgent: The current temperature in Tokyo is 31\u00b0C, which is above 20\u00b0C.\nConverting 10,000 JPY to EUR at the current exchange rate gives approximately 60.00 EUR.\n<\/code><\/pre>\n<p>\u06a9\u06cc\u0627 \u06c1\u0648\u0627 \u0646\u0648\u0679\u0633 \u06a9\u0631\u06cc\u06ba\u06d4 <code>get_weather<\/code>\u06cc\u06c1 \u0646\u062a\u06cc\u062c\u06c1 (31 \u00b0 C) \u067e\u0691\u06be\u062a\u0627 \u06c1\u06d2\u060c \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u067e\u0646\u06cc \u0645\u0634\u0631\u0648\u0637 \u0645\u0646\u0637\u0642 \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0627\u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>get_exchange_rate<\/code>. \u0622\u067e \u0646\u06d2 \u06a9\u0648\u0626\u06cc \u0628\u0631\u0627\u0646\u0686\u0646\u06af \u0645\u0646\u0637\u0642 \u0646\u06c1\u06cc\u06ba \u0644\u06a9\u06be\u06cc \u06c1\u06d2\u06d4 \u0645\u0627\u0688\u0644 \u0646\u06d2 \u0627\u0633\u06d2 \u0635\u0631\u0641 \u062a\u0641\u0635\u06cc\u0644 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0633\u0646\u0628\u06be\u0627\u0644\u0627\u06d4<\/p>\n<p>\u06a9\u06cc\u0644\u06a9\u0648\u0644\u06cc\u0679\u0631:<\/p>\n<pre><code class=\"language-plaintext\">You: How much is 18% tip on a $47.50 restaurant bill?\n\nUser: How much is 18% tip on a $47.50 restaurant bill?\n---\nCalling tool: calculate({\"expression\":\"47.50 * 0.18\"})\nTool result: {\"expression\":\"47.50 * 0.18\",\"result\":8.55}\n\nAgent: An 18% tip on a $47.50 bill is $8.55, making your total $56.05.\n<\/code><\/pre>\n<p>\u0627\u06cc\u06a9 \u0633\u0648\u0627\u0644 \u0645\u06cc\u06ba \u062a\u06cc\u0646 \u0679\u0648\u0644\u0632 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-plaintext\">You: What's the weather in London and Berlin? And what is 250 GBP in EUR?\n\nUser: What's the weather in London and Berlin? And what is 250 GBP in EUR?\n---\nCalling tool: get_weather({\"city\":\"London\"})\nCalling tool: get_weather({\"city\":\"Berlin\"})\nCalling tool: get_exchange_rate({\"from\":\"GBP\",\"to\":\"EUR\",\"amount\":250})\nTool result: {\"city\":\"London, GB\",\"temperature\":\"16\u00b0C\",\"humidity\":\"78%\",\"wind_speed\":\"20 km\/h\"}\nTool result: {\"city\":\"Berlin, DE\",\"temperature\":\"22\u00b0C\",\"humidity\":\"55%\",\"wind_speed\":\"14 km\/h\"}\nTool result: {\"from\":\"GBP\",\"to\":\"EUR\",\"rate\":1.17,\"amount\":250,\"converted\":292.5}\n\nAgent: London is currently 16\u00b0C with 78% humidity and 20 km\/h winds.\nBerlin is warmer at 22\u00b0C with 55% humidity and lighter winds of 14 km\/h.\n250 GBP converts to approximately 292.50 EUR at the current exchange rate.\n<\/code><\/pre>\n<p>\u062a\u06cc\u0646\u0648\u06ba \u0627\u0648\u0632\u0627\u0631 \u0645\u062a\u0648\u0627\u0632\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0686\u0644\u0627\u0626\u06d2 \u062c\u0627\u062a\u06d2 \u062a\u06be\u06d2\u06d4 <code>Promise.allSettled<\/code> \u06cc\u06c1\u06cc \u0648\u062c\u06c1 \u06c1\u06d2\u06d4 \u062a\u0631\u062a\u06cc\u0628 \u0648\u0627\u0631 \u0644\u0648\u067e \u062a\u06cc\u0646 \u0633\u06cc\u0631\u06cc\u0644 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u0627\u0646\u062c\u0627\u0645 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u062a\u0648\u0627\u0632\u06cc \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u0633\u0628 \u0633\u06d2 \u0633\u0633\u062a \u0648\u0627\u062d\u062f \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u06d2 \u0648\u0642\u062a \u067e\u0631 \u0648\u06c1\u06cc \u0646\u062a\u0627\u0626\u062c \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-troubleshooting\">\u0645\u0633\u0626\u0644\u06c1 \u062d\u0644<\/h2>\n<p>\u06cc\u06c1\u0627\u06ba \u06a9\u0686\u06be \u0639\u0627\u0645 \u0645\u0633\u0627\u0626\u0644 \u06c1\u06cc\u06ba \u062c\u0646 \u06a9\u0627 \u0622\u067e \u06a9\u0648 \u0633\u0627\u0645\u0646\u0627 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0646 \u06a9\u0627 \u062d\u0644\u06d4<\/p>\n<h3 id=\"heading-1-404-not-found-modelsgemini-15-flash-is-not-found-for-api-version-v1beta\">1\u06d4 <code>[404 Not Found] models\/gemini-1.5-flash is not found for API version v1beta<\/code><\/h3>\n<p>\u0645\u0627\u0688\u0644 \u06a9\u0627 \u0646\u0627\u0645 \u067e\u0631\u0627\u0646\u0627 \u06c1\u06d2\u06d4 Google \u0648\u0642\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0633\u0627\u062a\u06be \u067e\u0631\u0627\u0646\u06d2 \u0639\u0631\u0641\u06cc \u0646\u0627\u0645\u0648\u06ba \u06a9\u0648 \u0641\u0631\u0633\u0648\u062f\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0628\u0627\u062f\u0644\u06c1 \u06a9\u0631\u06cc\u06ba <code>gemini-2.0-flash<\/code> \u06a9\u0648 <code>agent.js<\/code>. \u06cc\u06c1 \u0686\u06cc\u06a9 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u06cc \u06a9\u0644\u06cc\u062f \u06a9\u0648 \u0627\u0635\u0644 \u0645\u06cc\u06ba \u06a9\u0646 \u0645\u0627\u0688\u0644\u0632 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u062d\u0627\u0635\u0644 \u06c1\u06d2\u060c \u0686\u0644\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">node -e \"\nconst { GoogleGenerativeAI } = require('@google\/generative-ai');\nrequire('dotenv').config();\nconst g = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);\ng.listModels().then(r => r.models.forEach(m => console.log(m.name)));\n\"\n<\/code><\/pre>\n<h3 id=\"heading-2-429-too-many-requests-you-exceeded-your-current-quota\">2. <code>[429 Too Many Requests] You exceeded your current quota<\/code><\/h3>\n<p>\u06a9\u06c1 <code>gemini-2.0-flash<\/code> \u0645\u0641\u062a \u062f\u0631\u062c\u06c1 \u0641\u06cc \u062f\u0646 1,500 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u062a\u06a9 \u0645\u062d\u062f\u0648\u062f \u06c1\u06d2\u06d4 \u062f\u0628\u0627\u0646\u06d2 \u067e\u0631\u060c \u0622\u062f\u06be\u06cc \u0631\u0627\u062a \u062a\u06a9 \u06a9\u06cc \u062a\u0645\u0627\u0645 \u06a9\u0627\u0644\u0632 \u06a9\u0627\u0648\u0646\u0679\u0631 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u062a\u06d2 \u06c1\u0648\u0626\u06d2\u060c 429 \u0648\u0627\u067e\u0633 \u0622 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06cc\u06d4<\/p>\n<p>\u063a\u0644\u0637\u06cc \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u06a9\u0648\u0679\u06c1 ID \u06a9\u0627 \u0646\u0627\u0645 \u062f\u06cc\u062a\u06cc \u06c1\u06d2\u06d4 <code>GenerateRequestsPerDayPerProjectPerModel-FreeTier<\/code> \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u0627\u067e\u0646\u06cc \u06cc\u0648\u0645\u06cc\u06c1 \u062d\u062f \u062a\u06a9 \u067e\u06c1\u0646\u0686 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>GenerateRequestsPerMinutePerProjectPerModel-FreeTier<\/code> \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u0641\u06cc \u0645\u0646\u0679 \u06a9\u06cc \u0634\u0631\u062d \u06c1\u06d2\u06d4<\/p>\n<p>\u0641\u06cc \u0645\u0646\u0679 \u06a9\u06cc \u062d\u062f \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u063a\u0644\u0637\u06cc\u0648\u06ba \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba: <code>retryDelay<\/code> \u0645\u06cc\u062f\u0627\u0646 \u0628\u0631\u0627\u06c1 \u06a9\u0631\u0645 \u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688 \u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u0631\u06cc\u06ba\u06d4 \u0631\u0648\u0632\u0627\u0646\u06c1 \u06a9\u06cc \u062d\u062f\u0648\u062f \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u06a9\u0648\u0679\u06c1 \u0641\u06cc \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u06c1\u06cc \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0633\u06d2 \u062a\u0639\u0644\u0642 \u0631\u06a9\u06be\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u062a\u0645\u0627\u0645 \u0645\u0627\u0688\u0644\u0632 \u0627\u0633 \u06a9\u0627 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062a\u06cc\u0646 \u0637\u0631\u06cc\u0642\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<ul>\n<li>\n<p><strong>\u0646\u0626\u06d2 \u0645\u0646\u0635\u0648\u0628\u06d2<\/strong> (\u062a\u06cc\u0632 \u062a\u0631\u06cc\u0646): aistudio.google.com \u067e\u0631 \u062c\u0627\u0626\u06cc\u06ba\u060c \u0627\u06cc\u06a9 \u0646\u06cc\u0627 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u06cc\u06a9 \u0646\u0626\u06cc API \u06a9\u0644\u06cc\u062f \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0648\u0631 <code>.env<\/code>. \u0622\u067e \u06a9\u0648 \u0627\u067e\u0646\u0627 \u0646\u06cc\u0627 \u0645\u062e\u062a\u0635 \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0645\u0648\u0635\u0648\u0644 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<\/li>\n<li>\n<p><strong>\u0627\u062f\u0627\u0626\u06cc\u06af\u06cc \u06a9\u0648 \u0686\u0627\u0644\u0648 \u06a9\u0631\u06cc\u06ba\u06d4<\/strong>: \u0628\u0644\u0646\u06af \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u0645\u0646\u0635\u0648\u0628\u06d2 \u0645\u0641\u062a \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06d2 \u062f\u0631\u062c\u06d2 \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u06c1\u062a \u0632\u06cc\u0627\u062f\u06c1 \u062d\u062f\u06cc\u06ba \u062d\u0627\u0635\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0628\u0631\u0627\u06c1 \u06a9\u0631\u0645 \u0627\u0633\u06d2 aistudio.google.com \u067e\u0631 \u0633\u06cc\u0679 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p><strong>\u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u0648<\/strong>: \u0631\u0648\u0632\u0627\u0646\u06c1 \u0622\u062f\u06be\u06cc \u0631\u0627\u062a \u06a9\u0648 \u067e\u06cc\u0633\u06cc\u0641\u06a9 \u0679\u0627\u0626\u0645 \u067e\u0631 \u0631\u06cc \u0633\u06cc\u0679 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<\/ul>\n<p>\u06a9\u06cc\u0648\u0646\u06a9\u06c1 <code>agent.js<\/code> \u0645\u0627\u0688\u0644 \u06a9\u0627 \u0646\u0627\u0645 \u067e\u0691\u06be\u06cc\u06ba\u06d4 <code>process.env.GEMINI_MODEL<\/code>\u0622\u067e \u06a9\u0633\u06cc \u06a9\u0648\u0688 \u06a9\u0648 \u0686\u06be\u0648\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u0628\u06be\u06cc \u0645\u0627\u0688\u0644\u0632 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0622\u067e \u06a9\u0627 \u06c1\u06d2\u06d4 <code>.env<\/code> \u06c1\u0644\u06a9\u06d2 \u0645\u0627\u0688\u0644 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0679\u06cc\u0633\u0679 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">GEMINI_MODEL=gemini-2.0-flash-lite\n<\/code><\/pre>\n<p>\u06a9\u0648\u0679\u06c1 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u06cc\u062c\u0646\u0679 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 <code>gemini-2.0-flash<\/code>.<\/p>\n<h3 id=\"heading-3-error-geminiapikey-is-not-set\">3\u06d4 <code>Error: GEMINI_API_KEY is not set<\/code><\/h3>\n<p>\u062f\u0633 \u0645\u06cc\u06ba \u0633\u06d2 \u0646\u0648 \u0628\u0627\u0631\u060c <code>require('dotenv').config()<\/code> \u06cc\u06c1 \u063a\u0627\u0626\u0628 \u06c1\u06d2 \u06cc\u0627 \u062f\u06cc\u06af\u0631 \u0636\u0631\u0648\u0631\u06cc\u0627\u062a \u06a9\u06d2 \u062a\u062d\u062a \u062f\u0641\u0646 \u06c1\u06d2\u06d4 \u0627\u0633\u06d2 \u0627\u0648\u067e\u0631 \u06a9\u06cc \u0637\u0631\u0641 \u06af\u06be\u0633\u06cc\u0679\u06cc\u06ba\u06d4 <code>index.js<\/code>. \u0622\u067e \u06a9\u0627 <code>.env<\/code> \u06cc\u06c1 \u0622\u067e \u06a9\u06d2 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u062c\u0691 \u0645\u06cc\u06ba \u0628\u06be\u06cc \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u060c \u062c\u0633 \u0645\u06cc\u06ba \u0627\u0635\u0644 \u06a9\u0644\u06cc\u062f \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u06d4 <code>your_api_key_here<\/code>.<\/p>\n<h3 id=\"heading-4-googlegenerativeaierror-400-invalidargument\">4. <code>GoogleGenerativeAIError: 400 INVALID_ARGUMENT<\/code><\/h3>\n<p>\u06cc\u06c1 \u062a\u0642\u0631\u06cc\u0628\u0627 \u06c1\u0645\u06cc\u0634\u06c1 \u063a\u0644\u0637 \u0679\u0648\u0644 \u0627\u0633\u06a9\u06cc\u0645\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 Gemini \u0628\u0691\u06d2 \u062d\u0631\u0648\u0641 \u06a9\u06cc \u0642\u0633\u0645 \u06a9\u06d2 \u062a\u0627\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>'OBJECT'<\/code>\u060c <code>'STRING'<\/code>\u060c <code>'NUMBER'<\/code>. JSON \u0627\u0633\u06a9\u06cc\u0645\u0627 \u0686\u06be\u0648\u0679\u06d2 \u062d\u0631\u0648\u0641 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u0627 <code>parameters.type<\/code> \u0642\u062f\u0631<\/p>\n<h3 id=\"heading-5-model-answers-without-calling-any-tools\">5. \u0679\u0648\u0644 \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0645\u0627\u0688\u0644 \u06a9\u0627 \u062c\u0648\u0627\u0628<\/h3>\n<p>\u062a\u0641\u0635\u06cc\u0644 \u06cc\u0627 \u062a\u0648 \u0628\u06c1\u062a \u0645\u0628\u06c1\u0645 \u06c1\u06d2 \u06cc\u0627 \u0635\u0627\u0631\u0641 \u06a9\u0627 \u0633\u0648\u0627\u0644 \u0645\u0627\u0688\u0644 \u06a9\u06d2 \u0631\u0648\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0627\u0641\u06cc \u0645\u0637\u0627\u0628\u0642\u062a \u0646\u06c1\u06cc\u06ba \u0631\u06a9\u06be\u062a\u0627\u06d4 \u0679\u0648\u0644 \u06a9\u0648 \u06a9\u0628 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2 \u0627\u0633 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644 \u0645\u06cc\u06ba \u0645\u0632\u06cc\u062f \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 \u062c\u0645\u0644\u06c1 &quot;\u0627\u0633 \u06a9\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0628 \u0635\u0627\u0631\u0641 X \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u067e\u0648\u0686\u06be\u06d2&#8221; \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0631\u0648\u0679\u0646\u06af \u06a9\u06cc \u062f\u0631\u0633\u062a\u06af\u06cc \u06a9\u0648 \u0628\u06c1\u062a\u0631 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-6-typeerror-fetch-is-not-a-function\">6\u06d4 <code>TypeError: fetch is not a function<\/code><\/h3>\n<p>\u0646\u0648\u0688 17 \u0633\u06d2 \u0646\u06cc\u0686\u06d2 \u06a9\u0648\u0626\u06cc \u0645\u0642\u0627\u0645\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 <code>fetch<\/code>. \u0646\u0648\u0688 18 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u06cc\u0627 \u06af\u06cc\u0627\u06d4 <code>node --version<\/code> \u0627\u067e\u0646\u0627 \u0686\u06cc\u06a9 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u0627\u067e \u06af\u0631\u06cc\u0688 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06a9\u06d2 \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u06cc\u06ba: <code>npm install node-fetch<\/code>. \u062a\u0645\u0627\u0645 \u0641\u0627\u0626\u0644\u06cc\u06ba \u06a9\u0627\u0644 \u06a9\u0631 \u0631\u06c1\u06cc \u06c1\u06cc\u06ba\u06d4 <code>fetch<\/code> \u067e\u06be\u0631 \u0622\u067e \u06a9\u0648 \u0627\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 <code>const fetch = require('node-fetch')<\/code> \u067e\u06c1\u0644\u06cc \u0644\u0627\u0626\u0646 \u062a\u06a9\u06d4<\/p>\n<h3 id=\"heading-7-tool-works-in-isolation-but-agent-loop-doesnt-call-it\">7. \u0679\u0648\u0644 \u0622\u0632\u0627\u062f\u0627\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0627\u06cc\u062c\u0646\u0679 \u0644\u0648\u067e \u0627\u0633\u06d2 \u06a9\u0627\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/h3>\n<p>\u0646\u0627\u0645 \u06c1\u06d2\u06d4 <code>toolDefinitions<\/code> \u06cc\u06c1 \u06a9\u0644\u06cc\u062f \u0633\u06d2 \u0628\u0627\u0644\u06a9\u0644 \u0645\u0645\u0627\u062b\u0644 \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2\u06d4 <code>toolHandlers<\/code>. \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u067e\u0679 \u0645\u06cc\u06ba\u060c \u0645\u0639\u0627\u0645\u0644\u0627\u062a \u0627\u06c1\u0645 \u06c1\u06cc\u06ba\u06d4 <code>get_Weather<\/code> \u0627\u0648\u0631 <code>get_weather<\/code> \u062f\u0648 \u0645\u062e\u062a\u0644\u0641 \u0686\u06cc\u0632\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-8-exchange-rate-returns-no-rate-found\">8. \u0632\u0631 \u0645\u0628\u0627\u062f\u0644\u06c1 \u06a9\u06cc \u0634\u0631\u062d \u0648\u0627\u067e\u0633\u06cc <code>No rate found<\/code><\/h3>\n<p>\u0622\u067e \u06a9\u0627 \u067e\u0627\u0633 \u06a9\u0631\u062f\u06c1 \u06a9\u0631\u0646\u0633\u06cc \u06a9\u0648\u0688 Frankfurter.app \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u062a\u0639\u0627\u0648\u0646 \u06cc\u0627\u0641\u062a\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 API 30 \u0628\u0691\u06cc \u06a9\u0631\u0646\u0633\u06cc\u0648\u06ba \u062a\u06a9 \u06a9\u0627 \u0627\u062d\u0627\u0637\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 Frankfurter.app \u0645\u06cc\u06ba \u062a\u0639\u0627\u0648\u0646 \u06cc\u0627\u0641\u062a\u06c1 \u06a9\u0648\u0688\u0632 \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-what-to-build-next\">\u0622\u06af\u06d2 \u06a9\u06cc\u0627 \u0628\u0646\u0627\u0646\u0627 \u06c1\u06d2\u06d4<\/h2>\n<p>\u06cc\u06c1\u0627\u06ba \u06a9\u06d2 \u062a\u06cc\u0646 \u0627\u0648\u0632\u0627\u0631 \u0628\u0646\u06cc\u0627\u062f \u06c1\u06cc\u06ba\u06d4 \u0644\u0648\u067e\u0633 \u0627\u0633\u06cc \u0637\u0631\u062d \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0686\u0627\u06c1\u06d2 \u0622\u067e \u06a9\u062a\u0646\u06d2 \u06c1\u06cc \u0679\u0648\u0644\u0632 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0627\u0648\u0632\u0627\u0631:<\/strong> \u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>search_products<\/code> PostgreSQL \u0679\u06cc\u0628\u0644\u0632 \u0633\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0635\u0644\u0627\u062d\u06cc\u062a \u0627\u06cc\u062c\u0646\u0679 \u06a9\u0648 \u067e\u0631\u0648\u0688\u06a9\u0679 \u0627\u0633\u0633\u0679\u0646\u0679 \u0645\u06cc\u06ba \u0628\u062f\u0644 \u062f\u06cc\u062a\u06cc \u06c1\u06d2\u06d4 \u06a9\u06cc\u0679\u0644\u0627\u06af \u06a9\u06cc \u0637\u0631\u0641 \u0627\u0634\u0627\u0631\u06c1 \u06a9\u0631\u06a9\u06d2\u060c \u0622\u067e \u0628\u063a\u06cc\u0631 \u06a9\u0633\u06cc \u0631\u0648\u0679\u0646\u06af \u0645\u0646\u0637\u0642 \u0644\u06a9\u06be\u06d2 \u062f\u0633\u062a\u06cc\u0627\u0628\u06cc\u060c \u0642\u06cc\u0645\u062a\u0648\u06ba \u0627\u0648\u0631 \u0648\u0636\u0627\u062d\u062a\u0648\u06ba \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06d2 \u062c\u0648\u0627\u0628 \u062f\u06d2 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u062a\u062d\u0631\u06cc\u0631\u06cc \u0627\u0648\u0632\u0627\u0631:<\/strong> <code>get_*<\/code>    \u0641\u0646\u06a9\u0634\u0646 \u0627\u06cc\u062c\u0646\u0679 \u06a9\u0648 \u0635\u0631\u0641 \u067e\u0691\u06be\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0636\u0627\u0641\u06c1 <code>create_ticket<\/code> \u06cc\u0627 <code>send_notification<\/code> \u0641\u0639\u0627\u0644\u06cc\u062a \u0627\u06cc\u062c\u0646\u0679\u0648\u06ba \u06a9\u0648 \u0645\u0639\u0627\u0648\u0646\u062a \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc\u06ba \u062c\u0645\u0639 \u06a9\u0631\u0648\u0627\u0646\u06d2\u060c \u0648\u0631\u06a9 \u0641\u0644\u0648 \u06a9\u0648 \u0645\u062a\u062d\u0631\u06a9 \u06a9\u0631\u0646\u06d2\u060c \u0627\u0648\u0631 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u0646\u06d2 \u062c\u06cc\u0633\u06d2 \u0627\u0642\u062f\u0627\u0645\u0627\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u06cc \u06c1\u06d2\u06d4 \u062a\u062d\u0631\u06cc\u0631\u06cc \u0627\u0648\u0632\u0627\u0631 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u062f\u0631\u062c \u0630\u06cc\u0644 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0627\u062d\u062a\u06cc\u0627\u0637 \u0633\u06d2 \u0633\u0648\u0686\u06cc\u06ba: <strong>\u0627\u06cc\u0633\u06d2 \u0633\u0648\u0627\u0644\u0627\u062a \u062c\u0646 \u067e\u0631 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u062a\u0635\u062f\u06cc\u0642 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/strong>.<\/p>\n<p><strong>\u06a9\u0631\u0627\u0633 \u0633\u06cc\u0634\u0646 \u0645\u06cc\u0645\u0648\u0631\u06cc:<\/strong> \u0627\u0628\u06be\u06cc <code>model.startChat()<\/code> \u062c\u0628 \u0628\u06be\u06cc \u0622\u067e \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u0627\u06cc\u06a9 \u0646\u0626\u06cc \u06af\u0641\u062a\u06af\u0648 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4 \u06af\u0632\u0631\u0646\u0627 <code>history<\/code> \u062c\u0628 \u0622\u067e \u0686\u06cc\u0679\u0646\u06af \u0634\u0631\u0648\u0639 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u0635\u0641 \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0645\u0627\u0688\u0644 \u0622\u067e \u06a9\u06d2 \u067e\u0686\u06be\u0644\u06d2 \u0645\u0648\u0691 \u06a9\u0648 \u06cc\u0627\u062f \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u067e\u0646\u06d2 \u0635\u0627\u0631\u0641 ID \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u0627\u0633 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u06a9\u0648 PostgreSQL \u06cc\u0627 Redis \u0645\u06cc\u06ba \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0627\u06cc\u062c\u0646\u0679 \u067e\u0648\u0631\u06d2 \u0633\u06cc\u0634\u0646 \u0645\u06cc\u06ba \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u06a9\u0648 \u067e\u0627\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u0633\u0644\u0633\u0644\u06c1 \u0628\u0646\u062f\u06cc \u06a9\u0627 \u062c\u0648\u0627\u0628:<\/strong> UI \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0645\u06a9\u0645\u0644 \u062c\u0648\u0627\u0628 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0628\u062c\u0627\u0626\u06d2 \u0622\u067e \u06a9\u06d2 \u0679\u0627\u0626\u067e \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u062c\u0648\u0627\u0628\u0627\u062a \u062f\u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>chat.sendMessage<\/code> \u06a9\u06d2 \u0633\u0627\u062a\u06be <code>chat.sendMessageStream<\/code>. \u0679\u0648\u0644 \u06a9\u0627\u0644 \u0644\u0648\u067e \u0648\u06c1\u06cc \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4 \u0635\u0631\u0641 \u062d\u062a\u0645\u06cc \u062c\u0648\u0627\u0628 \u06a9\u06cc \u062a\u0631\u0633\u06cc\u0644 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644\u06cc \u0622\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u0645\u0627\u0688\u0644 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u06cc\u06ba:<\/strong> \u06a9\u06c1 <code>model<\/code> \u0627\u06cc\u06a9 \u062a\u0627\u0631 \u0688\u0627\u0644\u06cc\u06ba <code>getGenerativeModel<\/code> \u06cc\u06c1 \u0635\u0631\u0641 \u0648\u06c1\u06cc \u0686\u06cc\u0632 \u06c1\u06d2 \u062c\u0648 \u062c\u06cc\u0645\u0646\u06cc 2.0 \u0641\u0644\u06cc\u0634 \u067e\u0631 \u0637\u06d2 \u0634\u062f\u06c1 \u06c1\u06d2\u06d4 <code>gemini-2.0-flash-lite<\/code> \u0633\u0627\u062f\u06c1 \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u06cc\u06c1 \u06c1\u0644\u06a9\u0627 \u0627\u0648\u0631 \u062a\u06cc\u0632 \u06c1\u06d2\u06d4 \u067e\u06cc\u0686\u06cc\u062f\u06c1 \u06a9\u0627\u0645\u0648\u06ba \u067e\u0631 \u0632\u06cc\u0627\u062f\u06c1 \u0637\u0627\u0642\u062a\u0648\u0631 \u0646\u062a\u0627\u0626\u062c \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0686\u0644\u0627\u0626\u06cc\u06ba: <code>listModels<\/code> \u062a\u0627\u0632\u06c1 \u062a\u0631\u06cc\u0646 \u062f\u0633\u062a\u06cc\u0627\u0628 \u0645\u0627\u0688\u0644 \u062a\u0644\u0627\u0634 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0631\u0627\u06c1\u0650 \u06a9\u0631\u0645 \u0679\u0631\u0628\u0644 \u0634\u0648\u0679\u0646\u06af \u0633\u06cc\u06a9\u0634\u0646 \u0645\u06cc\u06ba \u0627\u0633\u06a9\u0631\u067e\u0679 \u0633\u06d2 \u0631\u062c\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627\u0644 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u062a\u0645\u0627\u0645 \u062c\u06cc\u0645\u0646\u06cc \u0645\u0627\u0688\u0644\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06cc\u06a9\u0633\u0627\u06ba \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u062a\u0628\u062f\u06cc\u0644\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0644\u0627\u0626\u0646 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u0645\u0636\u0645\u0648\u0646 \u06a9\u0627 \u0645\u06a9\u0645\u0644 \u0633\u0648\u0631\u0633 \u06a9\u0648\u0688 GitHub (github.com\/ziaogit\/nodejs-gemini-agent) \u067e\u0631 \u06c1\u06d2\u06d4<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u067e\u0686\u06be\u0644\u06d2 \u0633\u0627\u0644\u060c \u0627\u06cc\u06a9 \u06af\u0627\u06c1\u06a9 \u0646\u06d2 \u06c1\u0645 \u0633\u06d2 \u0627\u067e\u0646\u06d2 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0631\u067e\u0648\u0631\u0679\u0646\u06af \u0679\u0648\u0644 \u0645\u06cc\u06ba \u0628\u0627\u062a \u0686\u06cc\u062a \u06a9\u0627 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0648 \u06a9\u06c1\u0627\u06d4 \u062c\u06cc\u0633\u06d2 \u06c1\u06cc \u0645\u0644\u0627\u0632\u0645\u06cc\u0646 \u0633\u0648\u0627\u0644\u0627\u062a \u062f\u0631\u062c \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0633\u0633\u0679\u0645 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0633\u06d2 \u062d\u0642\u06cc\u0642\u06cc \u0648\u0642\u062a \u06a9\u06d2 \u062c\u0648\u0627\u0628\u0627\u062a \u0646\u06a9\u0627\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u067e\u06c1\u0644\u0627 \u0648\u0631\u0698\u0646 \u0627\u06cc\u06a9 \u062f\u0646 \u0645\u06cc\u06ba \u062a\u06cc\u0627\u0631 \u0627\u0648\u0631 \u0686\u0644 \u0631\u06c1\u0627 \u062a\u06be\u0627\u06d4 \u0627\u06cc\u06a9 \u06c1\u06cc \u0633\u0648\u0627\u0644 \u0646\u06d2 \u06a9\u0627\u0645 \u06a9\u06cc\u0627\u06d4 \u062a\u0627\u06c1\u0645\u060c \u0627\u06cc\u06a9 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-27224","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/27224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/comments?post=27224"}],"version-history":[{"count":0,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/27224\/revisions"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media?parent=27224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/categories?post=27224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/tags?post=27224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}