Skip to main content

Returns

Returns a Session object.

Example

session = galtea.sessions.create(
    version_id=version_id, test_case_id=test_case_id, is_production=False
)

Parameters

version_id
string
required
The ID of the version to associate with this session.
test_case_id
string
The ID of a test case. Forbidden when is_production=True. Sessions backed by a test case derive their context from the test case rather than the request.
custom_id
string
A client-provided custom ID for the session.
This is useful to associate sessions in the Galtea platform with those in your application.
context
string
The context provided to the AI product during the session. Forbidden when test_case_id is set (it would be derived from the test case).
is_production
boolean
A flag to indicate if the session represents real production traffic. When omitted, the API derives it from test_case_id presence: no test case means production. A non-production session no longer requires a test_case_id — externally ingested sessions (e.g. imported traces) may be classified as development data without being linked to a test case.