logo

Run plugin on the server side vs. client side

Here is the difference between running a plugin on the Server Side and on the Client Side:

What is a Server Plugin?

πŸ’‘
Server Plugins is a feature in the Team version of TypingMind: TypingMind Custom
In TypingMind Custom, plugins are separated into two types:
  • Server Plugins: plugins that run on the server side.
  • Client Plugins: plugins that run on the user’s browser.
Here are some differences between Server Plugins and Client Plugins:
Server Plugins
Client Plugins
βœ…Β Server plugins are run on the server side and hidden away from the user. βœ…Β The user can not see the plugin's code, API keys, credentials, and data. Only the plugin's output is shown to the user. βœ… The AI will decide when to use the plugins based on the plugin's functionality and the current context in the conversation.
βœ…Β Client plugins are run locally on the user's browser. βœ…Β The user must provide the plugin settings (API keys, credentials, configs, etc.) as required by the plugins. βœ…Β The user can view the source code of client plugins.
πŸ’‘
Server Plugins can only run HTTP Action.
πŸ’‘
By default, all plugins on www.typingmind.com are Client Plugins. This includes the macOS app and the Setapp version.
Creating a server plugin is exactly the same as the client plugins, except the Implementation of server plugins must be HTTP action.
When Server Plugins run, the HTTP requests will be sent from the server side. The users will not see the sensitive data or the plugin settings.
To explore the example server plugins, go to your Admin panel β†’ Plugins β†’ Server Plugins and click β€œDuplicate” in one of the default server plugins. Then, you can see and edit all the configurations.
Image without caption

Run on the Server side:

βœ…Β How it works:
  • The user can not see the plugin's code, API keys, credentials, and data. Only the plugin's output is shown to the user.
  • If the plugin requires sending HTTP requests to external servers, the requests will be sent from the TypingMind server, hidden away from the user.
βœ…Β When to use it:
  • By default, all plugins are run on the server side if it has an HTTP action implementation.
  • Running the plugin on the server side is more convenience for the users, as they don’t need to setup anything to use the plugins.

Run on the Client side:

βœ…Β How it works:
  • The plugin will be run on the users’ browser.
  • If the plugin has a JavaScript implementation, the code will be executed in a sandboxed browser environment on the user’s device.
  • If the plugin requires sending HTTP requests to external servers, the requests will be sent directly from the user’s browser to the external server (be aware of CORS issues in this case).
  • The users will need to provide all the plugin settings (e.g., API keys) in order to use the plugin.
βœ…Β When to use it:
  • Use it if the plugin is designed to be run on the client, for example, rendering interactive charts or running JavaScript on the user’s device.
  • Use this if you want to give the users the flexibility of using their own API key in some plugins.

FAQs

Can I make a plugin run both on the server side and the client side?
No, but you can duplicate a plugin and then assign each plugin to run on the client/server side separately. Note that in this case, the user may see 2 plugins with the same name on their UI, which can be confusing.