Skip to content

Endpoints

The LLM Server has several HTTP Endpoints that one can access.

/hric/llm/voice Converts an audio question into a spoken answer

Content-Type

application/json

Request

Name Type Description Required?
valence int The Valence-Part of the robot mood. Yes
arousal int The Arousal-Part of the robot mood. Yes
b64audio string The Base64-Encoded byte array of the audio. Yes

Response Codes

200 for normal messages

Response body:

Name Type Description
diff_valence int The Valence-Change after the LLM response.
diff_arousal int The Arousal-Change after the LLM response.
response_messages array The Output messages in form of a Json Object which will be explained later
The Response Messages Array

Response Messages are stored in an array. The objects there have those properties:

Name Type Description
emotion int The Emotion ID as shown in the Emotion documentation.
text string The text that is spoken in the audio.
b64audio string The Base64-Encoded audio stream. Needs to be decoded first in order to be played.
Name Type Value
emotion int -1
text string '_pause'
b64audio string 'none'
200 for move commands

Move-Commands are stored seperately in a single key. This reduces a bit of complexity for the LLM.

Response body:

Name Type Description
diff_valence int The Valence-Change after the LLM response.
diff_arousal int The Arousal-Change after the LLM response.
move string The Exhibit-Key that the robot wants to move to.
400

If:

  • The request was malformed (not a Json or invalid Json syntax)
  • The request has missing properties that were required

Response Body:

Name Type Value
error string "Request Body is not a json."
Name Type Value
error string "Property {key} missing."
/hric/llm/text Converts a text question into a spoken answer

Content-Type

application/json

Request

Name Type Description Required?
valence int The Valence-Part of the robot mood. Yes
arousal int The Arousal-Part of the robot mood. Yes
text string The Text Command. Yes

Response Codes

200 for normal messages

Response body:

Name Type Description
diff_valence int The Valence-Change after the LLM response.
diff_arousal int The Arousal-Change after the LLM response.
response_messages array The Output messages in form of a Json Object which will be explained later
The Response Messages Array

Response Messages are stored in an array. The objects there have those properties:

Name Type Description
emotion int The Emotion ID as shown in the Emotion documentation.
text string The text that is spoken in the audio.
b64audio string The Base64-Encoded audio stream. Needs to be decoded first in order to be played.
Name Type Value
emotion int -1
text string '_pause'
b64audio string 'none'
200 for move commands

Move-Commands are stored seperately in a single key. This reduces a bit of complexity for the LLM.

Response body:

Name Type Description
diff_valence int The Valence-Change after the LLM response.
diff_arousal int The Arousal-Change after the LLM response.
move string The Exhibit-Key that the robot wants to move to.
400

If:

  • The request was malformed (not a Json or invalid Json syntax)
  • The request has missing properties that were required

Response Body:

Name Type Value
error string "Request Body is not a json."
Name Type Value
error string "Property {key} missing."
/hric/llm/exhibit/list Updates the Exhibit Lists the LLM should consider

Content-Type

application/json

Request

Name Type Description Required?
keys string[] The Exhibit keys that should be activated. Yes.
200

No response message required.

400

If:

  • The request was malformed (not a Json or invalid Json syntax)
  • The request has missing properties that were required

Response Body:

Name Type Value
error string "Request Body is not a json."
Name Type Value
error string "Property {key} missing."
404

If:

  • The requested key does not exist in the exhibit-list.yml.

Response Body:

Name Type Value
error string "Key {key} not found."
/hric/llm/exhibit/current Updates the current exhibit location for the LLM to consider

Content-Type

application/json

Request

Name Type Description Required?
exhibit_key string The Exhibit key to update the context to. Must have been supplied before with PATCH /hric/llm/exhibit/list. Yes
200

No response message required.

400

If:

  • The request was malformed (not a Json or invalid Json syntax)
  • The request has missing properties that were required

Response Body:

Name Type Value
error string "Request Body is not a json."
Name Type Value
error string "Property {key} missing."
404

If:

  • The exhibit key does not exist in the config
  • The exhibit key is not active in the config
Name Type Value
error string "Exhibit key {key} not found."