Skip to content

[Question]: why the second reponse is empty? #20263

@codeh2o

Description

@codeh2o

Question Validation

  • I have searched both the documentation and discord for an answer.

Question

workflow = FunctionAgent(
    llm=llm,
    system_prompt="You are an  assistant"
)

ctx = Context(workflow)


async def main():
    response = await workflow.run(user_msg="Hi, my name is Laurie!", ctx=ctx)
    print("first response:", response)
    response2 = await workflow.run(user_msg="what's my name?", ctx=ctx)
    print("second response:", response2)


if __name__ == '__main__':
    asyncio.run(main())

the response is

first response: Hello Laurie! It's nice to meet you. How can I assist you today? Is there anything specific you'd like to chat about or any questions you have?
second response: 

Process finished with exit code 0

https://developers.llamaindex.ai/python/framework/understanding/agent/state/

as the documenation shown,the second response what I expect is

Your name is Laurie!

but it is empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions