Dieses Repository zeigt, wie Chatbots mit unterschiedlichen Speicherfunktionen mit Langchain, Tinecone und Stromversorgung erstellt werden. Das Projekt zeigt die Entwicklung von einem staatenlosen Chatbot bis zu einem mit dauerhaftem Speicherspeicher.
Stellen Sie vor Beginn sicher, dass Sie:
git clone https://github.com/spandan114/building-intelligent-chatbots.git
cd building-intelligent-chatbotsUnter Windows:
# Create virtual environment
python -m venv chatbotenv
# Activate virtual environment
chatbotenv S cripts a ctivateAuf macOS/Linux:
# Create virtual environment
python -m venv chatbotenv
# Activate virtual environment
source chatbotenv/bin/activatepip install -r requirements.txt Erstellen Sie eine .env -Datei im Projektroot:
PINECONE_API_KEY = your_pinecone_api_key_here
OPENAI_API_KEY = your_openai_api_key_here
GROQ_API_KEY = your_groq_api_key_herestreamlit run app.py Die Anwendung ist unter http://localhost:8501 erhältlich
deactivate building-intelligent-chatbots/
├── bot_with_pinecone_memory.py # Main application with Pinecone
├── bot_without_memory.py # Basic bot implementation
├── bot_with_temporary_memory.py # Bot with session state memory
├── requirements.txt # Project dependencies
├── .env # Environment variables (create this)
└── README.md # This file
Basic Bot ( bot_without_memory.py ):
streamlit run bot_without_memory.py Temporärer Speicherbot ( bot_with_temporary_memory.py ):
streamlit run bot_with_temporary_memory.py Permanent Memory Bot ( bot_with_pinecone_memory.py ):
streamlit run bot_with_pinecone_memory.py langchain
langchain-groq
langchain-pinecone
langchain-huggingface
langchain-postgres
langchain-community
langchain-core
streamlit
python-dotenv
pinecone-client
psycopg2-binary
sentence-transformers
openai
tiktoken
ModulenotFoundError :
pip install -r requirements.txtAPI -Schlüsselfehler :
.env -Datei existiert und enthält gültige API -SchlüsselTitzenfehler :
Wenn Sie dieses Projekt hilfreich fanden, sollten Sie ihm einen Stern geben! Es hilft anderen, das Projekt zu entdecken und motiviert uns, mehr Inhalte zu erstellen.
Für Fragen und Feedback eröffnen Sie bitte ein Problem im Github -Repository.
Happy Coding!