This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Description
In my case I craft a dedicated response like:
and I don't want to feed it back to the LLM for another roundtrip.
That happens here (in Line 55):
|
while ($output->response instanceof ToolCallResponse) { |
|
$toolCalls = $output->response->getContent(); |
|
$messages[] = Message::ofAssistant(toolCalls: $toolCalls); |
|
|
|
foreach ($toolCalls as $toolCall) { |
|
$result = $this->toolBox->execute($toolCall); |
|
$messages[] = Message::ofToolCall($toolCall, $result); |
|
} |
|
|
|
$output->response = $this->chain->call($messages, $output->options); |
I think we should not make it configurable like "Tool A will always feed back to the API", because it can depend on runtime. Maybe a ToolResponse class as an additional allowed return type?
Dummy-code
new class ToolResponse {
value: string, float etc.
callLlm: yes/no
}