Skip to content
Merged
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
17 changes: 11 additions & 6 deletions 01-core-implementations/python/semantic_kernel/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ async def create(self) -> str | None:
return self.id

# Otherwise, create the thread.
self.logger.debug("Creating agent thread")
logger.debug("Creating agent thread")
self._id = await self._create()
self.logger.debug("Created agent thread with id %s", self._id)
logger.debug("Created agent thread with id %s", self._id)
return self.id

async def delete(self) -> None:
Expand Down Expand Up @@ -171,7 +171,7 @@ async def on_new_message(
if self.id is None:
await self.create()

logger.debug("Thread %s received new message from role %s", self._id, new_message.role)
logger.debug("Thread %s received new message from role %s", self.id, new_message.role)
await self._on_new_message(new_message)

@abstractmethod
Expand Down Expand Up @@ -540,9 +540,14 @@ async def _notify_thread_of_new_message(
new_message: ChatMessageContent,
) -> None:
"""Notify the thread of a new message."""
logger.debug(
"Notifying thread %s of new message from role %s", thread.id, new_message.role
)
if thread.id is None:
logger.debug(
"Notifying thread with no ID of new message from role %s", new_message.role
)
else:
logger.debug(
"Notifying thread %s of new message from role %s", thread.id, new_message.role
)
await thread.on_new_message(new_message)

# endregion
Expand Down
Loading