A library to ask questions to JSON data and get Python code in response.
Project description
AskJSON
As the name suggests, AskJSON
helps you fetch answers or data from your json using natural language. It uses OpenAI API.
How to Use AskJSON:
-
Install the package using pip:
pip install AskJSON
-
Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your_api_key_here'
-
In your Python script, import
ask_json
and call it with your JSON and query:from askjson import ask_json my_json_data = {...} # Your JSON data here my_query = "How many items are in the list?" result_code = ask_json(my_json_data, my_query) print(result_code)
Todo:
- have support for codellama
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
AskJSON-0.1.2.tar.gz
(13.5 kB
view details)
Built Distribution
File details
Details for the file AskJSON-0.1.2.tar.gz
.
File metadata
- Download URL: AskJSON-0.1.2.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95f2e61460b457c4099b741fcb3150cb44df2d8d26a3321dbeb0b9b932e7464e |
|
MD5 | b43a7dc7d20bc3e8636e932036948ff0 |
|
BLAKE2b-256 | d1a165913dc135170cb94d60b74148a2dd59c3b7809fc41cf69364fe0fa368b5 |
File details
Details for the file AskJSON-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: AskJSON-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1763dd7aa59b82ed53df0852db2e4c7dcc141051d12724fe192dd78b27ea618e |
|
MD5 | 44d9dc68984c09b3d9e8c461156211e7 |
|
BLAKE2b-256 | 92bac8fd1a0005f6b6f6f83cde5064aa2ebe2b5108657cb2058c0feec7f387b9 |