Skip to content

Commit 01bad9f

Browse files
committed
Version 251224
1 parent 90217da commit 01bad9f

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff 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
5555
WeatherReport 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)

src/nuget-package.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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>

0 commit comments

Comments
 (0)