参考资料
Gradio.NET
- NuGet 包页面 https://www.nuget.org/packages/Gradio.Net,包版本、目标框架、依赖与发布记录。全书锁定的版本是
0.6.30.8。 - 源码仓库 https://github.com/feiyun0112/Gradio.Net,快速开始、
gr工厂与核心类型两种写法、十份官方演示(Interface、Blocks、Chat、Streaming、Form、Files、Media、Multipage、Themes、Charts)。 - 包内 API 文档,安装后位于
%USERPROFILE%\.nuget\packages\gradio.net\0.6.30.8\lib\net10.0\Gradio.Net.xml。公共成员的类型、参数与默认值以它为准;正文只写其中能由示例复现的部分。 - 上游 Gradio 文档 https://www.gradio.app/docs,组件名与参数名的来源。Gradio.NET 是 Gradio 6.30.0 的 .NET 移植,前端与协议与上游一致;本书不要求读者读过这份文档。
.NET 与 ASP.NET Core
- .NET 10 文档 https://learn.microsoft.com/dotnet/,语言、运行时与工具链。
- ASP.NET Core 文档 https://learn.microsoft.com/aspnet/core/,Web 宿主、路由、中间件与静态文件。
- 通用主机与生命周期 https://learn.microsoft.com/dotnet/core/extensions/generic-host,
IHostApplicationLifetime的三个回调、StopApplication与停止顺序(第 21 章)。 - 依赖注入 https://learn.microsoft.com/dotnet/core/extensions/dependency-injection,服务注册、作用域与解析时机(第 21 章)。
- 配置 https://learn.microsoft.com/dotnet/core/extensions/configuration,
appsettings.json、环境变量与命令行参数的覆盖顺序(第 21 章)。 - 日志 https://learn.microsoft.com/dotnet/core/extensions/logging,日志级别、类别与提供程序(第 21 章)。
OpenAI 兼容接口
- Chat Completions 参考 https://platform.openai.com/docs/api-reference/chat,请求体、
stream参数与choices[0].delta.content的结构(第 16 章)。 - Server-Sent Events 规范 https://html.spec.whatwg.org/multipage/server-sent-events.html,
event:与data:行的含义、帧以空行分隔(第 16、22 章)。