You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Target framework**: `net10.0` (matches the current `ChatAIze.Chatbot` host).
@@ -101,6 +131,8 @@ public sealed class MyPluginLoader : IAsyncPluginLoader
101
131
}
102
132
```
103
133
134
+
Tip: `ChatbotPlugin` defaults to returning its in-memory `Settings` / `Functions` / `Actions` / `Conditions` collections from the callback properties. You can either populate the collections directly or override the callback properties to return context-dependent definitions.
135
+
104
136
3) Build:
105
137
106
138
```bash
@@ -129,7 +161,19 @@ into the chatbot server’s `plugins/` directory.
129
161
130
162
Tip: If you have extra dependencies, the safest approach is to copy everything from `bin/Release/net10.0/` (except `.pdb` if you don’t want symbols).
131
163
132
-
### How plugin loading works (advanced)
164
+
### Plugin release checklist
165
+
166
+
- Target `net10.0` (match the host).
167
+
- Set `IChatbotPlugin.Id` and keep it stable (loading a plugin with the same id replaces the previous one).
168
+
- Set `IChatbotPlugin.Version` (ChatAIze.Chatbot treats missing versions as invalid).
169
+
- Namespace plugin-level settings (`com.mycompany.myplugin:api_key`) to avoid collisions with other plugins.
170
+
- Prefer named methods for tools (`AddFunction(MyTool)`), and keep tool names unique.
171
+
- Respect `IsPreview` / `IsCommunicationSandboxed` before doing side effects (HTTP calls, emails/SMS, writes to external systems).
172
+
- Don’t log secrets (API keys/tokens).
173
+
- If you deploy dependencies, prefer copying the whole output folder to `plugins/` (don’t rely on dashboard upload for multi-file plugins).
174
+
175
+
<details>
176
+
<summary>How plugin loading works (advanced)</summary>
133
177
134
178
ChatAIze.Chatbot loads plugins with an isolated, unloadable `AssemblyLoadContext`:
135
179
@@ -139,6 +183,7 @@ ChatAIze.Chatbot loads plugins with an isolated, unloadable `AssemblyLoadContext
139
183
- Any other dependency must be resolvable via the plugin’s `.deps.json` (and present in the `plugins/` folder).
140
184
141
185
This is why dashboard upload is best for “single dll” plugins, and file-copy deployment is best for plugins with external dependencies.
186
+
</details>
142
187
143
188
## Core Concepts
144
189
@@ -176,6 +221,15 @@ Every callback can optionally accept a context parameter:
-`IConditionContext` (workflow conditions): currently just `IChatContext`
178
223
224
+
### Glossary (ChatAIze.Chatbot terms)
225
+
226
+
-**Plugin**: a loaded `.dll` that returns settings, tools, actions and/or conditions.
227
+
-**Tool / function**: an `IChatFunction` exposed to the model as a callable tool (LLM function calling).
228
+
-**Integration function**: a dashboard-configured function (also an `IChatFunction`) that executes a workflow of actions/conditions.
229
+
-**Workflow action**: an `IFunctionAction` step used inside an integration function (not exposed to the model directly).
230
+
-**Workflow condition**: an `IFunctionCondition` gate evaluated before an integration function runs.
231
+
-**Placeholder**: a named value (`{placeholder}`) produced by actions and injected into later settings as plain-text substitution (supports nested access like `{ticket.id}` when the placeholder is a JSON object).
232
+
179
233
## Tools (LLM-Callable Functions)
180
234
181
235
Tools are `IChatFunction` instances returned by `IChatbotPlugin.FunctionsCallback`. They are presented to the language model as callable tools.
@@ -238,6 +292,8 @@ public sealed class MyPluginLoader : IPluginLoader
238
292
-`IFunctionContext` is injected by type,
239
293
-`CancellationToken` is injected by type.
240
294
295
+
Tip: Prefer named methods over lambdas for tools. Some compiler-generated lambda names are not stable/public-friendly and may fail normalization. If you need full control, register a `ChatFunction` with an explicit `Name`.
296
+
241
297
### Tool schema generation (what the model sees)
242
298
243
299
In the ChatAIze stack, schema generation works like this:
@@ -274,6 +330,24 @@ If you rely on reflection-based schemas, you can improve the model-visible docum
274
330
-`DescriptionAttribute` on the method and/or parameters
275
331
- string data annotations such as `[Required]`, `[MinLength]`, `[MaxLength]`, `[StringLength]`
276
332
333
+
Example (reflection schema + runtime validation for strings):
Avoid hard dependencies on other plugins being present; always handle `null`.
769
+
658
770
### Custom databases
659
771
660
772
Plugins can use `IDatabaseManager` via `context.Databases`:
@@ -683,6 +795,7 @@ var item = await context.Databases.GetFirstItemAsync(
683
795
684
796
### “My plugin loads but my tool never runs”
685
797
798
+
- In ChatAIze.Chatbot, ensure Integrations are enabled in the dashboard settings (tools and integration functions are added only when integrations are enabled).
686
799
- Ensure your tool name is unique across all plugins and integration functions.
687
800
- Ensure `IChatFunction.Callback` is non-null (tools without callbacks are treated as integration functions and executed by the host’s default callback).
688
801
- Prefer named methods over lambdas for `AddFunction(Delegate)`; compiler-generated names can be unstable.
0 commit comments