cannoli
Install
!pip install cannoli
Usage Instructions:
Basic Usage:
This example demonstrates how to retrieve the API key from an environment variable named OPENAI_API_KEY. It also shows how to use default parameters defined in default_settings.json.
# Create an instance of the Cannoli class
cnl = Cannoli()
# Ask a question with the quick_question method and store the response in 'ans'
ans = cnl.quick_question("What's the boiling point of water?")
Customizing Parameters:
In this example, the Cannoli class instance is created with a user-provided API key and custom settings, including the choice of engine, custom prompt, token limits, and temperature settings.
# Instantiate the Cannoli class with a custom API key and setup parameters
api_key = 'your_api_key_here'
setup = {
"engine": "gpt-3.5-turbo-instruct",
"prompt": "You are my personal assistant. Please provide the best answer you can.",
"max_tokens": 300,
"temperature": 0.7
}
cnl = Cannoli(api_key=api_key, setup=setup)
# Use the quick_question method to ask a question and store the answer in 'ans'
ans = cnl.quick_question("What's the boiling point of water?")
Metadata
Release files for cannoli 0.1.27
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cannoli-0.1.27.tar.gz | 17.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cannoli-0.1.27-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.1 kB
Release files / cannoli-0.1.27.tar.gz
| Download URL | cannoli-0.1.27.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7022d73ae952c65485a3ce13dcc671404a99f4b7e7d5ad60dc1835b86414f13
|
|
BLAKE2b-256 checksum How to use checksums |
e9300dec1408afb550a0d97f87c29670ec377ff2cc98b1d0fff896f2d9ac08ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / cannoli-0.1.27-py3-none-any.whl
| Download URL | cannoli-0.1.27-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd18dfd85b95b1fdae5b82f25093f99b47ff540248ba95f4215d4d59c334a6a6
|
|
BLAKE2b-256 checksum How to use checksums |
1e58e49537d6ed7dc9df0afc5ad5c2c3ab8563f4ec9def10276fe187289f25c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|