Skip to content

.Net: dotnet format issues with SDK 9.0 #10741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ IAsyncEnumerable<MemoryRecord> GetBatchFromNamespaceAsync(
/// <param name="withEmbeddings"> if true, the embedding will be returned in the memory record.</param>
/// <param name="cancellationToken"></param>
/// <returns> the memory records that match the filter.</returns>
public IAsyncEnumerable<MemoryRecord?> GetBatchWithFilterAsync(
IAsyncEnumerable<MemoryRecord?> GetBatchWithFilterAsync(
string indexName,
Dictionary<string, object> filter,
int limit = 10,
Expand Down Expand Up @@ -182,7 +182,7 @@ Task RemoveWithDocumentIdAsync(
/// <param name="indexNamespace"> the namespace to remove from.</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public Task RemoveWithDocumentIdBatchAsync(
Task RemoveWithDocumentIdBatchAsync(
string indexName,
IEnumerable<string> documentIds,
string indexNamespace = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal interface IPostgresVectorStoreDbClient
/// <summary>
/// The <see cref="NpgsqlDataSource"/> used to connect to the database.
/// </summary>
public NpgsqlDataSource DataSource { get; }
NpgsqlDataSource DataSource { get; }

/// <summary>
/// Check if a table exists.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface IQdrantVectorDbClient
/// <param name="withVectors">Whether to include the vector data in the returned results.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>An asynchronous list of Qdrant vectors records associated with the given IDs</returns>
public IAsyncEnumerable<QdrantVectorRecord> GetVectorsByIdAsync(string collectionName, IEnumerable<string> pointIds, bool withVectors = false,
IAsyncEnumerable<QdrantVectorRecord> GetVectorsByIdAsync(string collectionName, IEnumerable<string> pointIds, bool withVectors = false,
CancellationToken cancellationToken = default);

/// <summary>
Expand All @@ -33,31 +33,31 @@ public IAsyncEnumerable<QdrantVectorRecord> GetVectorsByIdAsync(string collectio
/// <param name="withVector">Whether to include the vector data in the returned result.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>The Qdrant vector record associated with the given ID if found, null if not.</returns>
public Task<QdrantVectorRecord?> GetVectorByPayloadIdAsync(string collectionName, string metadataId, bool withVector = false, CancellationToken cancellationToken = default);
Task<QdrantVectorRecord?> GetVectorByPayloadIdAsync(string collectionName, string metadataId, bool withVector = false, CancellationToken cancellationToken = default);

/// <summary>
/// Delete vectors by their unique Qdrant IDs.
/// </summary>
/// <param name="collectionName">The name assigned to a collection of vectors.</param>
/// <param name="pointIds">The unique IDs used to index Qdrant vector entries.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task DeleteVectorsByIdAsync(string collectionName, IEnumerable<string> pointIds, CancellationToken cancellationToken = default);
Task DeleteVectorsByIdAsync(string collectionName, IEnumerable<string> pointIds, CancellationToken cancellationToken = default);

/// <summary>
/// Delete a vector by its unique identifier in the metadata (Qdrant payload).
/// </summary>
/// <param name="collectionName">The name assigned to a collection of vectors.</param>
/// <param name="metadataId">The unique ID stored in a Qdrant vector entry's metadata.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task DeleteVectorByPayloadIdAsync(string collectionName, string metadataId, CancellationToken cancellationToken = default);
Task DeleteVectorByPayloadIdAsync(string collectionName, string metadataId, CancellationToken cancellationToken = default);

/// <summary>
/// Upsert a group of vectors into a collection.
/// </summary>
/// <param name="collectionName">The name assigned to a collection of vectors.</param>
/// <param name="vectorData">The Qdrant vector records to upsert.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task UpsertVectorsAsync(string collectionName, IEnumerable<QdrantVectorRecord> vectorData, CancellationToken cancellationToken = default);
Task UpsertVectorsAsync(string collectionName, IEnumerable<QdrantVectorRecord> vectorData, CancellationToken cancellationToken = default);

/// <summary>
/// Find the nearest vectors in a collection using vector similarity search.
Expand All @@ -69,7 +69,7 @@ public IAsyncEnumerable<QdrantVectorRecord> GetVectorsByIdAsync(string collectio
/// <param name="withVectors">Whether to include the vector data in the returned results.</param>
/// <param name="requiredTags">Qdrant tags used to filter the results.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public IAsyncEnumerable<(QdrantVectorRecord, double)> FindNearestInCollectionAsync(
IAsyncEnumerable<(QdrantVectorRecord, double)> FindNearestInCollectionAsync(
string collectionName,
ReadOnlyMemory<float> target,
double threshold,
Expand All @@ -83,25 +83,25 @@ public IAsyncEnumerable<QdrantVectorRecord> GetVectorsByIdAsync(string collectio
/// </summary>
/// <param name="collectionName">The name assigned to a collection of vectors.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task CreateCollectionAsync(string collectionName, CancellationToken cancellationToken = default);
Task CreateCollectionAsync(string collectionName, CancellationToken cancellationToken = default);

/// <summary>
/// Delete a Qdrant vector collection.
/// </summary>
/// <param name="collectionName">The name assigned to a collection of vectors.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task DeleteCollectionAsync(string collectionName, CancellationToken cancellationToken = default);
Task DeleteCollectionAsync(string collectionName, CancellationToken cancellationToken = default);

/// <summary>
/// Check if a vector collection exists.
/// </summary>
/// <param name="collectionName">The name assigned to a collection of vectors.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task<bool> DoesCollectionExistAsync(string collectionName, CancellationToken cancellationToken = default);
Task<bool> DoesCollectionExistAsync(string collectionName, CancellationToken cancellationToken = default);

/// <summary>
/// List all vector collections.
/// </summary>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public IAsyncEnumerable<string> ListCollectionsAsync(CancellationToken cancellationToken = default);
IAsyncEnumerable<string> ListCollectionsAsync(CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IVectorStoreRecordCollection<TKey, TRecord> : IVectorizedSearch
/// <summary>
/// Gets the name of the collection.
/// </summary>
public string CollectionName { get; }
string CollectionName { get; }

/// <summary>
/// Checks if the collection exists in the vector store.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ public interface IExternalKernelProcessMessageChannel
/// Initialization of the external messaging channel used
/// </summary>
/// <returns>A <see cref="ValueTask"/></returns>
public abstract ValueTask Initialize();
abstract ValueTask Initialize();

/// <summary>
/// Uninitialization of the external messaging channel used
/// </summary>
/// <returns>A <see cref="ValueTask"/></returns>
public abstract ValueTask Uninitialize();
abstract ValueTask Uninitialize();

/// <summary>
/// Emits the specified event from the step outside the SK process
/// </summary>
/// <param name="externalTopicEvent">name of the topic to be used externally as the event name</param>
/// <param name="eventData">data to be transmitted externally</param>
/// <returns></returns>
public abstract Task EmitExternalEventAsync(string externalTopicEvent, object? eventData);
abstract Task EmitExternalEventAsync(string externalTopicEvent, object? eventData);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public interface IKernelProcessMessageChannel
/// </summary>
/// <param name="processEvent">The event to emit.</param>
/// <returns>A <see cref="ValueTask"/></returns>
public abstract ValueTask EmitEventAsync(KernelProcessEvent processEvent);
abstract ValueTask EmitEventAsync(KernelProcessEvent processEvent);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public static Activity SetTags(this Activity activity, ReadOnlySpan<KeyValuePair
foreach (var tag in tags)
{
activity.SetTag(tag.Key, tag.Value);
};
}
;

return activity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ public interface IFileSystemConnector
/// </summary>
/// <param name="filePath">Path to the file.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task<Stream> GetFileContentStreamAsync(string filePath, CancellationToken cancellationToken = default);
Task<Stream> GetFileContentStreamAsync(string filePath, CancellationToken cancellationToken = default);

/// <summary>
/// Get a writeable stream to an existing file.
/// </summary>
/// <param name="filePath">Path to file.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task<Stream> GetWriteableFileStreamAsync(string filePath, CancellationToken cancellationToken = default);
Task<Stream> GetWriteableFileStreamAsync(string filePath, CancellationToken cancellationToken = default);

/// <summary>
/// Create a new file and get a writeable stream to it.
/// </summary>
/// <param name="filePath">Path to file.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task<Stream> CreateFileAsync(string filePath, CancellationToken cancellationToken = default);
Task<Stream> CreateFileAsync(string filePath, CancellationToken cancellationToken = default);

/// <summary>
/// Determine whether a file exists at the specified path.
/// </summary>
/// <param name="filePath">Path to file.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>True if file exists, false otherwise.</returns>
public Task<bool> FileExistsAsync(string filePath, CancellationToken cancellationToken = default);
Task<bool> FileExistsAsync(string filePath, CancellationToken cancellationToken = default);
}
6 changes: 3 additions & 3 deletions dotnet/src/Plugins/Plugins.Document/IDocumentConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ public interface IDocumentConnector
/// </summary>
/// <param name="stream">Document stream</param>
/// <returns>String containing all text from the document.</returns>
public string ReadText(Stream stream);
string ReadText(Stream stream);

/// <summary>
/// Initialize a document from the given stream.
/// </summary>
/// <param name="stream">IO stream</param>
public void Initialize(Stream stream);
void Initialize(Stream stream);

/// <summary>
/// Append the specified text to the document.
/// </summary>
/// <param name="stream">Document stream</param>
/// <param name="text">String of text to write to the document.</param>
public void AppendText(Stream stream, string text);
void AppendText(Stream stream, string text);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface ITextToImageService : IAIService
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>Generated image contents</returns>
[Experimental("SKEXP0001")]
public Task<IReadOnlyList<ImageContent>> GetImageContentsAsync(
Task<IReadOnlyList<ImageContent>> GetImageContentsAsync(
TextContent input,
PromptExecutionSettings? executionSettings = null,
Kernel? kernel = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface ITextSearch
/// <param name="query">What to search for.</param>
/// <param name="searchOptions">Options used when executing a text search.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task<KernelSearchResults<string>> SearchAsync(
Task<KernelSearchResults<string>> SearchAsync(
string query,
TextSearchOptions? searchOptions = null,
CancellationToken cancellationToken = default);
Expand All @@ -29,7 +29,7 @@ public Task<KernelSearchResults<string>> SearchAsync(
/// <param name="query">What to search for.</param>
/// <param name="searchOptions">Options used when executing a text search.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task<KernelSearchResults<TextSearchResult>> GetTextSearchResultsAsync(
Task<KernelSearchResults<TextSearchResult>> GetTextSearchResultsAsync(
string query,
TextSearchOptions? searchOptions = null,
CancellationToken cancellationToken = default);
Expand All @@ -40,7 +40,7 @@ public Task<KernelSearchResults<TextSearchResult>> GetTextSearchResultsAsync(
/// <param name="query">What to search for.</param>
/// <param name="searchOptions">Options used when executing a text search.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task<KernelSearchResults<object>> GetSearchResultsAsync(
Task<KernelSearchResults<object>> GetSearchResultsAsync(
string query,
TextSearchOptions? searchOptions = null,
CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface ISemanticTextMemory
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use throughout the operation.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>Unique identifier of the saved memory record.</returns>
public Task<string> SaveInformationAsync(
Task<string> SaveInformationAsync(
string collection,
string text,
string id,
Expand All @@ -45,7 +45,7 @@ public Task<string> SaveInformationAsync(
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use throughout the operation.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>Unique identifier of the saved memory record.</returns>
public Task<string> SaveReferenceAsync(
Task<string> SaveReferenceAsync(
string collection,
string text,
string externalId,
Expand All @@ -66,7 +66,7 @@ public Task<string> SaveReferenceAsync(
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use throughout the operation.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>Memory record, or null when nothing is found</returns>
public Task<MemoryQueryResult?> GetAsync(string collection, string key, bool withEmbedding = false, Kernel? kernel = null, CancellationToken cancellationToken = default);
Task<MemoryQueryResult?> GetAsync(string collection, string key, bool withEmbedding = false, Kernel? kernel = null, CancellationToken cancellationToken = default);

/// <summary>
/// Remove a memory by key.
Expand All @@ -77,7 +77,7 @@ public Task<string> SaveReferenceAsync(
/// <param name="key">Unique memory record identifier.</param>
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use throughout the operation.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
public Task RemoveAsync(string collection, string key, Kernel? kernel = null, CancellationToken cancellationToken = default);
Task RemoveAsync(string collection, string key, Kernel? kernel = null, CancellationToken cancellationToken = default);

/// <summary>
/// Find some information in memory
Expand All @@ -90,7 +90,7 @@ public Task<string> SaveReferenceAsync(
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use throughout the operation.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>Memories found</returns>
public IAsyncEnumerable<MemoryQueryResult> SearchAsync(
IAsyncEnumerable<MemoryQueryResult> SearchAsync(
string collection,
string query,
int limit = 1,
Expand All @@ -105,5 +105,5 @@ public IAsyncEnumerable<MemoryQueryResult> SearchAsync(
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use throughout the operation.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>A group of collection names.</returns>
public Task<IList<string>> GetCollectionsAsync(Kernel? kernel = null, CancellationToken cancellationToken = default);
Task<IList<string>> GetCollectionsAsync(Kernel? kernel = null, CancellationToken cancellationToken = default);
}
Loading
Loading