Sanbox for chatting about data loaded with document loader using FAISS local vectorstore. Query PDF in this example.
- install dependencies
pip3 install -r requirements.txt
- create .env file with api key of supported llm
MISTRAL_API_KEY=mistral_api_key
;or other llm key:
;OPENAI_API_KEY=open_api_key
- select llm in
main.py
from langchain_mistralai import ChatMistralAI
# for OpenAI:
# from langchain.chat_models import ChatOpenAI
- check
main.py
for promt and setup. Default presetup isGive me the gist of AI in 3 sentences
aboutWhat_Is_AI.pdf
python3 main.py
Artificial Intelligence (AI) is the study of intelligent agents that receive percepts from the environment and take actions based on them, implemented by functions that map percepts to actions. AI can be represented in various ways, such as production systems, reactive agents, logical planners, neural networks, and decision-theoretic systems. Current AI works best in constrained environments and has trouble with open worlds, poorly defined problems, and abstractions, but it continues to improve through the development of subfields like machine learning.