Skip to content

Process Framework Python returning the final output. #10228

Answered by moonbox3
Nishant309 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Nishant309, thanks for your question.

We have a few concept samples showing how to get the final state from a step upon process completion. Are you able to provide some more code so I can understand your process structure? Otherwise, this is the flow:

  1. Call await process_context.get_state() to retrieve a KernelProcess object.
  2. Inspect that KernelProcess object’s .steps list to find the relevant step(s).
  3. Extract each step’s .state property (it will be a KernelProcessStepState[...]).
  4. Inside that .state, you will find your actual user-defined state (for example, StepState or CustomStepState).

Here are some code samples showing how we do that:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by moonbox3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
python Pull requests for the Python Semantic Kernel processes
2 participants