AutClothingChatbot
1.0.0
このリポジトリには、衣料品店の衣料品アドバイザーおよびウェブサイトガイドとして機能するように開発されたチャットボットのソースコードが含まれています。チャットボットは、より高速な推論のためにUNSLOTHフレームワークによってロードされた微調整された大型言語モデル(LLM)を使用して構築され、多くのテキストファイルに保存されているナレッジベースから情報を取得するための検索拡張生成(RAG)メソッドをレバレッジします。
チャットボットを展開するには、次の手順に従ってください。
git clone https://github.com/QuangNguyen2910/AutClothingChatbot.gitrequirements.txtにリストされている必要な依存関係をインストールします。このコマンドでは、colabカーネルを使用して、autclothingchatbotフォルダーに移動します。
cd AutClothingChatbot
pip install -r requirements.txtモデル化するドキュメントをアップロードしてくださいdocs
メインスクリプトを実行してチャットボットを起動します。
パーサーの実行に何を置くべきかわからない場合:
python main.py --help結果は次のようになります:
usage: parser.py [-h] -mn MNAME [-l4 LOAD4BIT] [-hf HFTOKEN] [-ng NGROKTOKEN] [-ms MAXSEQ] [-dt DTYPE] [-emn EMNAME] [-d DISPLAY]
Config for using LLMs.
optional arguments:
-h, --help show this help message and exit
-mn MNAME, --mname MNAME
The path or name from hugging face of the model, example: "Quangnguyen711/clothes_shop_chatbot_QLoRA".
-l4 LOAD4BIT, --load4bit LOAD4BIT
Whether to load in the model 4-bit or not, example: "True"/"False".
-hf HFTOKEN, --hftoken HFTOKEN
Hugging face token to use for authentication, example: "hf_xxx".
-ng NGROKTOKEN, --ngroktoken NGROKTOKEN
Ngrok token to use for authentication if you want to use your llm as api endpoint.
-ms MAXSEQ, --maxseq MAXSEQ
Maximum sequence length for the input, example: "2048".
-dt DTYPE, --dtype DTYPE
Data type for model weights, example: "None".
-emn EMNAME, --emname EMNAME
The path or name from hugging face of the model use to embedd data, example: "thenlper/gte-small".
-d DISPLAY, --display DISPLAY
Where to display the model, example: "kernel"/"api"/"deploy".
コマンドの例:
python main.py -mn " Quangnguyen711/clothes_shop_chatbot_QLoRA "
-l4 " True " -hf " hf_xxx " -ng " xxx " -ms " 2048 " -dt " None "
-emn " thenlper/gte-small " -d " deploy "注:一部のモデルには、読み取られるためにHuggingfaceからの認証トークンが必要です。
これは、このコマンドの実行が終了した後に得られるインターフェイスになります。このノートブックを使用して、指示を確認できます
チャットボットが実行されると、ユーザーはクエリまたはリクエストをチャットインターフェイスに入力することで対話できます。チャットボットは、知識ベースに保存されている情報に基づいて応答を提供します。
このプロジェクトは、MITライセンスに基づいてライセンスされています。詳細については、ライセンスファイルを参照してください。
お問い合わせやサポートについては、Quang Nguyenにお問い合わせください。