You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,42 @@ await foreach (AIAgent agent in catalog.GetAgentsAsync())
100
100
}
101
101
```
102
102
103
+
You can of course use any config format supported by .NET configuration, such as
104
+
TOML which is arguably more human-friendly for hand-editing:
105
+
106
+
```toml
107
+
[ai.clients.openai]
108
+
modelid = "gpt-4.1"
109
+
110
+
[ai.clients.grok]
111
+
endpoint = "https://api.x.ai/v1"
112
+
modelid = "grok-4-fast-non-reasoning"
113
+
114
+
[ai.agents.orders]
115
+
description = "Manage orders using catalogs for food or any other item."
116
+
instructions = """
117
+
118
+
You are an AI agent responsible for processing orders for food or other items.
119
+
Your primary goals are to identify user intent, extract or request provider information, manage order data using tools and friendly responses to guide users through the ordering process.
120
+
121
+
"""
122
+
123
+
# ai.clients.openai, can omit the ai.clients prefix
124
+
client = "openai"
125
+
126
+
[ai.agents.reminder.options]
127
+
modelid = "gpt-4o-mini"
128
+
```
129
+
130
+
This can be used by leveraging [Tomlyn.Extensions.Configuration](https://www.nuget.org/packages/Tomlyn.Extensions.Configuration).
131
+
132
+
> [!NOTE]
133
+
> This package will automatically dedent and trim start and end newlines from
134
+
> multi-line instructions and descriptions when applying the configuration,
135
+
> avoiding unnecessary tokens being used for indentation while allowing flexible
0 commit comments