API for interacting with paperqa.app
Project description
peperqa-api
Python UI for interacting with paperqa app
Usage
Make sure to set the environment variable PAPERQA_API_TOKEN
to your API token.
export PAPERQA_API_TOKEN=pqa-...
To upload files:
import pqapi
files = [open("paper.pdf", "rb"), open("paper2.pdf", "rb")]
metadatas = [
pqapi.UploadMetadata(filename="paper.pdf", citation="Test Citation"),
pqapi.UploadMetadata(filename="paper2.pdf", citation="Test Citation 2"),
]
response = pqapi.upload_files(
"default",
files
metadatas
)
To query agent:
import pqapi
response = pqapi.query_agent(
"default",
"Are COVID-19 vaccines effective?"
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pqapi-0.0.1.tar.gz
(4.1 kB
view hashes)
Built Distribution
pqapi-0.0.1-py3-none-any.whl
(4.5 kB
view hashes)