OpenAI linked with custom data provided in the /data folder and REST API for questions
Installation:
pip install langchain openai chromadb tiktoken unstructured
POST: http://127.0.0.1:8000/question
Custom Data:
I was born in Italy on May 1996
I have two sisters and one brother
Question:
{
"text": "Where was i born?"
}
Answer:
{
"text": "I was born in Italy."
}
Question:
{
"text": "How much sisters do i have?"
}
Answer:
{
"text": "Based on the given information, you have two sisters."
}
Question:
{
"text": "Who is Obama?"
}
Answer:
{
"text": "Barack Obama is an American politician who served as the 44th President of the United States from 2009 to 2017. He is not related to the context given."
}