Skip to content

Commit ae76b26

Browse files
authored
Do the required renaming. (Azure#49951)
* Do the required renamings * Regenerate API and docs * Update TSP
1 parent bbf5714 commit ae76b26

File tree

125 files changed

+1686
-1764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1686
-1764
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ PersistentAgentThread thread = await client.Threads.CreateThreadAsync();
104104

105105
With a thread created, messages can be created on it:
106106
```C# Snippet:AgentsOverviewCreateMessage
107-
ThreadMessage message = await client.Messages.CreateMessageAsync(
107+
PersistentThreadMessage message = await client.Messages.CreateMessageAsync(
108108
thread.Id,
109109
MessageRole.User,
110110
"I need to solve the equation `3x + 11 = 14`. Can you help me?");
@@ -140,11 +140,11 @@ Assert.AreEqual(
140140
Assuming the run successfully completed, listing messages from the thread that was run will now reflect new information
141141
added by the agent:
142142
```C# Snippet:AgentsOverviewListUpdatedMessages
143-
AsyncPageable<ThreadMessage> messages
143+
AsyncPageable<PersistentThreadMessage> messages
144144
= client.Messages.GetMessagesAsync(
145145
threadId: thread.Id, order: ListSortOrder.Ascending);
146146

147-
await foreach (ThreadMessage threadMessage in messages)
147+
await foreach (PersistentThreadMessage threadMessage in messages)
148148
{
149149
Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: ");
150150
foreach (MessageContent contentItem in threadMessage.ContentItems)
@@ -190,7 +190,7 @@ Once uploaded, the file ID can then be provided to create a vector store for it
190190
```C# Snippet:AgentsCreateVectorStore
191191
// Create a vector store with the file and wait for it to be processed.
192192
// If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active
193-
VectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync(
193+
PersistentAgentsVectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync(
194194
fileIds: new List<string> { uploadedAgentFile.Id },
195195
name: "my_vector_store");
196196
```
@@ -221,7 +221,7 @@ var ds = new VectorStoreDataSource(
221221
assetIdentifier: blobURI,
222222
assetType: VectorStoreDataSourceAssetType.UriAsset
223223
);
224-
VectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync(
224+
PersistentAgentsVectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync(
225225
name: "sample_vector_store",
226226
storeConfiguration: new VectorStoreConfiguration(
227227
dataSources: [ ds ]
@@ -247,7 +247,7 @@ var ds = new VectorStoreDataSource(
247247
assetIdentifier: blobURI,
248248
assetType: VectorStoreDataSourceAssetType.UriAsset
249249
);
250-
VectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync(
250+
PersistentAgentsVectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync(
251251
name: "sample_vector_store"
252252
);
253253

@@ -290,7 +290,7 @@ var attachment = new MessageAttachment(
290290

291291
PersistentAgentThread thread = await client.Threads.CreateThreadAsync();
292292

293-
ThreadMessage message = await client.Messages.CreateMessageAsync(
293+
PersistentThreadMessage message = await client.Messages.CreateMessageAsync(
294294
threadId: thread.Id,
295295
role: MessageRole.User,
296296
content: "Can you give me the documented codes for 'banana' and 'orange'?",
@@ -369,12 +369,12 @@ the reference placeholder by the actual reference and url. Please note, that to
369369
get sensible result, the index needs to have fields "title" and "url".
370370

371371
```C# Snippet:AgentsPopulateReferencesAgentWithAzureAISearchTool
372-
AsyncPageable<ThreadMessage> messages = client.Messages.GetMessagesAsync(
372+
AsyncPageable<PersistentThreadMessage> messages = client.Messages.GetMessagesAsync(
373373
threadId: thread.Id,
374374
order: ListSortOrder.Ascending
375375
);
376376

377-
await foreach (ThreadMessage threadMessage in messages)
377+
await foreach (PersistentThreadMessage threadMessage in messages)
378378
{
379379
Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: ");
380380
foreach (MessageContent contentItem in threadMessage.ContentItems)
@@ -387,11 +387,11 @@ await foreach (ThreadMessage threadMessage in messages)
387387
string annotatedText = textItem.Text;
388388
foreach (MessageTextAnnotation annotation in textItem.Annotations)
389389
{
390-
if (annotation is MessageTextUrlCitationAnnotation urlAnnotation)
390+
if (annotation is MessageTextUriCitationAnnotation uriAnnotation)
391391
{
392392
annotatedText = annotatedText.Replace(
393-
urlAnnotation.Text,
394-
$" [see {urlAnnotation.UrlCitation.Title}] ({urlAnnotation.UrlCitation.Url})");
393+
uriAnnotation.Text,
394+
$" [see {uriAnnotation.UriCitation.Title}] ({uriAnnotation.UriCitation.Uri})");
395395
}
396396
}
397397
Console.Write(annotatedText);
@@ -701,7 +701,7 @@ After we have created a message with request to ask "What would foo say?", we ne
701701
```C# Snippet:AgentsAzureFunctionsHandlePollingWithRequiredAction
702702
PersistentAgentThread thread = await client.Threads.CreateThreadAsync();
703703

704-
ThreadMessage message = await client.Messages.CreateMessageAsync(
704+
PersistentThreadMessage message = await client.Messages.CreateMessageAsync(
705705
thread.Id,
706706
MessageRole.User,
707707
"What is the most prevalent element in the universe? What would foo say?");
@@ -849,7 +849,7 @@ PersistentAgent agent = await client.Administration.CreateAgentAsync(
849849
In this example we are using the `weather_openapi.json` file and agent will request the [wttr.in](https://wttr.in) website for the weather in a location from the prompt.
850850
```C# Snippet:AgentsOpenAPIHandlePollingWithRequiredAction
851851
PersistentAgentThread thread = await client.Threads.CreateThreadAsync();
852-
ThreadMessage message = await client.Messages.CreateMessageAsync(
852+
PersistentThreadMessage message = await client.Messages.CreateMessageAsync(
853853
thread.Id,
854854
MessageRole.User,
855855
"What's the weather in Seattle?");

0 commit comments

Comments
 (0)