Skip to main content

AI-Harness

AI-Harness is a Python package designed to showcase and utilize the capabilities of the AI Harness platform. This SDK provides a set of tools and functionalities to interact with the AI Harness ecosystem and integrate AI models seamlessly.

Installation

You can install AI-Harness-sdk using pip:

pip install ai-harness-sdk

Documentation

The documentation can be found on https://docs.ai-harness.com

Usage

# Import necessary modules/class
from dotenv import load_dotenv
from ai_harness import Documents

# Load environment variables from a .env file
load_dotenv();

# Initialize a Documents instance
doc_instance = Documents()

# To Create a collection in the AI Harness platform
doc_instance.create_collection(collection_name="Your Collection Name")

# Upload documents to the created collection
doc_instance.upload_documents(
    doc_path=r"document_path",  # Specify the path to the documents
    collection_id="",  # Provide the ID of the target collection
    ingest_with_google="false"  # Indicate whether to ingest documents using Google API or open source pdf loader
)

Applet Usage

# import applets from ai_harness
from ai_harness import applet_name

Conversation Applet

# run a Conversation applet
result = Conversation(prompt="Your Prompt").run()

Place Making Applet

# run a Place Making applet
result = PlaceMaking(site_name="write site name here").run()

Query Generator Applet

# run a Query Generator applet
result = QueryGenerator(
    prompt="Your Prompt", 
    dialect="dialect name",
    schema="schema",
    db_type="db type(relational or non-relational)",
    additional_filters="any additional filters"
    ).run()

Site Analysis Applet

# run a Site Analysis applet
result = SiteAnalysis(
    lat="latitude of site", # either use coordinates or site ID
    long="longitude of site",
    siteId="URA site id of site", # using URA site ID 
    properties=["stations","market_analysis","competitive_analysis","airport","seaport","zones","history","demographics"], #  list of features that can be used 
    market_analysis="residential", # market analysis (residential , commercial or industrial) 
    competitive_analysis="industrial" # competitive analysis (residential , commercial or industrial) 
    ).run()

JSON TO JSON applet

# run JSON TO JSON applet
result = JsonToJson(
    input_json="input json", 
    output_json="output json", 
    ).run()

QA Retrieval Applet

# run QA Retrieval applet
result = QaRetrieval(
    prompt="prompt",
    document_id="id of document uploaded on ai harness", 
    ).run()

DatasetAI Applet

# run DatasetAI applet
dataset_obj = DatasetAI()
dataset = dataset_obj.create_dataset(name="name of dataset", description="dataset description")
dataset_obj.upload_collection_csv(
    file_path="path to csv file",
    date_format="date format",
    collection_name="name of collection",
    dataset_id="id of dataset made on ai harness",
)
result = DatasetAI(
    prompt="prompt",
    dataset_id="id of dataset made on ai harness", 
    ).run()

Metadata

Release files for ai-harness-sdk 0.0.62

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-harness-sdk 0.0.62
File Size Uploaded Provenance
ai-harness-sdk-0.0.62.tar.gz 10.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-harness-sdk 0.0.62
File Interpreter ABI Platform
ai_harness_sdk-0.0.62-py3-none-any.whl Python 3 none any Details

Total release size: 24.6 kB

Release files / ai-harness-sdk-0.0.62.tar.gz

Download URL ai-harness-sdk-0.0.62.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a860905c1d371e7e058406202caa9dadfabe9a0adcdd034ba8846125df421032
BLAKE2b-256 checksum
How to use checksums
b57c0f7470392402a81d9e03c585a5618c290ea10ad8ae15e1ce75daf3fa6ad9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release files / ai_harness_sdk-0.0.62-py3-none-any.whl

Download URL ai_harness_sdk-0.0.62-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae3722f515a05bbc87eaf8530208fd8cf17fdd033a54388996be8a3bd2ed07dd
BLAKE2b-256 checksum
How to use checksums
91095dd2b4b2ba086338a10c338b53535d875390eede49e7a7f1f3fe4cc21c89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Security for ai-harness-sdk 0.0.62

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page