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에 문의하십시오.