Skip to content

Commit

Permalink
undo mutable sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
eavanvalkenburg committed Jan 27, 2025
1 parent b2a9a46 commit c59a2bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/semantic_kernel/contents/chat_history.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft. All rights reserved.

import logging
from collections.abc import Generator, Iterable, MutableSequence
from collections.abc import Generator, Iterable
from functools import singledispatchmethod
from html import unescape
from typing import Any, TypeVar
Expand Down Expand Up @@ -33,7 +33,7 @@ class ChatHistory(KernelBaseModel):
messages: The list of chat messages in the history.
"""

messages: MutableSequence[ChatMessageContent]
messages: list[ChatMessageContent]

def __init__(self, **data: Any):
"""Initializes a new instance of the ChatHistory class.
Expand Down Expand Up @@ -74,7 +74,7 @@ def __init__(self, **data: Any):

@field_validator("messages", mode="before")
@classmethod
def _validate_messages(cls, messages: MutableSequence[ChatMessageContent]) -> MutableSequence[ChatMessageContent]:
def _validate_messages(cls, messages: list[ChatMessageContent]) -> list[ChatMessageContent]:
if not messages:
return messages
out_msgs: list[ChatMessageContent] = []
Expand Down

0 comments on commit c59a2bc

Please sign in to comment.