Skip to content
Draft
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
3 changes: 1 addition & 2 deletions python/packages/purview/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ If blocked content must not be retained, set `store` to `False` so the framework
conversation, and attach a history provider:

```python
client = ChatClient(...)
client.chat_middleware = [PurviewChatPolicyMiddleware(credential, settings)]
client = OpenAIChatClient(middleware=[PurviewChatPolicyMiddleware(credential, settings)])

agent = Agent(
client=client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,13 @@ class PurviewChatPolicyMiddleware(ChatMiddleware):
Usage:

.. code-block:: python

from agent_framework.microsoft import PurviewChatPolicyMiddleware, PurviewSettings
from agent_framework import ChatClient
from agent_framework.openai import OpenAIChatClient

credential = ... # TokenCredential, AsyncTokenCredential, or callable
settings = PurviewSettings(app_name="My App")
client = ChatClient(..., middleware=[PurviewChatPolicyMiddleware(credential, settings)])
client = OpenAIChatClient(middleware=[PurviewChatPolicyMiddleware(credential, settings)])
"""

def __init__(
Expand Down
Loading