Skip to content

Commit 160af6f

Browse files
authored
Add a new sample and re emit the code. (Azure#50064)
* Add a new sample and re emit the code. * fixes
1 parent ae38dd4 commit 160af6f

13 files changed

+646
-73
lines changed

sdk/ai/Azure.AI.Agents.Persistent/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ To enable your Agent to perform search through Bing search API, you use `BingGro
318318

319319
Here is an example:
320320
```C# Snippet:AgentsBingGrounding_GetConnection
321-
BingGroundingSearchConfigurationList configurationList = new(
322-
[new BingGroundingSearchConfiguration(connectionId)]
321+
BingGroundingToolDefinition bingGroundingTool = new(
322+
new BingGroundingSearchToolParameters(
323+
[new BingGroundingSearchConfiguration(connectionId)]
324+
)
323325
);
324-
BingGroundingToolDefinition bingGroundingTool = new(configurationList);
325326
```
326327
```C# Snippet:AgentsBingGroundingAsync_CreateAgent
327328
PersistentAgent agent = await agentClient.Administration.CreateAgentAsync(

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
136136
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
137137
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
138138
}
139-
public partial class BingGroundingSearchConfigurationList : System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>
139+
public partial class BingGroundingSearchToolParameters : System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>
140140
{
141-
public BingGroundingSearchConfigurationList(System.Collections.Generic.IEnumerable<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration> searchConfigurations) { }
141+
public BingGroundingSearchToolParameters(System.Collections.Generic.IEnumerable<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration> searchConfigurations) { }
142142
public System.Collections.Generic.IList<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration> SearchConfigurations { get { throw null; } }
143143
protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
144-
Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
145-
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
146-
Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
147-
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
148-
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
144+
Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
145+
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
146+
Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
147+
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
148+
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
149149
}
150150
public partial class BingGroundingToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>
151151
{
152-
public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList bingGrounding) { }
153-
public Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList BingGrounding { get { throw null; } set { } }
152+
public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters bingGrounding) { }
153+
public Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters BingGrounding { get { throw null; } set { } }
154154
protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
155155
Azure.AI.Agents.Persistent.BingGroundingToolDefinition System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
156156
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
@@ -1244,7 +1244,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
12441244
private readonly int _dummyPrimitive;
12451245
public PersistentAgentsNamedToolChoiceType(string value) { throw null; }
12461246
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType AzureAISearch { get { throw null; } }
1247-
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingCustomSearch { get { throw null; } }
1247+
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingGrounding { get { throw null; } }
12481248
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType CodeInterpreter { get { throw null; } }
12491249
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType ConnectedAgent { get { throw null; } }
12501250
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType FileSearch { get { throw null; } }

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
136136
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
137137
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
138138
}
139-
public partial class BingGroundingSearchConfigurationList : System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>
139+
public partial class BingGroundingSearchToolParameters : System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>
140140
{
141-
public BingGroundingSearchConfigurationList(System.Collections.Generic.IEnumerable<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration> searchConfigurations) { }
141+
public BingGroundingSearchToolParameters(System.Collections.Generic.IEnumerable<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration> searchConfigurations) { }
142142
public System.Collections.Generic.IList<Azure.AI.Agents.Persistent.BingGroundingSearchConfiguration> SearchConfigurations { get { throw null; } }
143143
protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
144-
Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
145-
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
146-
Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
147-
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
148-
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
144+
Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
145+
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
146+
Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
147+
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
148+
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
149149
}
150150
public partial class BingGroundingToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>
151151
{
152-
public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList bingGrounding) { }
153-
public Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList BingGrounding { get { throw null; } set { } }
152+
public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters bingGrounding) { }
153+
public Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters BingGrounding { get { throw null; } set { } }
154154
protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
155155
Azure.AI.Agents.Persistent.BingGroundingToolDefinition System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
156156
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Agents.Persistent.BingGroundingToolDefinition>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
@@ -1244,7 +1244,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
12441244
private readonly int _dummyPrimitive;
12451245
public PersistentAgentsNamedToolChoiceType(string value) { throw null; }
12461246
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType AzureAISearch { get { throw null; } }
1247-
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingCustomSearch { get { throw null; } }
1247+
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingGrounding { get { throw null; } }
12481248
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType CodeInterpreter { get { throw null; } }
12491249
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType ConnectedAgent { get { throw null; } }
12501250
public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType FileSearch { get { throw null; } }

0 commit comments

Comments
 (0)