Skip to content

Commit d21c7ae

Browse files
Copilotjongalloway
andcommitted
Update README with configuration format documentation
Co-authored-by: jongalloway <[email protected]>
1 parent bb82640 commit d21c7ae

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,61 @@ app.UseNLWebNet(); // Add NLWebNet middleware (optional)
191191
app.MapNLWebNet(); // Map NLWebNet minimal API endpoints
192192
```
193193

194+
### Configuration Format Support
195+
196+
NLWebNet supports multiple configuration formats for enhanced flexibility:
197+
198+
#### YAML Configuration
199+
200+
```csharp
201+
// Enable YAML configuration support
202+
builder.Configuration.AddNLWebConfigurationFormats(builder.Environment);
203+
builder.Services.AddNLWebConfigurationFormats(builder.Configuration);
204+
```
205+
206+
Example YAML configuration (`config_retrieval.yaml`):
207+
208+
```yaml
209+
# Multi-backend configuration
210+
write_endpoint: primary_backend
211+
endpoints:
212+
primary_backend:
213+
enabled: true
214+
db_type: azure_ai_search
215+
priority: 1
216+
217+
# NLWeb settings
218+
nlweb:
219+
default_mode: List
220+
enable_streaming: true
221+
tool_selection_enabled: true
222+
```
223+
224+
#### XML Tool Definitions
225+
226+
Define tools for the tool selection framework:
227+
228+
```xml
229+
<?xml version="1.0" encoding="utf-8"?>
230+
<ToolDefinitions>
231+
<Tool id="search-tool" name="Enhanced Search" type="search" enabled="true">
232+
<Description>Advanced search with semantic understanding</Description>
233+
<Parameters>
234+
<MaxResults>50</MaxResults>
235+
<TimeoutSeconds>30</TimeoutSeconds>
236+
</Parameters>
237+
<TriggerPatterns>
238+
<Pattern>search for*</Pattern>
239+
<Pattern>find*</Pattern>
240+
</TriggerPatterns>
241+
</Tool>
242+
</ToolDefinitions>
243+
```
244+
245+
#### Backward Compatibility
246+
247+
All existing JSON configuration continues to work unchanged. See the [Configuration Format Guide](doc/configuration-format-updates.md) for detailed documentation and migration examples.
248+
194249
### Prerequisites
195250

196251
- .NET 9.0 SDK

0 commit comments

Comments
 (0)