Skip to content

Commit b2298a6

Browse files
authored
Add security comments for chat clients (#6386)
1 parent c41a59c commit b2298a6

File tree

1 file changed

+5
-0
lines changed
  • src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion

1 file changed

+5
-0
lines changed

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/IChatClient.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ namespace Microsoft.Extensions.AI;
1111
/// <summary>Represents a chat client.</summary>
1212
/// <remarks>
1313
/// <para>
14+
/// Applications must consider risks such as prompt injection attacks, data sizes, and the number of messages
15+
/// sent to the underlying provider or returned from it. Unless a specific <see cref="IChatClient"/> implementation
16+
/// explicitly documents safeguards for these concerns, the application is expected to implement appropriate protections.
17+
/// </para>
18+
/// <para>
1419
/// Unless otherwise specified, all members of <see cref="IChatClient"/> are thread-safe for concurrent use.
1520
/// It is expected that all implementations of <see cref="IChatClient"/> support being used by multiple requests concurrently.
1621
/// Instances must not be disposed of while the instance is still in use.

0 commit comments

Comments
 (0)