ibl-data-manager
Project description
iblai
API for ibl.ai — a generative AI backend as a service for educators.
Requirements
Python 3.9+
Installation & Usage
pip install
To install the API client library, simply execute:
pip install iblai
Then import the package:
import iblai
Getting Started
Please follow the installation procedure and then run the following:
Adding LLM credentials
from iblai.helpers import add_llm_credential
base_url = "https://base.manager.iblai.app/"
api_token = "<MY_ACCESS_TOKEN>"
credential_name = "openai"
credential_value = "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
tenant = "new-platform"
add_llm_credential(credential_name, credential_value, tenant, api_token, base_url)
Chatting with a mentor
from iblai.helpers import (
create_mentor,
upload_document_to_mentor,
wait_for_document_training_to_complete,
create_chat_session,
chat_with_mentor_async
)
tenant = "new-platform"
username = "my-user"
base_url = "https://base.manager.iblai.app/"
asgi_base_url = "wss://asgi.data.iblai.app"
api_token = "<MY_ACCESS_TOKEN>"
mentor_name = "My New Mentor"
mentor_settings = {
"new_mentor_name": mentor_name,
"display_name": mentor_name,
}
mentor_data = await create_mentor(tenant, username, mentor_settings, api_token, base_url)
await upload_document_to_mentor(
mentor_name=mentor_name,
file_path="doc.pdf",
tenant, username, api_token, base_url
)
await wait_for_document_training_to_complete(mentor_name, tenant, username, api_token, base_url)
session_id = await create_chat_session(mentor_name, tenant, username, base_url)
await chat_with_mentor_async(
prompt, session_id, mentor_name, tenant, username, api_token, asgi_base_url
)
Inviting a user
from iblai.helpers import invite_user_to_platform
base_url = "https://base.manager.iblai.app/"
api_token = "<MY_ACCESS_TOKEN>"
tenant = "new-platform"
email = "new-student@example.com"
invite_user_to_platform(tenant, email, api_token, base_url)
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
iblai-4.89.3.tar.gz
(737.3 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
File details
Details for the file iblai-4.89.3.tar.gz.
File metadata
- Download URL: iblai-4.89.3.tar.gz
- Upload date:
- Size: 737.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72faed51ce612b13c319bd5e7915a43ea40a7ff6f8a853393ed16d47b19422eb
|
|
| MD5 |
778e6f0cee81d51de56df70dc596d792
|
|
| BLAKE2b-256 |
73295d1539fb18840f6a672f555873ca8afe801f901f55f3aeffd61d50330628
|
File details
Details for the file iblai-4.89.3-py3-none-any.whl.
File metadata
- Download URL: iblai-4.89.3-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
541a429d9480da2df78a8aff924b1dba23647a1da065f701df57ecfafc1bd6d2
|
|
| MD5 |
d506f23ecbe8a26085926deee88faf09
|
|
| BLAKE2b-256 |
168a2be075088ef59d9945ada67f1dba08472b05c64afd2d93c2342e702e4b8f
|