sk_function.invoke_async(input=context) seems to have an empty prompt
Describe the bug
When running this sample, the notebook cell below always returns Hi there! What would you like to talk about? as if the prompt is empty no matter what the user_input is set to
context["user_input"] = "Hi, I'm looking for book suggestions"
bot_answer = await chat_function.invoke_async(input=context)
print(bot_answer)
On the other hand, this works as expected
context["user_input"] = "Hi, I'm looking for book suggestions"
bot_answer = await kernel.run_on_vars_async(context, chat_function)
print(bot_answer)
Therefore something is not right with invoke_async()
To Reproduce Steps to reproduce the behavior:
- Go to this sample
- Run the 6th cell
- Scroll down to
context["user_input"] = "Hi, I'm looking for book suggestions"
bot_answer = await chat_function.invoke_async(input=context)
print(bot_answer)
- See the output always being "Hi, I'm looking for book suggestions" no matter what the user_input is set to
Expected behavior An output changing in relation with the user_input
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MacOSX
- IDE: VS Code, Jupyter Notebook
Additional context Add any other context about the problem here.
Known issue! A few things, make sure you have the latest code and latest pip. We don't have the run_on_vars_async anymore.
For this example invoke_async needs to be called with variables=context
so chat_function.invoke_async(variables=context)
Will update the notebooks soon with this!
Closed by https://github.com/microsoft/semantic-kernel/pull/672
Closing due to #672 being done.