There are three types of contexts in OpenDialog Core. Persistent contexts that are stored together with the user's conversational state, and non-persistent contexts that only last for the duration of a single interaction.
You can also create a completely custom context that handles its own storage needs. This is a great way to integrate with outside information sources.
In this section we setup a completely custom context.
First, we should ensure that we can register contexts through the context configuration.
php artisan vendor:publish --provider="OpenDialogAi\ContextEngine\ContextEngineServiceProvider"
This will publish the context configuration in
context_engine.php<?phpreturn [/*** Register your custom contexts here. Custom contexts must extend* @see \OpenDialogAi\ContextEngine\Contexts\Custom\AbstractCustomContext** Custom contexts are used to make available application specific attributes that are externally managed*/'custom_contexts' => [// \OpenDialogAi\ContextEngine\tests\contexts\DummyCustomContext::class]];