-
Hi When referencing a function_name in the send_event_to class, we are able to reference with an enum or a string, but when using on_function_result, we can only reference with a string. e.g. modifying the intro step from example 1 class IntroStep(KernelProcessStep):
class Functions(Enum):
printIntroMessage = "print_intro_message"
@kernel_function(name=Functions.printIntroMessage.value)
async def print_intro_message(self):
print("Welcome to Processes in Semantic Kernel.\n") This works: # Define the event that triggers the next step in the process
intro_step.on_function_result(function_name=IntroStep.Functions.printIntroMessage.value).send_event_to(
target=user_input_step
) But this doesn't: # Define the event that triggers the next step in the process
intro_step.on_function_result(function_name=IntroStep.Functions.printIntroMessage).send_event_to(
target=user_input_step
) When referencing functions in the send_event_to method, the enum is sufficient without specifying the value: process.on_input_event(event_id=ChatBotEvents.StartProcess).send_event_to(
target=intro_step,
function_name=IntroStep.Functions.printIntroMessage
) Is this intended or will we eventually be able to use enums in both instances? Thanks, |
Beta Was this translation helpful? Give feedback.
Answered by
moonbox3
Jan 28, 2025
Replies: 1 comment 1 reply
Answer selected by
moonbox3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@FredMCA handling this request in #10316