Skip to content
Discussion options

You must be logged in to vote

It’s actually possible to retrieve all the tools that were called like this (as shown in the Tools & Function Calling documentation:

foreach ($response->steps as $step) {
    if ($step->toolCalls) {
        foreach ($step->toolCalls as $toolCall) {
            echo "Tool: " . $toolCall->name . "\n";
            echo "Arguments: " . json_encode($toolCall->arguments()) . "\n";
        }
    }
}

What I was actually hoping to retrieve were the reasoning steps—like what we can see on ChatGPT—but it seems that this is not possible through the API.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by GregoireGaonach
Comment options

You must be logged in to vote
1 reply
@GregoireGaonach
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants