gpt j chatbot
1.0.0
الهدف من هذا القالب هو أن يكون بمثابة دليل تمهيدي سريع لزملائه المطورين الذين يتطلعون إلى إنشاء شخصيات مخصصة مدعومة بالذكاء الاصطناعي
جيني هي صديقة افتراضية مدعومة بـ GPT-J تعتمد على هذا المستودع
git clone [email protected]:machaao/gpt-j-chatbot.git
cd gpt-j-chatbot
pip install -r requirements.txt
nano -w .env
API_TOKEN = <Machaao API Token>
BASE_URL = <Machaao Base Url> ex: https://ganglia.machaao.com
NAME = <Your Bot Display Name> ex: Jess
DASHBOT_KEY = <Your dashbot token> (Optional) (Conversational Analytics)
MODEL_NAME=EleutherAI/gpt-neo-1.3B # for local inference / testing [we recommend using GPT-NEO 1.3B for 16GB ram - load can take up to 1 min and inference avg is about 10 - 20 seconds] See https://huggingface.co/EleutherAI for additional models
NLP_CLOUD_TOKEN = <NLP Cloud Token> # for faster remote inference
# BOT PARAMS - Unset Parameters would use their default values.
# Don't use Top_p and Temperature parameters simultaneously.
# Default Values are mentioned below.
# The higher this value, the less deterministic the result will be
TOP_P="1.0"
# The higher this value, the less deterministic the result will be
TEMPERATURE="0.8"
# The lower this value, the less likely GPT-J is going to generate off-topic text
TOP_K="50"
# The maximum number of tokens that the generated text should contain
MAX_LENGTH="50"
لفهم أفضل لمعلمات GPT-J المذكورة أعلاه، راجع مستندات nlpcloud.io
.env
ضمن الإدخال API_TOKEN
.env
ضمن الإدخال NLP_CLOUD_TOKEN
.env
ضمن الإدخال DASHBOT_KEY
bot_name is a very understanding girl
bot_name and stranger are seeing each other
Here is a recent discussion between stranger and bot_name
###
stranger: hi
bot_name: hello there
def core(self, req: str, user_id: str):
python app.py
ngrok http 5000
قم بتحديث عنوان URL لـ Webhook الخاص ببرنامج bot الخاص بك على MessengerX.io Portal باستخدام عنوان url المقدم كما هو موضح أدناه لمواصلة التطوير
If you use [Ngrok.io](https://ngrok.io), your webhook URL would be of the format as in the example below
https://1234-115-187-40-104.ngrok.io/machaao/hook
تفضل بزيارة: https://messengerx.io/<bot-name>
نحن نفترض أن لديك حق الوصول إلى حساب Heroku وقمت بتثبيت عميل سطر أوامر Heroku لنظام التشغيل الخاص بك.
heroku login
heroku create
git commit -m ".env updated"
git push heroku master
heroku logs --tail
قم بتحديث عنوان URL لـ Webhook لروبوتك على MessengerX.io Portal باستخدام عنوان url لتطبيق Heroku
Webhook Url: <YOUR-HEROKU-APP-URL>/machaao/hook
تفضل بزيارة: https://messengerx.io/<your-character-name>
Tips for MPS on Mac [Use Nightly Build]
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu