Client Initialization (Start Here)
The Lore package enables you to interact with the GenAI Studio API.
1. Installation #
The Lore package should come pre-installed when you launch a JupyterLab notebook from your hosted GenAI Studio instance. To launch a notebook, see Launch Notebook CLI.
2. Import the Client #
from lore.client import Lore
# Base Types
import lore.types.base_types as bt # (bt.Dataset, bt.Model, bt.PromptTemplate)
3. Provide Required Configuration Settings #
GEN_AI_ADDRESS = "<ADD_GEN_AI_ADDRESS>:8080"
GEN_AI_USERNAME = "<ADD_GEN_AI_USERNAME>"
GEN_AI_PASSWORD = "<ADD_GEN_AI_PASSWORD>"
HF_TOKEN = "<ADD_HF_TOKEN>"
4. Initialize the Client #
lore = Lore(host=GEN_AI_ADDRESS)
lore.login(credentials=(GEN_AI_USERNAME, GEN_AI_PASSWORD), mlde_host=GEN_AI_ADDRESS)
Next Steps #
Now you have an authenticated client that is ready to interact with the GenAI Studio API. At this point, you can load or create a workspace.