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.2.tar.gz
(1.5 MB
view details)
Built Distribution
pqapi-6.8.2-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file pqapi-6.8.2.tar.gz
.
File metadata
- Download URL: pqapi-6.8.2.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 | bdaf88ef7023e3e249fe85d02f43ea075ed91d9cf549644acf51122e01e569e4 |
|
MD5 | 9ac297baa0450749ee880fadcf6893a7 |
|
BLAKE2b-256 | 448d9716c969c8945e7288c19c2efe4377e74e9052c9822cdd67ee777d3a5680 |
File details
Details for the file pqapi-6.8.2-py3-none-any.whl
.
File metadata
- Download URL: pqapi-6.8.2-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 | d6e0a4f823de1d369b0838e572e416d225eba7bc7d506ce3b75cccec5555af58 |
|
MD5 | a66b549747a4dbb7cf12d11eeaf51485 |
|
BLAKE2b-256 | 0caebdb352fb489daea57a20db3401845bd33309d9a5ae66a1ccc67006f83c1e |