๐ฌChat on PDF
Python Implementation
from genai_stack.model import OpenAIGpt35Model
model = OpenAIGpt35Model.from_kwargs(
fields={"openai_api_key": "Paste your Open AI key"}
)
model.add_source("pdf", "valid_pdf_path_or_url")
model.predict("<Any question on top of the pdf>")CLI Implementation
{
"etl": "langchain",
"source": {
"name": "PyPDFLoader",
"fields": {
"file_path": "/your/pdf/path"
}
},
"vectordb": {
"name": "chromadb",
"class_name": "genai_stack"
}
}Last updated