Cerebrate SDK
Project description
Cerebrate SDK
Install
with poetry
poetry add cerebrate-sdk
or with pip
pip install cerebrate-sdk
Examples
Fake email detector
from cerebrate_sdk import Cerebrate
c = Cerebrate('YOUR_API_KEY')
task = "Detect if email is fake or real"
examples = [
"qwertyuiooiu@ihdj.com: fake"
"support@cerebrate.ai: real",
]
result = c.predict(task, examples, "lajotig138@5k2u.com: ")
print(result[0])
# fake
With options
from cerebrate_sdk import Cerebrate, Options
c = Cerebrate('YOUR_API_KEY')
options = Options(
stop=['Q:'],
temperature=0.7,
max_tokens=100,
top_p=1,
presence_penalty=0,
frequency_penalty=0,
best_of=1
)
task = "Detect if email is fake or real"
examples = [
"qwertyuiooiu@ihdj.com: fake"
"support@cerebrate.ai: real",
]
result = c.predict(task, examples, "lajotig138@5k2u.com: ", options=options)
print(result[0])
# fake
Raw usage
from cerebrate_sdk import Cerebrate
c = Cerebrate("YOUR_API_KEY")
result = c.raw("Suggest the next item for user's cart."
"Cart: bacon, eggs, tomatoes"
"Suggested item: ")
print(result[0])
# sausage
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
cerebrate-sdk-0.1.6.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for cerebrate_sdk-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19f3a945616c8d72a8060d8c4e36a74f509fba1a2d2802a4caedf9c8dbbc7d8 |
|
MD5 | abc79c4571f34dc26e5887c9077c45cf |
|
BLAKE2b-256 | dbed673c2b492fd4f78a4b13c415f4ea6ccbe2f939d01f587dc828a5649ddaa3 |