Skip to content
Open
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
12 changes: 6 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def detected_childrens_book(
"""

childrens_editor = SpecialistEditorAgent("children's books", chat_ctx=context.session._chat_ctx)
# here we are creating a ChilrensEditorAgent with the full chat history,
# here we are creating a Editor Agent specialized on children's books with the full chat history,
# as if they were there in the room with the user the whole time.
# we could also omit it and rely on the userdata to share context.

Expand All @@ -161,18 +161,18 @@ async def detected_novel(
self,
context: RunContext[StoryData],
):
"""Called when the user has provided enough information to suggest a children's book.
"""Called when the user has provided enough information to suggest a Novel.
"""

childrens_editor = SpecialistEditorAgent("novels", chat_ctx=context.session._chat_ctx)
# here we are creating a ChilrensEditorAgent with the full chat history,
novels_editor = SpecialistEditorAgent("novels", chat_ctx=context.session._chat_ctx)
# here we are creating a Editor Agent specialized on novels with the full chat history,
# as if they were there in the room with the user the whole time.
# we could also omit it and rely on the userdata to share context.

logger.info(
"switching to the children's book editor with the provided user data: %s", context.userdata
"switching to the novel book editor with the provided user data: %s", context.userdata
)
return childrens_editor, "Let's switch to the children's book editor."
return novels_editor, "Let's switch to the novel book editor."


class SpecialistEditorAgent(Agent):
Expand Down