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-7.0.0.tar.gz
(1.6 MB
view details)
Built Distribution
pqapi-7.0.0-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file pqapi-7.0.0.tar.gz
.
File metadata
- Download URL: pqapi-7.0.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d59d7102320eab4b106f4e900788c4d717a6092b56577ca96498d624a397b506 |
|
MD5 | 8d3943bfc708e074e0b537539771a5c9 |
|
BLAKE2b-256 | d01f161a54cb03d866734abc732ed557f34c2cfa9746900e37656d5bf26e894d |
File details
Details for the file pqapi-7.0.0-py3-none-any.whl
.
File metadata
- Download URL: pqapi-7.0.0-py3-none-any.whl
- Upload date:
- Size: 12.0 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 | 8750bf8f1e323004af1d5d20a188cd9505b37b5174fbe4fe6cfbc4b2c73af480 |
|
MD5 | d7446edf8774993b964ac85391beab10 |
|
BLAKE2b-256 | a395bfa2efe82d66f359e4efa7b697d110ac5ad8e1393f34818f1e555ec551e4 |