Dependency Injection Confusion
Maintainer antworten meist innerhalb von 1 Tag
@gewarren arbeitet bereits daran.
Seit 03.11.2025.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 4.8k
- Forks
- 6.1k
- Ø Merge
- 22 Std. 46 Min.
- Gemergte PRs (30 T.)
- 296
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus dotnet/docs
-
ExamenOffendotnet-csharp/svc lang-reference/subsvc needs-more-info
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
dotnet/docs#56845 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Update the .NET Framework 3.5 on Windows 11 FAQ to mention Windows 11 26H2Evtl. vergeben @BillWagner hat das vor 3 Tagen übernommen. Offen:pushpin: seQUESTered dotnet/svc
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
dotnet/docs#56791 · 1 Reaktion · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag
-
Improve description of `limitations of extensions`Evtl. vergeben @Manish-1kumar hat das vor 12 Tagen übernommen. Offenadvanced-concepts/subsvc dotnet-csharp/svc
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 84/100
dotnet/docs#56626 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Document unit-test / theory-data impact of .NET 11 double→decimal conversionEvtl. vergeben @SkyDevLab hat das vor 22 Tagen übernommen. Offen:watch: Not Triaged dotnet-fundamentals/svc
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag