Skip to main content

gaia-sdk

gaia sdk

#how to install pip install gaia-lib

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

Release files for gaia-lib 0.0.2

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

Source distribution (sdist)

Source distribution for gaia-lib 0.0.2
File Size Uploaded
gaia-lib-0.0.2.tar.gz 43.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gaia-lib 0.0.2
File Interpreter ABI Platform
gaia_lib-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 110.0 kB

Release files / gaia-lib-0.0.2.tar.gz

Download URL gaia-lib-0.0.2.tar.gz
Size 43.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2611980b221655654021d2665622f032598f26c0a143deb692bce84e7e93525d
BLAKE2b-256 checksum
How to use checksums
d36d0c64fdfcbe9053767d138f355fe3edb4481a65727b286ac9cf3b781d425a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.0

Release files / gaia_lib-0.0.2-py3-none-any.whl

Download URL gaia_lib-0.0.2-py3-none-any.whl
Size 66.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e34c96b878e1dd1e6fcb29589485352adea91aa7ecb9fafc400d922bd62211e4
BLAKE2b-256 checksum
How to use checksums
bccc9a60fa1029ad3a4de50cef53890549035a05514f63e7ac79be718d8f79fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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