Skip to main content

Interactive workflows for generating AI intelligence reports from real-world data sources using GPT models

Project description

Developing

Requirements

  • Python 3.11 or 3.12 (Download)

  • uv (Download)

  • wkhtmltopdf (used to generate PDF reports)

    • Windows: (Download)

    • Linux: sudo apt-get install wkhtmltopdf

    • macOS:

    curl -L https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-2/wkhtmltox-0.12.6-2.macos-cocoa.pkg -O
    
    installer -pkg wkhtmltox-0.12.6-2.macos-cocoa.pkg -target ~
    

Running the app

GPT settings

You can configure your OpenAI access when running the app via Settings page, or using environment variables.

Default values:

OPENAI_API_MODEL="gpt-4.1-mini"
OPENAI_TYPE="OpenAI" ## Other option available: Azure OpenAI
AZURE_AUTH_TYPE="Azure Key" # if OPENAI_TYPE==Azure OpenAI
DEFAULT_EMBEDDING_MODEL = "text-embedding-3-small"

OpenAI

OPENAI_API_KEY=<OPENAI_API_KEY>

Azure OpenAI

OPENAI_TYPE="Azure OpenAI"
AZURE_OPENAI_VERSION=2023-12-01-preview
AZURE_OPENAI_ENDPOINT="https://<ENDPOINT>.azure.com/"
OPENAI_API_KEY=<AZURE_OPENAI_API_KEY>

#If Azure OpenAI using Managed Identity:
AZURE_AUTH_TYPE="Managed Identity"

Running locally

Windows: Search and open the app Windows Powershell on Windows start menu

Linux and Mac: Open Terminal

For any OS:

Navigate to the folder where you cloned this repo.

Use cd + the path to the folder. For example:

cd C:\Users\user01\projects\intelligence-toolkit

Run uv sync --extra dev and wait for the packages installation.

Run the app:

Run uv run poe run_streamlit, and it will automatically open the app in your default browser in localhost:8081

Use the API

You can also replicate the examples in your own environment running pip install intelligence-toolkit or uv add intelligence-toolkit.

See the documentation and an example of how to run the code with your data to obtain results without the need to run the UI.

Running with docker

Recommended configuration:
  • Minimum disk space: 8GB
  • Minimum memory: 4GB

Download, install and then open docker app: https://www.docker.com/products/docker-desktop/

Then, open a terminal: Windows: Search and open the app Windows Powershell on Windows start menu

Linux and Mac: Open Terminal

For any OS:

Navigate to the folder where you cloned this repo.

Use cd + the path to the folder. For example:

cd C:\Users\user01\projects\intelligence-toolkit

Build the container:

docker build . -t intelligence-toolkit

Once the build is finished, run the docker container:

  • via terminal:

    docker run -d --name intelligence-toolkit -p 80:80 intelligence-toolkit

Open localhost:80

Note that docker might sleep and you might need to start it again. Open Docker Desktop, in the left menu click on Container and press play on intelligence-toolkit.

Lifecycle Scripts

For Lifecycle scripts it utilizes uv and poethepoet to manage build scripts.

Available scripts are:

  • uv run poe test_unit - This will execute unit tests on api.
  • uv run poe test_smoke - This will execute smoke tests on api.
  • uv run poe check - This will perform a suite of static checks across the package, including:
    • formatting
    • documentation formatting
    • linting
    • security patterns
    • type-checking
  • uv run poe fix - This will apply any available auto-fixes to the package. Usually this is just formatting fixes.
  • uv run poe fix_unsafe - This will apply any available auto-fixes to the package, including those that may be unsafe.
  • uv run poe format - Explicitly run the formatter across the package.

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

intelligence_toolkit-0.1.3.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intelligence_toolkit-0.1.3-py3-none-any.whl (242.8 kB view details)

Uploaded Python 3

File details

Details for the file intelligence_toolkit-0.1.3.tar.gz.

File metadata

  • Download URL: intelligence_toolkit-0.1.3.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for intelligence_toolkit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d45e2c6fecca1ed27d1d2cb328a676d474eac187218f8fd8f2b6d0b0876f0ef0
MD5 b8c4784d6c6882308b1de620c05e2eec
BLAKE2b-256 88139354c7e404fd67511c15f88dd86c5c6ccf2e5aa5b4e1783a59ef3fa55774

See more details on using hashes here.

File details

Details for the file intelligence_toolkit-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for intelligence_toolkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b29a4c6abd7806dc2c1487d7b91dbb2f75ea43046cce92684fee63a9f40c430b
MD5 931f4627cffb3aeea31fd9a82040ad79
BLAKE2b-256 f0bccf4c3d7f802f74591275409d13a1a7236ed02b92c430478dacf0a909196a

See more details on using hashes here.

Supported by

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