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

Commit 3f5f95d

Browse files
committed
fix: profiler when using files as platform input
1 parent 9132003 commit 3f5f95d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Profiler/TraceablePlatform.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PhpLlm\LlmChainBundle\Profiler;
66

7+
use PhpLlm\LlmChain\Model\Message\Content\File;
78
use PhpLlm\LlmChain\Model\Model;
89
use PhpLlm\LlmChain\Model\Response\AsyncResponse;
910
use PhpLlm\LlmChain\Model\Response\ResponseInterface;
@@ -33,6 +34,10 @@ public function request(Model $model, array|string|object $input, array $options
3334
{
3435
$response = $this->platform->request($model, $input, $options);
3536

37+
if ($input instanceof File) {
38+
$input = get_class($input).': '.$input->getFormat();
39+
}
40+
3641
$this->calls[] = [
3742
'model' => $model,
3843
'input' => is_object($input) ? clone $input : $input,

0 commit comments

Comments
 (0)