Skip to content

Commit 0fd1311

Browse files
chore(docs): include more properties in examples
1 parent 11a9d80 commit 0fd1311

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,22 @@ See the [`examples`](examples) directory for complete and runnable examples.
3232

3333
```csharp
3434
using System;
35+
using System.Collections.Generic;
36+
using System.Text.Json;
3537
using ArcadeDotnet;
3638
using ArcadeDotnet.Models.Tools;
3739

3840
ArcadeClient client = new();
3941

40-
ToolExecuteParams parameters = new() { ToolName = "Google.ListEmails" };
42+
ToolExecuteParams parameters = new()
43+
{
44+
ToolName = "Google.ListEmails",
45+
Input = new Dictionary<string, JsonElement>()
46+
{
47+
{ "n_emails", JsonSerializer.SerializeToElement(10) }
48+
},
49+
UserID = "user@example.com",
50+
};
4151

4252
var executeToolResponse = await client.Tools.Execute(parameters);
4353

@@ -87,7 +97,7 @@ var chatResponse = await client
8797
Timeout = TimeSpan.FromSeconds(42),
8898
}
8999
)
90-
.Chat.Completions.Create();
100+
.Chat.Completions.Create(parameters);
91101

92102
Console.WriteLine(chatResponse);
93103
```
@@ -162,7 +172,7 @@ var chatResponse = await client
162172
.WithOptions(options =>
163173
options with { MaxRetries = 3 }
164174
)
165-
.Chat.Completions.Create();
175+
.Chat.Completions.Create(parameters);
166176

167177
Console.WriteLine(chatResponse);
168178
```
@@ -189,7 +199,7 @@ var chatResponse = await client
189199
.WithOptions(options =>
190200
options with { Timeout = TimeSpan.FromSeconds(42) }
191201
)
192-
.Chat.Completions.Create();
202+
.Chat.Completions.Create(parameters);
193203

194204
Console.WriteLine(chatResponse);
195205
```

0 commit comments

Comments
 (0)