Memory

Classify a session

POST
classify a session by session id

Path parameters

sessionIdstringRequired
Session ID

Request

This endpoint expects an object.
classes
list of stringsRequired
The classes to use for classification.
name
stringRequired
The name of the classifier. Will be used to store the classification in session metadata if persist is True.
instruction
stringOptional
Custom instruction to use for classification.
last_n
integerOptionalDefaults to 4
The number of session messages to consider for classification. Defaults to 4.
persist
booleanOptional
Whether to persist the classification to session metadata. Defaults to True.

Response

This endpoint returns an object
class
stringOptional
name
stringOptional

Errors

POST
1curl -X POST https://api.getzep.com/api/v2/sessions/sessionId/classify \
2 -H "Authorization: Api-Key <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "classes": [
6 "classes"
7 ],
8 "name": "name"
9}'
1{
2 "class": "class",
3 "name": "name"
4}