Skip to main content
The Session Service in the Galtea SDK allows you to manage sessions for evaluating your products. This Service is exposed by the galtea.sessions object.
Remember that we will be using the galtea object. More information here.

Quick Example

First, initialize the Galtea SDK:
galtea = Galtea(api_key="YOUR_API_KEY")
Create a session:
session = galtea.sessions.create(
    version_id=version_id, test_case_id=test_case_id, is_production=False
)
Get or create a session with a custom ID:
session = galtea.sessions.get_or_create(
    custom_id=custom_session_id,
    version_id=version_id,
    test_case_id=test_case_id,
)
List sessions for a version:
sessions = galtea.sessions.list(version_id=version_id, limit=10)

Service Methods

Session

A full conversation between a user and an AI system.