Skip to main content

Gaia SDK library

Project description

gaia-sdk

gaia sdk

#how to install pip install gaia-core

#how to use

# add .vendors_keys file including
# OPEN_AI_KEY=
# COHERE_AI_KEY=
# or
# use dict api_keys dict

import gaia
debug=True
api_keys = {
    "OPEN_AI_KEY": "",
    "COHERE_AI_KEY": ""
}
GAIA = gaia.init(api_token='', api_keys=api_keys, debug=debug)
prompt = 'find the sentiment for the following text <TEXT>, provide only Positive or Negative or Neutral answers'
prompt_template = GAIA.optimize_prompt(prompt)
golden_dataset: list = GAIA.load_data('local_dataset.csv')
vendors: list = GAIA.get_available_vendors()
prompts = [prompt_template.replace('<TEXT>', row['prompt']) for row in golden_dataset]
results = GAIA.run_vendors(vendors=vendors, data=prompts)
vendors_results = results['vendors_results']
total_took = results['total_took']
compared_vendors = results['compared_vendors']
GAIA.save_csv('Sentiment_gai.csv', data=vendors_results)

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

gaia-core-0.0.2.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

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

gaia_core-0.0.2-py3-none-any.whl (66.2 kB view details)

Uploaded Python 3

File details

Details for the file gaia-core-0.0.2.tar.gz.

File metadata

  • Download URL: gaia-core-0.0.2.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for gaia-core-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5366f5c48d7cbbb80292861d906080cf7887d727bb0732969339e29eaaa91d37
MD5 c883cb4df708f56911d8d066389422ea
BLAKE2b-256 c16de068e003704e17c38c8bf6b252df064fe03e2fde226da96096ac5977ebb0

See more details on using hashes here.

File details

Details for the file gaia_core-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: gaia_core-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 66.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for gaia_core-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae88344a5ba2f0f8bf4486fd644a601c5e7b9fbe106e1d3829c7e913274629da
MD5 a4acafeb95da7e52d9b1ba52b4c96b69
BLAKE2b-256 d61c0b1a6c73f5ee20b967cc8f822f6b544279580e0c6027b96ec296718dafd7

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