{"id":15464,"date":"2024-04-29T22:10:19","date_gmt":"2024-04-29T18:40:19","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=15464"},"modified":"2024-04-29T22:10:19","modified_gmt":"2024-04-29T18:40:19","slug":"developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/","title":{"rendered":"Developing Multi-Faceted Bots with Django, GPT-4, Whisper, and DALL-E"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">\u0645\u0642\u062f\u0645\u0647<\/h2>\n<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648\u0628 \u0645\u062f\u0631\u0646 \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0627 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0633\u0627\u0632\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0628\u0647 \u0633\u0637\u062d \u0628\u0639\u062f\u06cc \u0627\u0631\u062a\u0642\u0627 \u062f\u0627\u062f. \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0631 \u0631\u0648\u06cc \u062a\u0648\u0633\u0639\u0647 \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 \u0631\u0628\u0627\u062a\u200c\u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u062a\u0645\u0631\u06a9\u0632 \u062f\u0627\u0631\u062f \u06a9\u0647 \u0627\u0632 \u067e\u0631\u062f\u0627\u0632\u0634 \u0632\u0628\u0627\u0646 \u0637\u0628\u06cc\u0639\u06cc\u060c \u062a\u0648\u0644\u06cc\u062f \u062a\u0635\u0648\u06cc\u0631 \u0648 \u062a\u0634\u062e\u06cc\u0635 \u06af\u0641\u062a\u0627\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0627\u06cc\u0646 \u0631\u0628\u0627\u062a \u0647\u0627 \u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f\u06cc \u0631\u0627 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u062f\u0647\u0646\u062f \u0648 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u062d\u0627\u0644\u062a \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u062a\u0639\u0627\u0645\u0644 \u062f\u0631\u06af\u06cc\u0631 \u0645\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0647 \u062a\u0648\u0633\u0639\u0647 \u06cc\u06a9 \u0631\u0628\u0627\u062a \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af \u062c\u0646\u06af\u0648 \u0648 OpenAI \u0628\u0631\u0627\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0645\u06a9\u0627\u0644\u0645\u0647\u200c\u0627\u06cc\u060c Whisper \u0628\u0631\u0627\u06cc \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u062f\u0642\u06cc\u0642 \u06af\u0641\u062a\u0627\u0631 \u0648 DALL-E \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc\u200c\u067e\u0631\u062f\u0627\u0632\u062f. \u0633\u0627\u062e\u062a \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0631\u0627 \u062a\u0648\u0635\u06cc\u0641 \u0645\u06cc \u06a9\u0646\u062f \u06a9\u0647 \u062f\u0627\u0633\u062a\u0627\u0646 \u0647\u0627\u06cc\u06cc \u0631\u0627 \u0628\u0627 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0647\u0645\u0631\u0627\u0647 \u0622\u0646\u0647\u0627 \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc \u06a9\u0646\u062f. \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0645\u0648\u0636\u0648\u0639 \u062f\u0627\u0633\u062a\u0627\u0646 \u0631\u0627 \u0628\u0627 \u0635\u062f\u0627 \u06cc\u0627 \u0645\u062a\u0646 \u0645\u0634\u062e\u0635 \u06a9\u0646\u0646\u062f \u0648 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0627 \u06cc\u06a9 \u062f\u0627\u0633\u062a\u0627\u0646 \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u06a9\u0647 \u0628\u0627 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0628\u0635\u0631\u06cc \u062a\u0632\u0626\u06cc\u0646 \u0634\u062f\u0647 \u0627\u0633\u062a \u067e\u0627\u0633\u062e \u0645\u06cc \u062f\u0647\u062f.<\/p>\n<p>\u062f\u0631 \u067e\u0627\u06cc\u0627\u0646 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0634\u0645\u0627 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0648\u0631\u0648\u062f\u06cc \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u0628\u0647 \u0627\u0634\u06a9\u0627\u0644 \u0645\u062e\u062a\u0644\u0641 \u0627\u0632 \u062c\u0645\u0644\u0647 \u0645\u062a\u0646\u060c \u0635\u062f\u0627 \u0648 \u062a\u0635\u0648\u06cc\u0631 \u062f\u0631\u06a9 \u06a9\u0646\u062f \u0648 \u0628\u0647 \u0622\u0646 \u067e\u0627\u0633\u062e \u062f\u0647\u062f. \u0627\u06cc\u0646 \u0628\u0647 \u0637\u0648\u0631 \u0642\u0627\u0628\u0644 \u062a\u0648\u062c\u0647\u06cc \u062a\u0639\u0627\u0645\u0644 \u06a9\u0627\u0631\u0628\u0631 \u0628\u0627 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0627\u0641\u0632\u0627\u06cc\u0634 \u0645\u06cc \u062f\u0647\u062f \u0648 \u0622\u0646 \u0631\u0627 \u0628\u0635\u0631\u06cc \u062a\u0631 \u0648 \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u062a\u0631 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<h5 id=\"%d9%be%db%8c%d8%b4-%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\">\u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627<\/h5>\n<ul>\n<li>\u062f\u0631\u06a9 \u0627\u0648\u0644\u06cc\u0647 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0648 \u062c\u0646\u06af\u0648<\/li>\n<li>\u06cc\u06a9 \u06a9\u0644\u06cc\u062f OpenAI API: \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0627\u0632 \u0634\u0645\u0627 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u062f \u0628\u0627 \u0645\u062f\u0644\u200c\u0647\u0627\u06cc GPT-4 \u0648 DALL-E OpenAI \u062a\u0639\u0627\u0645\u0644 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f\u060c \u06a9\u0647 \u0628\u0647 \u06cc\u06a9 \u06a9\u0644\u06cc\u062f API \u0627\u0632 OpenAI \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u0646\u062f.<\/li>\n<li><span>Whisper<\/span><\/li>\n<li>\u0628\u0633\u062a\u0647 OpenAI Python<\/li>\n<\/ul>\n<p>\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u0645\u062d\u06cc\u0637 \u0634\u0645\u0627 \u0641\u0639\u0627\u0644 \u0627\u0633\u062a\u060c \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0628\u0633\u062a\u0647 OpenAI Python\u060c \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(env)sammy@ubuntu:$ pip install openai<\/code><\/pre>\n<\/div>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-1-%db%8c%da%a9%d9%be%d8%a7%d8%b1%da%86%d9%87-%d8%b3%d8%a7%d8%b2%db%8c-openai-whisper-%d8%a8%d8%b1%d8%a7%db%8c-%d8%aa%d8%b4%d8%ae%db%8c%d8%b5-%da%af%d9%81%d8%aa\">\u0645\u0631\u062d\u0644\u0647 1 &#8211; \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0633\u0627\u0632\u06cc OpenAI Whisper \u0628\u0631\u0627\u06cc \u062a\u0634\u062e\u06cc\u0635 \u06af\u0641\u062a\u0627\u0631<\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0631\u062d\u0644\u0647\u060c OpenAI Whisper \u0631\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u062c\u0646\u06af\u0648 \u062e\u0648\u062f \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u062a\u0627 \u0628\u0647 \u0622\u0646 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u06af\u0641\u062a\u0627\u0631 \u0631\u0627 \u0628\u0647 \u0645\u062a\u0646 \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u06a9\u0646\u062f. Whisper \u06cc\u06a9 \u0645\u062f\u0644 \u062a\u0634\u062e\u06cc\u0635 \u06af\u0641\u062a\u0627\u0631 \u0642\u0648\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc\u200c\u0647\u0627\u06cc \u062f\u0642\u06cc\u0642\u06cc \u0631\u0627 \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u062f\u060c \u06cc\u06a9 \u0648\u06cc\u0698\u06af\u06cc \u0645\u0647\u0645 \u0628\u0631\u0627\u06cc \u0631\u0628\u0627\u062a \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0645\u0627. \u0628\u0627 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0633\u0627\u0632\u06cc Whisper\u060c \u0628\u0631\u0646\u0627\u0645\u0647 \u0645\u0627 \u0642\u0627\u062f\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f \u0648\u0631\u0648\u062f\u06cc \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u0627\u0631\u0627\u0626\u0647 \u0634\u062f\u0647 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0635\u062f\u0627 \u0631\u0627 \u062f\u0631\u06a9 \u06a9\u0646\u062f.<\/p>\n<p>\u0627\u0628\u062a\u062f\u0627 \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u067e\u0631\u0648\u0698\u0647 \u062c\u0646\u06af\u0648 \u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u06cc\u062f. \u067e\u0633 \u0627\u0632 \u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u060c \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u062c\u0646\u06af\u0648 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0627\u062f\u063a\u0627\u0645 \u0622\u0645\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062e\u0648\u062f \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f\u060c \u0628\u0647 \u0641\u0647\u0631\u0633\u062a \u067e\u0631\u0648\u0698\u0647 \u062c\u0646\u06af\u0648 \u0628\u0631\u0648\u06cc\u062f \u0648 \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u0645\u062d\u06cc\u0637 \u0645\u062c\u0627\u0632\u06cc \u0634\u0645\u0627 \u0641\u0639\u0627\u0644 \u0627\u0633\u062a:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sammy@ubuntu:$ cd path_to_your_django_project\r\nsammy@ubuntu:$ source env\/bin\/activate<\/code><\/pre>\n<\/div>\n<h5 id=\"%d8%b1%d8%a7%d9%87-%d8%a7%d9%86%d8%af%d8%a7%d8%b2%db%8c-whisper-%d8%af%d8%b1-%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d9%87-%d8%ac%d9%86%da%af%d9%88-%d8%b4%d9%85%d8%a7\">\u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc Whisper \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u062c\u0646\u06af\u0648 \u0634\u0645\u0627<\/h5>\n<p>\u06a9\u0627\u0631\u06cc \u06a9\u0647 \u0627\u06a9\u0646\u0648\u0646 \u0628\u0627\u06cc\u062f \u0627\u0646\u062c\u0627\u0645 \u0634\u0648\u062f \u0627\u06cc\u062c\u0627\u062f \u062a\u0627\u0628\u0639\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 Whisper \u0628\u0631\u0627\u06cc \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u0641\u0627\u06cc\u0644 \u0647\u0627\u06cc \u0635\u0648\u062a\u06cc \u0628\u0647 \u0645\u062a\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f. \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062c\u062f\u06cc\u062f \u0628\u0627 \u0646\u0627\u0645 whisper_transcribe.py \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(env)sammy@ubuntu:$ touch whisper_transcribe.py<\/code><\/pre>\n<\/div>\n<p>whisper_transcribe.py \u0631\u0627 \u062f\u0631 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0645\u062a\u0646 \u062e\u0648\u062f \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 Whisper \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f. \u0633\u067e\u0633\u060c \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u062a\u0627\u0628\u0639\u06cc \u0631\u0627 \u062a\u0639\u0631\u06cc\u0641 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0645\u0633\u06cc\u0631 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0648\u0631\u0648\u062f\u06cc \u0645\u06cc \u06af\u06cc\u0631\u062f\u060c \u0627\u0632 Whisper \u0628\u0631\u0627\u06cc \u067e\u0631\u062f\u0627\u0632\u0634 \u0641\u0627\u06cc\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0633\u067e\u0633 \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import whisper\r\nmodel = whisper.load_model(\"base\")\r\n\r\n\r\ndef transcribe_audio(audio_path):\r\nresult = model.transcribe(audio_path)\r\nreturn result[\"text\"]<\/code><\/pre>\n<\/div>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0642\u0637\u0639\u0647 \u06a9\u062f\u060c \u0627\u0632 \u0645\u062f\u0644 &#8220;\u067e\u0627\u06cc\u0647&#8221; \u0628\u0631\u0627\u06cc \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f. Whisper \u0645\u062f\u0644\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u0631\u0627 \u0628\u0627 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0646\u06cc\u0627\u0632\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u062f\u0642\u062a \u0648 \u0639\u0645\u0644\u06a9\u0631\u062f \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0628\u0647 \u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u062f\u0644 \u0647\u0627\u06cc \u062f\u06cc\u06af\u0631 \u0631\u0627 \u0628\u0631 \u0627\u0633\u0627\u0633 \u0646\u06cc\u0627\u0632 \u062e\u0648\u062f \u0622\u0632\u0645\u0627\u06cc\u0634 \u06a9\u0646\u06cc\u062f.<\/p>\n<h5 id=\"%d8%aa%d8%b3%d8%aa-%d8%b1%d9%88%d9%86%d9%88%db%8c%d8%b3%db%8c\">\u062a\u0633\u062a \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc<\/h5>\n<p>\u0628\u0631\u0627\u06cc \u0622\u0632\u0645\u0627\u06cc\u0634 \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc\u060c \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0631\u0627 \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u067e\u0631\u0648\u0698\u0647 \u062c\u0646\u06af\u0648 \u062e\u0648\u062f \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f. \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0641\u0627\u06cc\u0644 \u062f\u0627\u0631\u0627\u06cc \u0641\u0631\u0645\u062a\u06cc \u0627\u0633\u062a \u06a9\u0647 Whisper \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0645\u06cc \u06a9\u0646\u062f (\u0645\u0627\u0646\u0646\u062f MP3\u060c WAV). \u0627\u06a9\u0646\u0648\u0646\u060c whisper_transcribe.py \u0631\u0627 \u0628\u0627 \u0627\u0641\u0632\u0648\u062f\u0646 \u062e\u0637\u0648\u0637 \u0632\u06cc\u0631 \u062f\u0631 \u067e\u0627\u06cc\u06cc\u0646 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code># For testing purposes\r\nif __name__ == \"__main__\":\r\nprint(transcribe_audio(\"path_to_your_audio_file\"))<\/code><\/pre>\n<\/div>\n<p>whisper_transcribe.py \u0631\u0627 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062e\u0648\u062f \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(env)sammy@ubuntu:$ python whisper_transcribe.py<\/code><\/pre>\n<\/div>\n<p>\u0627\u06af\u0631 \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0628\u0647 \u062f\u0631\u0633\u062a\u06cc \u062a\u0646\u0638\u06cc\u0645 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f\u060c \u0628\u0627\u06cc\u062f \u062e\u0631\u0648\u062c\u06cc \u0645\u062a\u0646 \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u0634\u062f\u0647 \u0631\u0627 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u0628\u0628\u06cc\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u067e\u0627\u06cc\u0647 \u0627\u06cc \u0628\u0631\u0627\u06cc \u062a\u0639\u0627\u0645\u0644\u0627\u062a \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0635\u062f\u0627 \u062f\u0631 \u0631\u0628\u0627\u062a \u0645\u0627 \u0639\u0645\u0644 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-2-%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%d9%be%d8%a7%d8%b3%d8%ae-%d9%87%d8%a7%db%8c-%d9%85%d8%aa%d9%86%db%8c-%d8%a8%d8%a7-gpt-4\">\u0645\u0631\u062d\u0644\u0647 2 &#8211; \u0627\u06cc\u062c\u0627\u062f \u067e\u0627\u0633\u062e \u0647\u0627\u06cc \u0645\u062a\u0646\u06cc \u0628\u0627 GPT-4<\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0631\u062d\u0644\u0647\u060c \u0627\u0632 GPT-4 LLM \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u067e\u0627\u0633\u062e \u0647\u0627\u06cc \u0645\u062a\u0646\u06cc \u0628\u0631 \u0627\u0633\u0627\u0633 \u0648\u0631\u0648\u062f\u06cc \u06a9\u0627\u0631\u0628\u0631 \u06cc\u0627 \u0631\u0648\u0646\u0648\u06cc\u0633\u06cc \u06af\u0641\u062a\u0627\u0631 \u0628\u0647 \u062f\u0633\u062a \u0622\u0645\u062f\u0647 \u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u0642\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f. GPT-4\u060c \u0628\u0627 \u0645\u062f\u0644 \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af \u062e\u0648\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u067e\u0627\u0633\u062e\u200c\u0647\u0627\u06cc \u0645\u0646\u0633\u062c\u0645 \u0648 \u0645\u0631\u062a\u0628\u0637 \u0628\u0627 \u0632\u0645\u06cc\u0646\u0647 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u062f\u060c \u0648 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0627\u0646\u062a\u062e\u0627\u0628 \u0627\u06cc\u062f\u0647\u200c\u0622\u0644 \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0628\u0627\u062a \u0686\u0646\u062f\u0648\u062c\u0647\u06cc \u0645\u0627 \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n<p>\u0642\u0628\u0644 \u0627\u0632 \u0627\u062f\u0627\u0645\u0647\u060c \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0633\u062a\u0647 OpenAI Python \u062f\u0631 \u0645\u062d\u06cc\u0637 \u0645\u062c\u0627\u0632\u06cc \u0634\u0645\u0627 \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627 \u062a\u0648\u0636\u06cc\u062d \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u0646\u0635\u0628 \u0634\u062f\u0647 \u0627\u0633\u062a. \u0645\u062f\u0644 GPT-4 \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u062f API \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f\u060c \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u0622\u0646 \u0631\u0627 \u0622\u0645\u0627\u062f\u0647 \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f. \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u06a9\u0644\u06cc\u062f OpenAI API \u0631\u0627 \u0628\u0647 \u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u06cc \u0645\u062d\u06cc\u0637\u06cc \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0645\u0633\u062a\u0642\u06cc\u0645\u0627\u064b \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0641\u0627\u06cc\u0644 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0636\u0627\u0641\u0647 \u0646\u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(env)sammy@ubuntu:$ export OPENAI_KEY=\"your-api-key\"<\/code><\/pre>\n<\/div>\n<h5 id=\"%d8%b1%d8%a7%d9%87-%d8%a7%d9%86%d8%af%d8%a7%d8%b2%db%8c-%d8%aa%da%a9%d9%85%db%8c%d9%84-%da%86%d8%aa\">\u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u062a\u06a9\u0645\u06cc\u0644 \u0686\u062a<\/h5>\n<p>\u0628\u0647 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u062c\u0646\u06af\u0648 \u062e\u0648\u062f \u0628\u0631\u0648\u06cc\u062f \u0648 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062c\u062f\u06cc\u062f \u0628\u0627 \u0646\u0627\u0645 chat_completion.py \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0645\u062f\u0644 GPT-4 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u067e\u0627\u0633\u062e \u0628\u0631 \u0627\u0633\u0627\u0633 \u0645\u062a\u0646 \u0648\u0631\u0648\u062f\u06cc \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import os\r\nfrom openai import OpenAI\r\nclient = OpenAI(api_key=os.environ[\"OPENAI_KEY\"])\r\n\r\ndef generate_story(input_text):\r\n# Call the OpenAI API to generate the story\r\nresponse = get_story(input_text)\r\n# Format and return the response\r\nreturn format_response(response)<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0627\u0628\u062a\u062f\u0627 \u06a9\u0644\u06cc\u062f API \u0644\u0627\u0632\u0645 \u0628\u0631\u0627\u06cc \u0627\u062d\u0631\u0627\u0632 \u0647\u0648\u06cc\u062a \u0628\u0627 \u062e\u062f\u0645\u0627\u062a OpenAI \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u0645\u06cc \u06a9\u0646\u062f. \u0633\u067e\u0633 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u062c\u062f\u0627\u06af\u0627\u0646\u0647\u060c get_story \u0631\u0627 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 API \u0631\u0627 \u0628\u0627 OpenAI \u0628\u0631\u0627\u06cc \u062f\u0627\u0633\u062a\u0627\u0646 \u0648 \u0633\u067e\u0633 \u062a\u0627\u0628\u0639 \u062f\u06cc\u06af\u0631\u06cc \u0628\u0647 \u0646\u0627\u0645 format_response \u0631\u0627 \u0628\u0631\u0627\u06cc \u0642\u0627\u0644\u0628\u200c\u0628\u0646\u062f\u06cc \u067e\u0627\u0633\u062e API \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u06a9\u0646\u062f.<\/p>\n<p>\u062d\u0627\u0644\u0627 \u0628\u06cc\u0627\u06cc\u06cc\u062f \u0631\u0648\u06cc \u062a\u0627\u0628\u0639 get_story \u062a\u0645\u0631\u06a9\u0632 \u06a9\u0646\u06cc\u0645. \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646 \u0641\u0627\u06cc\u0644 chat_completion.py \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>def get_story(input_text):\r\n# Construct the system prompt. Feel free to experiment with different prompts.\r\nsystem_prompt = f\"\"\"You are a story generator.\r\nYou will be provided with a description of the story the user wants.\r\nWrite a story using the description provided.\"\"\"\r\n# Make the API call\r\nresponse = client.chat.completions.create(\r\nmodel=\"gpt-4\",\r\nmessages=[\r\n{\"role\": \"system\", \"content\": system_prompt},\r\n{\"role\": \"user\", \"content\": input_text},\r\n],\r\ntemperature=0.8\r\n)\r\n\r\n# Return the API response\r\nreturn response<\/code><\/pre>\n<\/div>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u062a\u0627\u0628\u0639\u060c \u0627\u0628\u062a\u062f\u0627 \u062f\u0633\u062a\u0648\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u06a9\u0647 \u0645\u062f\u0644 \u0631\u0627 \u062f\u0631 \u0645\u0648\u0631\u062f \u0648\u0638\u06cc\u0641\u0647\u200c\u0627\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u062f\u060c \u0645\u0637\u0644\u0639 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0633\u067e\u0633 \u0627\u0632 ChatCompletion API \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u062a\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062a\u0646 \u0648\u0631\u0648\u062f\u06cc \u06a9\u0627\u0631\u0628\u0631\u060c \u062f\u0627\u0633\u062a\u0627\u0646\u06cc \u062a\u0648\u0644\u06cc\u062f \u06a9\u0646\u062f.<\/p>\n<p>\u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0627\u0628\u0639 format_response \u0631\u0627 \u067e\u06cc\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f. \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646 \u0641\u0627\u06cc\u0644 chat_completion.py \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>def format_response(response):\r\n# Extract the generated story from the response\r\nstory = response.choices[0].message.content\r\n# Remove any unwanted text or formatting\r\nstory = story.strip()\r\n# Return the formatted story\r\nreturn story<\/code><\/pre>\n<\/div>\n<h5 id=\"%d8%aa%d8%b3%d8%aa-%d9%be%d8%a7%d8%b3%d8%ae-%d9%87%d8%a7%db%8c-%d8%aa%d9%88%d9%84%db%8c%d8%af-%d8%b4%d8%af%d9%87\">\u062a\u0633\u062a \u067e\u0627\u0633\u062e \u0647\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647<\/h5>\n<p>\u0628\u0631\u0627\u06cc \u0622\u0632\u0645\u0627\u06cc\u0634 \u062a\u0648\u0644\u06cc\u062f \u0645\u062a\u0646\u060c chat_completion.py \u0631\u0627 \u0628\u0627 \u0627\u0641\u0632\u0648\u062f\u0646 \u0686\u0646\u062f \u062e\u0637 \u062f\u0631 \u067e\u0627\u06cc\u06cc\u0646 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code># For testing purposes\r\nif __name__ == \"__main__\":\r\nuser_input = \"Tell me a story about a dragon\"\r\nprint(generate_story(user_input))<\/code><\/pre>\n<\/div>\n<p>\u0628\u0631\u0627\u06cc \u0645\u0634\u0627\u0647\u062f\u0647 \u067e\u0627\u0633\u062e \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062e\u0648\u062f\u060c chat_completion.py \u0631\u0627 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(env)sammy@ubuntu:$ python chat_completion.py<\/code><\/pre>\n<\/div>\n<p>\u0628\u0631 \u0627\u0633\u0627\u0633 \u0627\u0639\u0644\u0627\u0646\u060c \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u067e\u0627\u0633\u062e \u062e\u0644\u0627\u0642\u0627\u0646\u0647 \u0627\u0632 GPT-4 \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u0628\u0627 \u0648\u0631\u0648\u062f\u06cc \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0622\u0632\u0645\u0627\u06cc\u0634 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u067e\u0627\u0633\u062e \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u062f.<\/p>\n<p>\u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f \u062a\u0635\u0627\u0648\u06cc\u0631\u06cc \u0631\u0627 \u0628\u0647 \u0627\u0633\u062a\u0648\u0631\u06cc \u0647\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-3-%d8%aa%d9%88%d9%84%db%8c%d8%af-%d8%aa%d8%b5%d8%a7%d9%88%db%8c%d8%b1-%d8%a8%d8%a7-dall-e\">\u0645\u0631\u062d\u0644\u0647 3 &#8211; \u062a\u0648\u0644\u06cc\u062f \u062a\u0635\u0627\u0648\u06cc\u0631 \u0628\u0627 DALL-E<\/h2>\n<p>DALL-E \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u062a\u0635\u0627\u0648\u06cc\u0631 \u062f\u0642\u06cc\u0642 \u0627\u0632 \u067e\u06cc\u0627\u0645\u200c\u0647\u0627\u06cc \u0645\u062a\u0646\u06cc \u0637\u0631\u0627\u062d\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a \u0648 \u0631\u0628\u0627\u062a \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0634\u0645\u0627 \u0631\u0627 \u0642\u0627\u062f\u0631 \u0645\u06cc\u200c\u0633\u0627\u0632\u062f \u062a\u0627 \u062f\u0627\u0633\u062a\u0627\u0646\u200c\u0647\u0627 \u0631\u0627 \u0628\u0627 \u062e\u0644\u0627\u0642\u06cc\u062a \u0628\u0635\u0631\u06cc \u062a\u0642\u0648\u06cc\u062a \u06a9\u0646\u062f.<\/p>\n<p>\u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062c\u062f\u06cc\u062f \u0628\u0627 \u0646\u0627\u0645 image_generation.py \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u062c\u0646\u06af\u0648 \u062e\u0648\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0632 \u0645\u062f\u0644 DALL-E \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u062a\u0635\u0648\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(env)sammy@ubuntu:$ touch image_generation.py<\/code><\/pre>\n<\/div>\n<p>\u0628\u06cc\u0627\u06cc\u06cc\u062f \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u062f\u0631 image_generation.py \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u06cc\u06a9 \u0627\u0639\u0644\u0627\u0646 \u0628\u0647 DALL-E \u0645\u06cc \u0641\u0631\u0633\u062a\u062f \u0648 \u062a\u0635\u0648\u06cc\u0631 \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u0631\u0627 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0645\u06cc \u06a9\u0646\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import os\r\nfrom openai import OpenAI\r\nclient = OpenAI(api_key=os.environ[\"OPENAI_KEY\"])\r\n\r\ndef generate_image(text_prompt):\r\nresponse = client.images.generate(\r\nmodel=\"dall-e-3\",\r\nprompt=text_prompt,\r\nsize=\"1024x1024\",\r\nquality=\"standard\",\r\nn=1,\r\n)\r\nimage_url = response.data[0].url\r\nreturn image_url<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u062a\u0627\u0628\u0639 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc \u0631\u0627 \u0628\u0647 \u0645\u062f\u0644 DALL-E \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u062f\u0633\u062a\u0648\u0631 \u0645\u062a\u0646\u060c \u062a\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u0648\u06cc\u0631 \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 (n=1) \u0648 \u0627\u0646\u062f\u0627\u0632\u0647 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0631\u0627 \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0633\u067e\u0633 URL \u062a\u0635\u0648\u06cc\u0631 \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u0631\u0627 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0648 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f.<\/p>\n<h5 id=\"%d8%aa%d8%b3%d8%aa-%d8%a7%d8%b3%da%a9%d8%b1%db%8c%d9%be%d8%aa\">\u062a\u0633\u062a \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a<\/h5>\n<p>\u0628\u0631\u0627\u06cc \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u062a\u0627\u0628\u0639 \u062f\u0631 \u067e\u0631\u0648\u0698\u0647 \u062c\u0646\u06af\u0648\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u067e\u0627\u06cc\u06cc\u0646 \u0641\u0627\u06cc\u0644 image_generation.py \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code># For testing purposes\r\nif __name__ == \"__main__\":\r\nprompt = \"Generate an image of a pet and a child playing in a yard.\"\r\nprint(generate_image(prompt))<\/code><\/pre>\n<\/div>\n<p>image_generation.py \u0631\u0627 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0631 \u0627\u0633\u0627\u0633 \u062f\u0633\u062a\u0648\u0631 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(env)sammy@ubuntu:$ python image_generation.py<\/code><\/pre>\n<\/div>\n<p>\u0627\u06af\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0627 \u0645\u0648\u0641\u0642\u06cc\u062a \u0627\u062c\u0631\u0627 \u0634\u0648\u062f\u060c URL \u062a\u0635\u0648\u06cc\u0631 \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u0631\u0627 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062e\u0648\u0627\u0647\u06cc\u062f \u062f\u06cc\u062f. \u0633\u067e\u0633 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0635\u0648\u06cc\u0631 \u0631\u0627 \u0628\u0627 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0628\u0647 \u0627\u06cc\u0646 URL \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u0648\u0628 \u062e\u0648\u062f \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f\u06cc\u060c \u062a\u0634\u062e\u06cc\u0635 \u06af\u0641\u062a\u0627\u0631 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u062a\u0648\u0644\u06cc\u062f \u0645\u062a\u0646 \u0648 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0648\u0631\u062f.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-4-%d8%aa%d8%b1%da%a9%db%8c%d8%a8-%d8%b1%d9%88%d8%b4-%d9%87%d8%a7-%d8%a8%d8%b1%d8%a7%db%8c-%db%8c%da%a9-%d8%aa%d8%ac%d8%b1%d8%a8%d9%87-%db%8c%da%a9%d9%be%d8%a7\">\u0645\u0631\u062d\u0644\u0647 4 &#8211; \u062a\u0631\u06a9\u06cc\u0628 \u0631\u0648\u0634 \u0647\u0627 \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u062a\u062c\u0631\u0628\u0647 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647<\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0631\u062d\u0644\u0647\u060c \u0642\u0627\u0628\u0644\u06cc\u062a\u200c\u0647\u0627\u06cc \u062a\u0648\u0633\u0639\u0647\u200c\u06cc\u0627\u0641\u062a\u0647 \u062f\u0631 \u0645\u0631\u0627\u062d\u0644 \u0642\u0628\u0644\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u0631\u0627\u0626\u0647 \u06cc\u06a9 \u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f.<\/p>\n<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0634\u0645\u0627 \u0642\u0627\u062f\u0631 \u0628\u0647 \u067e\u0631\u062f\u0627\u0632\u0634 \u0645\u062a\u0646 \u0648 \u0648\u0631\u0648\u062f\u06cc \u0635\u0648\u062a\u06cc \u06a9\u0627\u0631\u0628\u0631\u0627\u0646\u060c \u062a\u0648\u0644\u06cc\u062f \u062f\u0627\u0633\u062a\u0627\u0646 \u0648 \u062a\u06a9\u0645\u06cc\u0644 \u0622\u0646\u0647\u0627 \u0628\u0627 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0645\u0631\u062a\u0628\u0637 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f.<\/p>\n<h5 id=\"%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%d9%86%d9%85%d8%a7%db%8c-%db%8c%da%a9%d9%be%d8%a7%d8%b1%da%86%d9%87\">\u0627\u06cc\u062c\u0627\u062f \u0646\u0645\u0627\u06cc \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647<\/h5>\n<p>\u0627\u0628\u062a\u062f\u0627\u060c \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u067e\u0631\u0648\u0698\u0647 \u062c\u0646\u06af\u0648 \u0634\u0645\u0627 \u0633\u0627\u0632\u0645\u0627\u0646\u062f\u0647\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a \u0648 whisper_transcribe.py\u060c chat_completion.py\u060c \u0648 image_generation.py \u0631\u0627 \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u0628\u0631\u0646\u0627\u0645\u0647 \u062c\u0646\u06af\u0648 \u062f\u0627\u0631\u06cc\u062f. \u0627\u06a9\u0646\u0648\u0646 \u06cc\u06a9 \u0646\u0645\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u0627\u062c\u0632\u0627 \u0631\u0627 \u062a\u0631\u06a9\u06cc\u0628 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p>\u0641\u0627\u06cc\u0644 views.py \u062e\u0648\u062f \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u0645\u0627\u0698\u0648\u0644 \u0647\u0627 \u0648 \u062a\u0648\u0627\u0628\u0639 \u0644\u0627\u0632\u0645 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f. \u0633\u067e\u0633 \u06cc\u06a9 \u0646\u0645\u0627\u06cc \u062c\u062f\u06cc\u062f \u0628\u0647 \u0646\u0627\u0645 get_story_from_description \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import uuid\r\nfrom django.core.files.storage import FileSystemStorage\r\nfrom django.shortcuts import render\r\nfrom .whisper_transcribe import transcribe_audio\r\nfrom .chat_completion import generate_story\r\nfrom .image_generation import generate_image\r\n\r\n# other views\r\n\r\ndef get_story_from_description(request):\r\ncontext = {}\r\nuser_input = \"\"\r\nif request.method == \"GET\":\r\nreturn render(request, \"story_template.html\")\r\nelse:\r\nif \"text_input\" in request.POST:\r\nuser_input += request.POST.get(\"text_input\") + \"\\n\"\r\nif \"voice_input\" in request.FILES:\r\naudio_file = request.FILES[\"voice_input\"]\r\nfile_name = str(uuid.uuid4()) + (audio_file.name or \"\")\r\nFileSystemStorage(location=\"\/tmp\").save(file_name, audio_file)\r\nuser_input += transcribe_audio(f\"\/tmp\/{file_name}\")\r\n\r\ngenerated_story = generate_story(user_input)\r\nimage_prompt = (\r\nf\"Generate an image that visually illustrates the essence of the following story: {generated_story}\"\r\n)\r\nimage_url = generate_image(image_prompt)\r\n\r\ncontext = {\r\n\"user_input\": user_input,\r\n\"generated_story\": generated_story.replace(\"\\n\", \"&lt;br\/&gt;\"),\r\n\"image_url\": image_url,\r\n}\r\n\r\nreturn render(request, \"story_template.html\", context)<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u0646\u0645\u0627 \u0645\u062a\u0646 \u0648\/\u06cc\u0627 \u0648\u0631\u0648\u062f\u06cc \u0635\u0648\u062a\u06cc \u0631\u0627 \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0645\u06cc \u06a9\u0646\u062f. \u0627\u06af\u0631 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f\u060c \u0622\u0646 \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u0646\u0627\u0645 \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f (\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 uuid) \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0627\u0632 \u062a\u0627\u0628\u0639 transcribe_audio \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u06af\u0641\u062a\u0627\u0631 \u0628\u0647 \u0645\u062a\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f. \u0633\u067e\u0633 \u0627\u0632 \u062a\u0627\u0628\u0639gene_story \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u06cc\u06a9 \u067e\u0627\u0633\u062e \u0645\u062a\u0646\u06cc \u0648 \u062a\u0627\u0628\u0639gene_image \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0645\u0631\u062a\u0628\u0637 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f. \u0627\u06cc\u0646 \u062e\u0631\u0648\u062c\u06cc \u0647\u0627 \u0628\u0647 \u0641\u0631\u0647\u0646\u06af \u0644\u063a\u062a \u0645\u062a\u0646 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u0634\u0648\u0646\u062f\u060c \u0633\u067e\u0633 \u0628\u0627 story_template.html \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f.<\/p>\n<h5 id=\"%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%d8%a7%d9%84%da%af%d9%88\">\u0627\u06cc\u062c\u0627\u062f \u0627\u0644\u06af\u0648<\/h5>\n<p>\u0633\u067e\u0633 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0628\u0647 \u0646\u0627\u0645 story_template.html \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f \u0648 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;div style=\"padding:3em; font-size:14pt;\"&gt;\r\n&lt;form method=\"post\" enctype=\"multipart\/form-data\"&gt;\r\n{% csrf_token %}\r\n&lt;textarea name=\"text_input\" placeholder=\" Describe the story you would like\" style=\"width:30em;\"&gt;&lt;\/textarea&gt;\r\n&lt;br\/&gt;&lt;br\/&gt;\r\n&lt;input type=\"file\" name=\"voice_input\" accept=\"audio\/*\" style=\"width:30em;\"&gt;\r\n&lt;br\/&gt;&lt;br\/&gt;\r\n&lt;input type=\"submit\" value=\"Submit\" style=\"width:8em; height:3em;\"&gt;\r\n&lt;\/form&gt;\r\n\r\n&lt;p&gt;\r\n&lt;strong&gt;{{ user_input }}&lt;\/strong&gt;\r\n&lt;\/p&gt;\r\n{% if image_url %}\r\n&lt;p&gt;\r\n&lt;img src=\"{{ image_url }}\" alt=\"Generated Image\" style=\"max-width:80vw; width:30em; height:30em;\"&gt;\r\n&lt;\/p&gt;\r\n{% endif %}\r\n{% if generated_story %}\r\n&lt;p&gt;{{ generated_story | safe }}&lt;\/p&gt;\r\n{% endif %}\r\n&lt;\/div&gt;<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u0641\u0631\u0645 \u0633\u0627\u062f\u0647 \u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0645\u062a\u0646 \u06cc\u0627 \u0628\u0627 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u0646\u062f. \u0633\u067e\u0633 \u0645\u062a\u0646 \u0648 \u062a\u0635\u0648\u06cc\u0631 \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc \u062f\u0647\u062f.<\/p>\n<h5 id=\"%d8%a7%db%8c%d8%ac%d8%a7%d8%af-url-%d8%a8%d8%b1%d8%a7%db%8c-view\">\u0627\u06cc\u062c\u0627\u062f URL \u0628\u0631\u0627\u06cc View<\/h5>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u06a9\u0647 \u0646\u0645\u0627\u06cc get_story_from_description \u0631\u0627 \u0622\u0645\u0627\u062f\u0647 \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f\u060c \u0628\u0627\u06cc\u062f \u0628\u0627 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc URL\u060c \u0622\u0646 \u0631\u0627 \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<p>\u0641\u0627\u06cc\u0644 urls.py \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u062c\u0646\u06af\u0648 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u06cc\u06a9 \u0627\u0644\u06af\u0648 \u0628\u0631\u0627\u06cc \u0646\u0645\u0627\u06cc get_story_from_description \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>from django.urls import path\r\nfrom . import views\r\n\r\nurlpatterns = [\r\n# other patterns\r\npath('generate-story\/', views.get_story_from_description, name='get_story_from_description'),\r\n]<\/code><\/pre>\n<\/div>\n<h5 id=\"%d8%a2%d8%b2%d9%85%d8%a7%db%8c%d8%b4-%d8%aa%d8%ac%d8%b1%d8%a8%d9%87-%db%8c%da%a9%d9%be%d8%a7%d8%b1%da%86%d9%87\">\u0622\u0632\u0645\u0627\u06cc\u0634 \u062a\u062c\u0631\u0628\u0647 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647<\/h5>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 http:\/\/your_domain\/generate-story\/ \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u0648\u0628 \u062e\u0648\u062f \u0628\u0627\u0632\u062f\u06cc\u062f \u06a9\u0646\u06cc\u062f. \u0628\u0627\u06cc\u062f \u0641\u0631\u0645 \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u062f\u0631 story_template.html \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u062f. \u0633\u0639\u06cc \u06a9\u0646\u06cc\u062f \u06cc\u06a9 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0645\u062a\u0646\u06cc \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0642\u0633\u0645\u062a \u0648\u0631\u0648\u062f\u06cc \u0645\u062a\u0646 \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0648\u0631\u0648\u062f\u06cc \u0641\u0627\u06cc\u0644 \u0622\u067e\u0644\u0648\u062f \u06a9\u0646\u06cc\u062f. \u067e\u0633 \u0627\u0632 \u0627\u0631\u0633\u0627\u0644\u060c \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0634\u0645\u0627 \u0648\u0631\u0648\u062f\u06cc(\u0647\u0627\u06cc) \u0631\u0627 \u067e\u0631\u062f\u0627\u0632\u0634 \u0645\u06cc \u06a9\u0646\u062f\u060c \u06cc\u06a9 \u062f\u0627\u0633\u062a\u0627\u0646 \u0648 \u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0647\u0645\u0631\u0627\u0647 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0622\u0646\u0647\u0627 \u0631\u0627 \u062f\u0631 \u0635\u0641\u062d\u0647 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc \u062f\u0647\u062f.<\/p>\n<p>\u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644\u060c \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u06cc\u06a9 \u062f\u0627\u0633\u062a\u0627\u0646 \u0646\u0645\u0648\u0646\u0647 \u0628\u0631\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f: &#8220;\u0628\u0647 \u0645\u0646 \u062f\u0627\u0633\u062a\u0627\u0646\u06cc \u062f\u0631 \u0645\u0648\u0631\u062f \u06cc\u06a9 \u062d\u06cc\u0648\u0627\u0646 \u062e\u0627\u0646\u06af\u06cc \u0648 \u06cc\u06a9 \u06a9\u0648\u062f\u06a9 \u062f\u0631 \u062d\u0627\u0644 \u0628\u0627\u0632\u06cc \u062f\u0631 \u062d\u06cc\u0627\u0637 \u0628\u06af\u0648.&#8221;<\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  width=\"1827\"  height=\"889\"  class=\"aligncenter wp-image-15465 size-full pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 1827px) 100vw, 1827px\"  data-pk-src=\"https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4.png\"  data-pk-srcset=\"https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4.png 1827w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-300x146.png 300w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-1024x498.png 1024w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-768x374.png 768w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-1536x747.png 1536w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-110x54.png 110w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-200x97.png 200w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-380x185.png 380w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-255x124.png 255w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-550x268.png 550w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-800x389.png 800w, https:\/\/cdn.itpiran.net\/2024\/04\/29212431\/Generated-Story-From-Dall-E-and-GPT-4-1160x564.png 1160w\" ><\/p>\n<p>\u0628\u0627 \u062a\u06a9\u0645\u06cc\u0644 \u0627\u06cc\u0646 \u0645\u0631\u062d\u0644\u0647\u060c \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u062f \u06a9\u0647 \u0648\u0631\u0648\u062f\u06cc\u200c\u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u0628\u0647 \u0627\u0634\u06a9\u0627\u0644 \u0645\u062e\u062a\u0644\u0641 \u067e\u0631\u062f\u0627\u0632\u0634 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0628\u0647 \u0622\u0646\u200c\u0647\u0627 \u067e\u0627\u0633\u062e \u0645\u06cc\u200c\u062f\u0647\u062f.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">\u0646\u062a\u06cc\u062c\u0647<\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0634\u0645\u0627 \u0628\u0627 \u0645\u0648\u0641\u0642\u06cc\u062a \u06cc\u06a9 \u0631\u0628\u0627\u062a \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062c\u0646\u06af\u0648\u060c \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06cc \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0633\u0627\u0632\u06cc Whisper \u0628\u0631\u0627\u06cc \u062a\u0634\u062e\u06cc\u0635 \u06af\u0641\u062a\u0627\u0631\u060c GPT-4 \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u0645\u062a\u0646 \u0648 DALL-E \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u062a\u0635\u0648\u06cc\u0631\u060c \u062a\u0648\u0633\u0639\u0647 \u062f\u0627\u062f\u0647 \u0627\u06cc\u062f. \u0628\u0631\u0646\u0627\u0645\u0647 \u0634\u0645\u0627 \u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0648\u0631\u0648\u062f\u06cc \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u062f\u0631 \u0642\u0627\u0644\u0628 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u062f\u0631\u06a9 \u06a9\u0646\u062f \u0648 \u0628\u0647 \u0622\u0646 \u0648\u0627\u06a9\u0646\u0634 \u0646\u0634\u0627\u0646 \u062f\u0647\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u062a\u0648\u0633\u0639\u0647 \u0628\u06cc\u0634\u062a\u0631\u060c \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u0646\u0633\u062e\u0647\u200c\u0647\u0627\u06cc \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0645\u062f\u0644\u200c\u0647\u0627\u06cc Whisper\u060c GPT \u0648 DALL-E \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0637\u0631\u0627\u062d\u06cc UI\/UX \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u062a\u0627\u0646 \u0631\u0627 \u0628\u0647\u0628\u0648\u062f \u0628\u0628\u062e\u0634\u06cc\u062f\u060c \u06cc\u0627 \u0639\u0645\u0644\u06a9\u0631\u062f \u0631\u0628\u0627\u062a \u0631\u0627 \u0628\u0631\u0627\u06cc \u06af\u0646\u062c\u0627\u0646\u062f\u0646 \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627\u06cc \u062a\u0639\u0627\u0645\u0644\u06cc \u0627\u0636\u0627\u0641\u06cc \u06af\u0633\u062a\u0631\u0634 \u062f\u0647\u06cc\u062f.<\/p>\n","protected":false},"excerpt":{"rendered":"Introduction Modern web applications can be taken to the next level by integrating artificial intelligence\u2026","protected":false},"author":1,"featured_media":15466,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,363],"tags":[425,376],"class_list":{"0":"post-15464","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-programming","9":"tag-bot","10":"tag-python"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E - \u0628\u0644\u0627\u06af ITPiran<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648\u0628 \u0645\u062f\u0631\u0646 \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0627 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0633\u0627\u0632\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0628\u0647 \u0633\u0637\u062d \u0628\u0639\u062f\u06cc \u0627\u0631\u062a\u0642\u0627&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-29T18:40:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/04\/29220909\/bot.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E\",\"datePublished\":\"2024-04-29T18:40:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/\"},\"wordCount\":168,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/29220909\\\/bot.jpg\",\"keywords\":[\"bot\",\"Python\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/\",\"name\":\"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/29220909\\\/bot.jpg\",\"datePublished\":\"2024-04-29T18:40:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/29220909\\\/bot.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/29220909\\\/bot.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/en\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Developing Multi-Faceted Bots with Django, GPT-4, Whisper, and DALL-E - ITPiran Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/","og_locale":"en_US","og_type":"article","og_title":"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648\u0628 \u0645\u062f\u0631\u0646 \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0627 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0633\u0627\u0632\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0628\u0647 \u0633\u0637\u062d \u0628\u0639\u062f\u06cc \u0627\u0631\u062a\u0642\u0627&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-04-29T18:40:19+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/04\/29220909\/bot.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E","datePublished":"2024-04-29T18:40:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/"},"wordCount":168,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/29220909\/bot.jpg","keywords":["bot","Python"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/","name":"Developing Multi-Faceted Bots with Django, GPT-4, Whisper, and DALL-E - ITPiran Blog","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/29220909\/bot.jpg","datePublished":"2024-04-29T18:40:19+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/04\/29220909\/bot.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/29220909\/bot.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/developing-multi-modal-bots-with-django-gpt-4-whisper-and-dall-e\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u062a\u0648\u0633\u0639\u0647 \u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0686\u0646\u062f \u0648\u062c\u0647\u06cc \u0628\u0627 Django\u060c GPT-4\u060c Whisper \u0648 DALL-E"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"ITPiran Blog","description":"Iranian Sustainable Trade News and Articles","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"Sustainable Iranian Business Blog","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"admin","url":"https:\/\/www.itpiran.net\/blog\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/comments?post=15464"}],"version-history":[{"count":1,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15464\/revisions"}],"predecessor-version":[{"id":15467,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15464\/revisions\/15467"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media\/15466"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media?parent=15464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/categories?post=15464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/tags?post=15464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}