Skip to content

Commit a806b22

Browse files
committed
[Agent] Update Platform tool docblock and fix parameter name
- Removed ElevenLabs reference from docblock example - Updated example to use gpt-4o/gpt-4o-mini scenario - Fixed parameter name from $message to $input to match signature
1 parent ad6722d commit a806b22

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/agent/src/Toolbox/Tool/Platform.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
/**
1717
* Wraps a Platform instance as a tool, allowing agents to use specialized platforms for specific tasks.
1818
*
19-
* This enables scenarios where an agent using one platform (e.g., OpenAI) can leverage
20-
* another platform (e.g., ElevenLabs for speech-to-text) as a tool.
19+
* This enables scenarios where an agent can leverage different models or platforms
20+
* as tools (e.g., using gpt-4o for complex calculations while using gpt-4o-mini for the main agent).
2121
*
2222
* @author Oskar Stark <[email protected]>
2323
*/
@@ -34,13 +34,13 @@ public function __construct(
3434
}
3535

3636
/**
37-
* @param string $message the message to pass to the chain
37+
* @param array<mixed>|string|object $input the input to pass to the platform
3838
*/
39-
public function __invoke(string $message): string
39+
public function __invoke(array|string|object $input): string
4040
{
4141
return $this->platform->invoke(
4242
$this->model,
43-
$message,
43+
$input,
4444
$this->options,
4545
)->asText();
4646
}

0 commit comments

Comments
 (0)