File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ The following providers are currently supported (check out the individual README
3636
3737> Tip: For other OpenAI-based providers, you can use the OpenAI Package and provide a custom endpoint
3838
39- ## Code sample
39+ ## Code sample (AgentFactory)
4040> using Azure OpenAI, easily setting Reasoning Effort and Tool Calling Middleware (see individual Provider README for detailed examples)
4141
4242``` cs
@@ -55,6 +55,32 @@ ChatClientAgentRunResponse<WeatherReport> response = await agent.RunAsync<Weathe
5555WeatherReport weatherReport = response .Result ;
5656```
5757
58+ ## Code sample (AIToolsFactory)
59+ ``` cs
60+ // 1. Make your tool-class and add [AITool] attributes
61+
62+ public class MyTools
63+ {
64+ [AITool ]
65+ public string MyTool1 ()
66+ {
67+ return " hello" ;
68+ }
69+
70+ [AITool ]
71+ public string MyTool2 ()
72+ {
73+ return " world" ;
74+ }
75+ }
76+
77+ // 2. Get your tool by either instance or Type (if not contructor dependencies)
78+
79+ IList < AITool > tools = aiToolsFactory .GetTools (typeof (MyTools ));
80+ // or
81+ IList < AITool > tools = aiToolsFactory .GetTools (new MyTools ());
82+ ```
83+
5884** More Info**
5985
6086[ ![ WIKI] ( https://img.shields.io/badge/Wiki-brown?style=for-the-badge )] ( https://github.com/rwjdk/AgentFrameworkToolkit/wiki )
Original file line number Diff line number Diff line change 11<Project >
22 <PropertyGroup >
33 <!-- Central version prefix - applies to all nuget packages. -->
4- <PackageVersion >1.0.0-preview.251222 .1</PackageVersion >
4+ <PackageVersion >1.0.0-preview.251224 .1</PackageVersion >
55 <Configurations >Debug;Release;Publish</Configurations >
66 <Title >Microsoft Agent Framework</Title >
77 <PackageReadmeFile >README.md</PackageReadmeFile >
You can’t perform that action at this time.
0 commit comments