Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous flow with semantic kernel #9176

Open
denniseng88 opened this issue Oct 9, 2024 · 7 comments
Open

Asynchronous flow with semantic kernel #9176

denniseng88 opened this issue Oct 9, 2024 · 7 comments
Labels
question Further information is requested

Comments

@denniseng88
Copy link

Hello, in some of my kernel functions, the APIs I call trigger some asynchronous operations in the background. So, I need to check the result of operations from another source. Thats why, I shouldn’t proceed to the next step until I see that the async operation’s status is ‘done.’ However, when I write my requirement, the semantic kernel suggests the steps we should follow, and naturally, it calls all the steps consecutively, which results in the next process being executed before the async operation is completed. I need to check the async operations status with a separate process and need to trigger flow again with a prompt like “continue” when it is completed. So I can’t write a kernel function for querying the result of job. In this case, what would be the best way to run the semantic kernel for this asynchronous flow? Thank you in advance.

@moonbox3
Copy link
Contributor

moonbox3 commented Oct 9, 2024

Hello @denniseng88, thanks for your question. Are you targeting .Net, Python, or Java? If you are targeting .Net, have you tried using our new Process Framework? Link: https://github.com/microsoft/semantic-kernel/tree/main/dotnet/samples/GettingStartedWithProcesses. The Python Process Framework will be launched in the coming weeks.

@mickaelropars
Copy link

mickaelropars commented Oct 9, 2024

@moonbox3 can we use the Process in .NET? or is there any major changes that will be implemented ?

@moonbox3
Copy link
Contributor

moonbox3 commented Oct 9, 2024

@mickaelropars the process framework is experimental and still under development, so please keep that in mind. We're not trying to introduce large, breaking changes, and most features should be additive. But, again, it is experimental. :)

@mickaelropars
Copy link

@moonbox3 Thanks a lot Evan, I will keep an eye on it . is it plan to mix agent and process framework? because as far as I saw it only some kernel function that are called (Maybe I didn't take into account all the process framework features).

@markwallace-microsoft
Copy link
Member

Hi @denniseng88
can you provide for details on the scenario that isn't working for you?

We have support for calling Open API endpoints which are async calls. SK will await the responses and return these to the model so it can take it's next step and potentially respond t the user. SK will detect async scenarios for function calling and also prompt rendering.

@markwallace-microsoft markwallace-microsoft added question Further information is requested and removed triage labels Oct 10, 2024
@moonbox3
Copy link
Contributor

@moonbox3 Thanks a lot Evan, I will keep an eye on it . is it plan to mix agent and process framework? because as far as I saw it only some kernel function that are called (Maybe I didn't take into account all the process framework features).

You're welcome. We are working on some process samples that will show how to include the agent framework right now and they should be ready soon. Will keep you posted.

@mickaelropars
Copy link

Marvelous

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Sprint: In Progress
Development

No branches or pull requests

4 participants