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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gaia-lib-0.0.1.tar.gz
(43.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
gaia_lib-0.0.1-py3-none-any.whl
(66.2 kB
view details)
File details
Details for the file gaia-lib-0.0.1.tar.gz.
File metadata
- Download URL: gaia-lib-0.0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d5816e89646176d519964559e03a89e27c8f0543d90e8438066276173d1c9ce
|
|
| MD5 |
232952fc1ac3676c9c5683a43d195538
|
|
| BLAKE2b-256 |
e9e393f8c3698da50ba72d45b1b247f25259eaa88e990dca63decb938fea93be
|
File details
Details for the file gaia_lib-0.0.1-py3-none-any.whl.
File metadata
- Download URL: gaia_lib-0.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4472b896030e692e64299fda20eb69ae31fc74dc81d40173533fa6697d3ca4
|
|
| MD5 |
483a8e109f856f8255e3ffe035abaa58
|
|
| BLAKE2b-256 |
aa03a8a9aff3c41c112e52435e82dd255f167945a4a3cf15cc7999747dd72899
|