-
-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
Unfortunately \Symfony\AI\Platform\Contract\JsonSchema\Factory::getTypeSchema
doesn't support for \Symfony\Component\TypeInfo\Type\UnionType
.
What I'm trying to achieve:
<?php
declare(strict_types=1);
namespace App\Agent\Application\StructuredOutput;
use Webmozart\Assert\Assert;
final class ChatStructuredOutput
{
public function __construct(
public string $title,
public string $finalAnswer,
/** @var array<int, ChartPart | TablePart | TextPart> */
public array $parts = [],
) {
Assert::allIsInstanceOf($this->parts, StructuredOutputPart::class);;
}
}
It's quite possible I'm using the structured output wrong, and I should deal with the problem differently. I'm all ears how could I make it work.
aszenz
Metadata
Metadata
Assignees
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)