mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
02814a4fc0
* Wip, bringing persistent chat client back * Bring back code interpreter resource logic * Add file search samples and proposal for new OpenAIAssistantChatClient and AgentPersistantChatCLient * Update dotnet/samples/GettingStarted/External/MEAI.Abstractions/NewHostedFileSearchTool.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/GettingStarted/Steps/Step04_ChatClientAgent_UsingFileSearchTools.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/GettingStarted/External/Azure.AI.Agents.Persistent/NewPersistentAgentsChatClient.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update MEAI abstractions to reflect latest discussions, updated underlying chatclients * Remove unneeded comments * Address PR feedback * Address PR feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
42 lines
1.7 KiB
C#
42 lines
1.7 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Diagnostics;
|
|
using Microsoft.Shared.Diagnostics;
|
|
|
|
namespace Microsoft.Extensions.AI;
|
|
|
|
/// <summary>
|
|
/// Represents a vector store that is hosted by the AI service.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Unlike <see cref="DataContent"/> which contains the data for a file or blob, this class represents a vector store that is hosted
|
|
/// by the AI service and referenced by an identifier. Such identifiers are specific to the provider.
|
|
/// </remarks>
|
|
[DebuggerDisplay("VectorStoreId = {VectorStoreId}")]
|
|
public sealed class HostedVectorStoreContent : AIContent
|
|
{
|
|
private string? _vectorStoreId;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="HostedVectorStoreContent"/> class.
|
|
/// </summary>
|
|
/// <param name="vectorStoreId">The ID of the hosted vector store.</param>
|
|
/// <exception cref="ArgumentNullException"><paramref name="vectorStoreId"/> is <see langword="null"/>.</exception>
|
|
/// <exception cref="ArgumentException"><paramref name="vectorStoreId"/> is empty or composed entirely of whitespace.</exception>
|
|
public HostedVectorStoreContent(string vectorStoreId)
|
|
{
|
|
_vectorStoreId = Throw.IfNullOrWhitespace(vectorStoreId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the ID of the hosted vector store.
|
|
/// </summary>
|
|
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <see langword="null"/>.</exception>
|
|
/// <exception cref="ArgumentException"><paramref name="value"/> is empty or composed entirely of whitespace.</exception>
|
|
public string VectorStoreId
|
|
{
|
|
get => _vectorStoreId ?? string.Empty;
|
|
set => _vectorStoreId = Throw.IfNullOrWhitespace(value);
|
|
}
|
|
}
|