Switch session model
Switch the model used by subsequent provider turns.
POST
/api/session/{sessionID}/modelPath parameters
sessionIDobjectrequiredRequest body
requiredapplication/jsonmodelModel.RefrequiredShow propertiesHide properties
idstringrequiredproviderIDstringrequiredvariantstringResponses
204<No Content>
400InvalidRequestError
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
any401UnauthorizedError
_tagstringrequiredAllowed:
UnauthorizedErrormessagestringrequired404SessionNotFoundError
Any of:
SessionNotFoundError
_tagstringrequiredAllowed:
SessionNotFoundErrorsessionIDstringrequiredmessagestringrequiredSessionNotFoundError
_tagstringrequiredAllowed:
SessionNotFoundErrorsessionIDstringrequiredmessagestringrequiredRequest
curl -X POST "/api/session/%5Bobject%20Object%5D/model" \
-H "Content-Type: application/json" \
-d '{
"model": {
"id": "string",
"providerID": "string",
"variant": "string"
}
}'const response = await fetch("/api/session/%5Bobject%20Object%5D/model", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": {
"id": "string",
"providerID": "string",
"variant": "string"
}
})
});import requests
response = requests.post(
"/api/session/%5Bobject%20Object%5D/model",
headers={
"Content-Type": "application/json"
},
json={
"model": {
"id": "string",
"providerID": "string",
"variant": "string"
}
},
)Response
<No Content>
{
"_tag": "InvalidRequestError",
"message": "string",
"kind": "string",
"field": "string"
}{
"_tag": "UnauthorizedError",
"message": "string"
}{
"_tag": "SessionNotFoundError",
"sessionID": "string",
"message": "string"
}