Dependency Injection Confusion
维护者通常 1 天内回复
@gewarren 已经在做这个了。
开始于 2025年11月3日。
评估
这个 Issue 还没有评估数据。
描述
Type of issue
Missing information
Description
This might not be the best place for this but UseFunctionInvocation() caused me to run around in circles for a bit in combination with the lack of documentation addressing Dependency Injection, particularly in regards to tool calls.
Using UseFunctionInvocation() causes the root SP to be "captured" so IServiceProvider on tool call methods does not get injected with the scoped SP even if you pass it into the Agent constructor. There is a subtle(?) bit in the documentation on that constructor suggestion the SP provided is useless unless it needs to add an Invoking client..
I'm have no recommendations on the best way to clear things up; my head is still spinning from diving into everything today 😆
Page URL
https://learn.microsoft.com/en-us/dotnet/ai/quickstarts/use-function-calling
Content source URL
https://github.com/dotnet/docs/blob/main/docs/ai/quickstarts/use-function-calling.md
Document Version Independent Id
7228f348-6649-a87d-bae5-4a70817c03bb
Platform Id
5a517f05-b64b-c471-b99d-72253c213be1
Article author
@gewarren
Metadata
- ID: 27e2bbca-36b0-3883-11f7-321c044ee29a
- PlatformId: 5a517f05-b64b-c471-b99d-72253c213be1
- Service: dotnet
- Sub-service: intelligent-apps
- 主要语言
- 没有语言数据
- 星标
- 4.8k
- 派生
- 6.1k
- 平均合并
- 22 小时 46 分钟
- 30 天内合并 PR
- 296
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/docs 的其他 Issue
-
Examen未关闭dotnet-csharp/svc lang-reference/subsvc needs-more-info
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
Update the .NET Framework 3.5 on Windows 11 FAQ to mention Windows 11 26H2可能已有人在做 @BillWagner 于 3 天前认领。 未关闭:pushpin: seQUESTered dotnet/svc
难度 1/5 1 小时以内 新手友好度 78/100
dotnet/docs#56791 · 1 个 reaction · 已指派 2 人 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复
-
Improve description of `limitations of extensions`可能已有人在做 @Manish-1kumar 于 12 天前认领。 未关闭advanced-concepts/subsvc dotnet-csharp/svc
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
Document unit-test / theory-data impact of .NET 11 double→decimal conversion可能已有人在做 @SkyDevLab 于 22 天前认领。 未关闭:watch: Not Triaged dotnet-fundamentals/svc
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复