import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.session_labels.create(request={
"session_id": 1,
"type": "auto-rating",
"code": "GOOD",
"user_email": "user@email.com",
"issue_categories": [
"Silent treatment",
],
})
# Handle response
print(res)
{
"session_id": 1,
"type": "auto-rating",
"code": "GOOD",
"user_email": "user@email.com",
"comments": "<string>",
"issue_categories": [
"Silent treatment"
],
"id": 1,
"timestamp": "2024-01-01T12:00:00Z"
}
Create a new label
import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.session_labels.create(request={
"session_id": 1,
"type": "auto-rating",
"code": "GOOD",
"user_email": "user@email.com",
"issue_categories": [
"Silent treatment",
],
})
# Handle response
print(res)
{
"session_id": 1,
"type": "auto-rating",
"code": "GOOD",
"user_email": "user@email.com",
"comments": "<string>",
"issue_categories": [
"Silent treatment"
],
"id": 1,
"timestamp": "2024-01-01T12:00:00Z"
}
Successful Response
Response model for session label operations. A session label is associated with a given session and contains an evaluation of quality and descriptions of issues the user encountered in that session or other details.