Find answers from the community

Updated last month

Error in Workflow: Expected at Least One Tool Call

At a glance

The community member is encountering an error with the llama_index.core.workflow.errors.WorkflowRuntimeError when trying to call a tool. They have provided a code snippet that includes a UserInfo class and some related setup. The comments suggest that the community members are unsure about the dependencies being updated and that they may need to "play around with the docstring and prompt" to force the tool call.

i wonder how else i can make it call the tool...

llama_index.core.workflow.errors.WorkflowRuntimeError: Error in step 'struct': Expected at least one tool call, but got 0 tool calls.
Plain Text
class UserInfo(BaseModel):
    """
    Output containing the response. Structured information about the person.
    """
    name: str = Field(title="Full Name", description="Full name of the person")

sllm = llm_gemini.as_structured_llm(UserInfo)
        query_engine = index.as_query_engine(doc_ids=doc_ids, use_async=True, llm=sllm)

        answer = await query_engine.aquery(
            """
            Based on the context, generate a structured summary of the person.
            """
        )
W
b
L
3 comments
hey, do you have all the deps updated?
You can really force the tool call sadly. You'll need to play around with the docstring and prompt
Add a reply
Sign up and join the conversation on Discord