Skip to content

Commit

Permalink
.Net: Deprecated unused filter context classes (#6017)
Browse files Browse the repository at this point in the history
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Marked unused filter context classes as `Obsolete`.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
  • Loading branch information
dmytrostruk committed Apr 27, 2024
1 parent 4af7dfc commit 1c77ad2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

Expand All @@ -9,6 +10,7 @@ namespace Microsoft.SemanticKernel;
/// Base class with data related to function invocation.
/// </summary>
[Experimental("SKEXP0001")]
[Obsolete("This class is deprecated in favor of FunctionInvocationContext class, which is used in IFunctionInvocationFilter interface.")]
public abstract class FunctionFilterContext
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Microsoft.SemanticKernel;
/// Class with data related to function after invocation.
/// </summary>
[Experimental("SKEXP0001")]
[Obsolete("This class is deprecated in favor of FunctionInvocationContext class, which is used in IFunctionInvocationFilter interface.")]
public sealed class FunctionInvokedContext : FunctionFilterContext
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.SemanticKernel;
Expand All @@ -8,6 +9,7 @@ namespace Microsoft.SemanticKernel;
/// Class with data related to function before invocation.
/// </summary>
[Experimental("SKEXP0001")]
[Obsolete("This class is deprecated in favor of FunctionInvocationContext class, which is used in IFunctionInvocationFilter interface.")]
public sealed class FunctionInvokingContext : FunctionFilterContext
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

Expand All @@ -9,6 +10,7 @@ namespace Microsoft.SemanticKernel;
/// Base class with data related to prompt rendering.
/// </summary>
[Experimental("SKEXP0001")]
[Obsolete("This class is deprecated in favor of PromptRenderContext class, which is used in IPromptRenderFilter interface.")]
public abstract class PromptFilterContext
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.SemanticKernel;
Expand All @@ -8,6 +9,7 @@ namespace Microsoft.SemanticKernel;
/// Class with data related to prompt after rendering.
/// </summary>
[Experimental("SKEXP0001")]
[Obsolete("This class is deprecated in favor of PromptRenderContext class, which is used in IPromptRenderFilter interface.")]
public sealed class PromptRenderedContext : PromptFilterContext
{
private string _renderedPrompt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.SemanticKernel;
Expand All @@ -8,6 +9,7 @@ namespace Microsoft.SemanticKernel;
/// Class with data related to prompt before rendering.
/// </summary>
[Experimental("SKEXP0001")]
[Obsolete("This class is deprecated in favor of PromptRenderContext class, which is used in IPromptRenderFilter interface.")]
public sealed class PromptRenderingContext : PromptFilterContext
{
/// <summary>
Expand Down

0 comments on commit 1c77ad2

Please sign in to comment.