API for interacting with paperqa.app
Project description
paperqa-api
Python client for interacting with paperqa app
Usage
Make sure to set the environment variable PQA_API_KEY
to your API token.
export PQA_API_TOKEN=pqa-...
To query agent:
import pqapi
response = pqapi.agent_query(
"Are COVID-19 vaccines effective?"
)
you can do it with async too:
import pqapi
response = await async_agent_query(query, "default")
The response object contains information about the sources, cost, and other details. To get just the answer:
print(response.answer)
Development
If developing, you can change the server URL endpoint to a local PQA server with
export PQA_URL="http://localhost:8080"
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-6.8.1.tar.gz
(1.5 MB
view details)
Built Distribution
pqapi-6.8.1-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file pqapi-6.8.1.tar.gz
.
File metadata
- Download URL: pqapi-6.8.1.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3960befbae7f59dffee4e6922f34b5d60f883e17ae39b6c6257f59d2040906a2 |
|
MD5 | 5bc748c25d4a46814a9a3d794f0c0468 |
|
BLAKE2b-256 | 340c9e959bbe5134d40a780cf9c2359c52b72dfea5c9861b5648a7a5bdf902e9 |
File details
Details for the file pqapi-6.8.1-py3-none-any.whl
.
File metadata
- Download URL: pqapi-6.8.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19623bf8c19e92e34d4636e5656bec64a291cb60cea304c4e8c2e2e0b09b4d2f |
|
MD5 | 448173caa4990b2e5c4859f9a1fb042c |
|
BLAKE2b-256 | 83a981f9fb08f1ed707aa2a49e69d321055e53695d56e6f7a751305e45f090c5 |