Skip to content

sk_function.invoke_async(input=context) seems to have an empty prompt #662

@Enteli

Description

@Enteli

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:

  1. Go to this sample
  2. Run the 6th cell
  3. 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)
  1. 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.
Screenshot 2023-04-25 at 9 23 22 PM
Desktop (please complete the following information):

  • OS: MacOSX
  • IDE: VS Code, Jupyter Notebook

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests for the Python Semantic Kernel

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions