Metadata-Version: 2.5
Name: llama-index-tools-deepinquiry
Version: 0.1.0
Summary: LlamaIndex tool spec for the DeepInquiry verified-facts API: cited, tier-scored, signed facts.
Project-URL: Homepage, https://www.deepinquiry.ai
Project-URL: Documentation, https://www.deepinquiry.ai/docs
Project-URL: API reference, https://www.deepinquiry.ai/openapi.json
Author-email: Bryan Rush <api@deepinquiry.ai>
License: MIT
License-File: LICENSE
Keywords: agent,citations,deepinquiry,facts,llama-index,llamaindex,tools,verification
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: llama-index-core>=0.10.0
Requires-Dist: requests>=2.31
Description-Content-Type: text/markdown

# llama-index-tools-deepinquiry

LlamaIndex tool spec for [DeepInquiry](https://www.deepinquiry.ai): a library of short factual claims, each
returned with its sources, a verification tier (gold, silver, bronze), a source-difference score and a signed
[CiteSig](https://citesig.org) attestation.

## Install

```bash
pip install llama-index-tools-deepinquiry
```

Get a free API key (500 requests a month, no card) at https://www.deepinquiry.ai/signup and set it:

```bash
export DEEPINQUIRY_API_KEY="di_live_..."
```

## Use

```python
from llama_index.tools.deepinquiry import DeepInquiryToolSpec

spec = DeepInquiryToolSpec()          # reads DEEPINQUIRY_API_KEY
tools = spec.to_tool_list()           # search_facts, get_fact, random_fact, search_documents

print(spec.search_facts("how many hearts does an octopus have", limit=2))
```

Give `tools` to any LlamaIndex agent. `search_facts`, `get_fact` and `random_fact` return plain text with the
sources and a link to cite. `search_documents` returns LlamaIndex `Document` objects, so facts can be indexed
or used in a retrieval step.

## Try the API first

There is a live, keyless demo on https://www.deepinquiry.ai/api that shows the exact response.

## Terms

The code in this package is MIT licensed. Facts returned by the API have their own terms: the free tier
requires attribution to DeepInquiry (the links in each result serve for that) and paid plans allow commercial
use. See https://www.deepinquiry.ai/terms and https://www.deepinquiry.ai/data-license.

Published by Machine Accountability Corporation.
