Skip to content

Functions are never called #25

@evekeen

Description

@evekeen

I have an assistant with tools configured for a custom function. I've added debug, and I can see that the SDK receives different message types, however, there is never a "functionCall" there despite correctly receiving the tool_calls and even a conversation update with role="tool".

>> Received app message: speechUpdate
>> Received app message: transcript
>> Received app message: transcript
>> Received app message: conversationUpdate

{
    "role": "assistant",
    "content": "That's great.",
    "tool_calls":
    [
        {
            "type": "function",
            "id": "toolu_bdrk_0189gPszqD5ZombmVgS5z41f",
            "function":
            {
                "name": "start_exercise",
                "arguments": "{}"
            }
        }
    ]
}

>> Received app message: speechUpdate
>> Received app message: speechUpdate
>> Received app message: transcript
>> Received app message: conversationUpdate
>> Received app message: transcript
>> Received app message: conversationUpdate

{
    "role": "tool",
    "tool_call_id": "toolu_bdrk_0189gPszqD5ZombmVgS5z41f",
    "content": "Tool Result Still Pending But Proceed Further If Possible."
}

>> Received app message: transcript
>> Received app message: transcript
>> Received app message: transcript
>> Received app message: transcript
>> Received app message: conversationUpdate

Moreover, I had to change the ConversationUpdate type to support the "tool" role; otherwise, the JSON parsing would fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions