Fixed context

It is possible to put the server in "fixed context" mode.

Tip:
We call "context" a set of interactions.


In this case :
  • A set of interactions is loaded during the launch (which you defined).
  • The Targets which connect are automatically assigned to those loaded interactions.
  • The connected Targets cannot add/delete interactions.

Use case

For a web application

In some case, for a Web application like our online demo, it is not possible to completely hide the Token of the server to which we are connecting (it is present somewhere in the javascript). In this situation, it is useful to launch the server in fixed_context mode.

This way, the server cannot be used for other interactions than thos which have been preloaded.

For a quick test in the console Golem.ai

Fixed contexts are allowing you to test your configuration directly from the consol, with the JSON code of configuration.
The "dialog" button brings you to a page on which you are connected as front_and_target to your server. Therefore you can send requests and see what your Golem.ai server is answering to you.

Tip:
In embedded mode, the fixed_context mode can reduce the RAM consumption (and secondarily CPU) by loading only the required resources.

How do we do ?

On a server created by the console

From your console :

  • Create a context, or make a copy from an example.
  • Create or edit a server.
  • In the creation/edition page,select the context you have created. Validate.

What do I put in the context ?

You can put the JSON of an "interaction_array" message or an "interaction" message if you have only one interaction.
Example :

   {
        "type": "interaction_array",
        "interactions": [
            {
                "type": "interaction",
                "id_interaction": "coffee",
                // ...

                "parameters": [
                        // ...
                    }
                ]
            }
        ]
    }

On a server which is hosted by yourself

This functionnality is curruntly being developed.

API connection address :

TCP : golem.ai:3003
Web Socket : golem.ai:3004/ws
Web Socket Sécurisé (WSS) : golem.ai:3005/ws
HTTP : golem.ai:3004/http
HTTPS : golem.ai:3005/http