Zongsoft.Intelligences.Web
0.8.0
dotnet add package Zongsoft.Intelligences.Web --version 0.8.0
NuGet\Install-Package Zongsoft.Intelligences.Web -Version 0.8.0
<PackageReference Include="Zongsoft.Intelligences.Web" Version="0.8.0" />
<PackageVersion Include="Zongsoft.Intelligences.Web" Version="0.8.0" />
<PackageReference Include="Zongsoft.Intelligences.Web" />
paket add Zongsoft.Intelligences.Web --version 0.8.0
#r "nuget: Zongsoft.Intelligences.Web, 0.8.0"
#:package Zongsoft.Intelligences.Web@0.8.0
#addin nuget:?package=Zongsoft.Intelligences.Web&version=0.8.0
#tool nuget:?package=Zongsoft.Intelligences.Web&version=0.8.0
Zongsoft.Intelligences.Web Plugin Library
Overview
Zongsoft.Intelligences.Web is the AI Web plugin library for the Zongsoft open-source framework. It provides Web API plugin support for AI features.
It exposes assistants, models, chat sessions, history, and streaming chat from Zongsoft.Intelligences as framework MVC endpoints. It does not add an AI provider: at least one assistant and its driver/connection must be configured in the parent plugin.
Installation and Deployment
dotnet add package Zongsoft.Intelligences.Web
Deploy Zongsoft.Intelligences.Web.plugin in a Zongsoft web host. Its manifest depends on Zongsoft.Intelligences, and routes use the AI area.
API Shape
| Resource | Operations |
|---|---|
| assistants | list assistants or inspect one by name |
| models | list/get provider models and activate a model |
| chats | list/open/abandon sessions and submit a message |
| history | read or clear a session's role/text entries |
A streaming chat response is written by WebUtility.EnumerableAsync using System.Net.ServerSentEvents. Clients should process server-sent events incrementally and close the response to cancel generation.
POST /AI/ollama/Chats/my-session/Chat?role=user
Content-Type: text/plain; charset=utf-8
Explain bounded channels in one paragraph.
The route above follows the explicit controller templates; replace ollama and the session id with configured values. Create or look up the session before relying on history.
💡 Generate OpenAPI from the running host for its complete routes and response shapes. AI model payloads are provider-defined and can change independently of this transport layer.
Safety and Operations
🚨 Prompts, history, model identifiers, and generated text may contain sensitive or untrusted content. Authenticate and authorize endpoints, isolate tenants, bound request/history/output size and duration, apply rate limits, and never interpret model output as trusted HTML or commands.
Cancellation is propagated to assistant operations. Session state is owned by the configured assistant implementation; do not assume it is durable or shared across host instances unless that implementation guarantees it.
Related Resources
Plugin-Based Integration
Compose this feature through the host; a package reference supplies compile-time APIs, while plugin loading also requires deployed manifests and runtime assets. See the complete plugin workflow.
Use a Plugins.Web host and deploy the corresponding main adapter listed below. Service/controller discovery runs during host initialization; do not put business logic into Program.cs. Verify the configured endpoint and authorization before accepting requests.
| Runtime artifact | Source of truth |
|---|---|
Zongsoft.Intelligences.Web |
Zongsoft.Intelligences.Web.plugin |
| File copying and dependencies | Zongsoft.Intelligences.Web.deploy |
Add this fragment to an existing host .deploy (retain Main and the host’s other base manifests; do not replace the whole file):
[plugins zongsoft intelligences]
nuget:Zongsoft.Intelligences
[plugins zongsoft intelligences web]
nuget:Zongsoft.Intelligences.Web
Run dotnet deploy against a test deployment as explained in the workflow, with the host's framework, platform, architecture and, where needed, site. Pin compatible versions in real deployments; application dependencies such as databases, caches or commercial runtimes are still separate prerequisites.
Additional artifacts listed by the deployment manifest include Zongsoft.Intelligences.Web.plugin. Retain assemblies, dependencies and satellite resource directories as well. Restart the host after deployment, check plugin loading and service/driver registration, then verify the workflow above; copied files alone do not prove that the feature is active.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Zongsoft.Core (>= 7.67.0)
- Zongsoft.Intelligences (>= 0.8.0)
- Zongsoft.Web (>= 7.19.0)
-
net8.0
- System.Net.ServerSentEvents (>= 10.0.12)
- Zongsoft.Core (>= 7.67.0)
- Zongsoft.Intelligences (>= 0.8.0)
- Zongsoft.Web (>= 7.19.0)
-
net9.0
- System.Net.ServerSentEvents (>= 10.0.12)
- Zongsoft.Core (>= 7.67.0)
- Zongsoft.Intelligences (>= 0.8.0)
- Zongsoft.Web (>= 7.19.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.