Skip to main content

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:

  1. Install the package using pip:

    pip install AskJSON
    
  2. Set your OpenAI API key as an environment variable:

    export OPENAI_API_KEY='your_api_key_here'
    
  3. 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


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 hashes)

Uploaded Source

Built Distribution

AskJSON-0.1.2-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page