}> */ final class ThreadRunResponseToolFunctionFunction implements ResponseContract { /** * @use ArrayAccessible}> */ use ArrayAccessible; use Fakeable; /** * @param array $parameters */ private function __construct( public string $name, public string $description, public array $parameters, ) { } /** * Acts as static factory, and returns a new Response instance. * * @param array{description: string, name: string, parameters: array} $attributes */ public static function from(array $attributes): self { return new self( $attributes['name'], $attributes['description'], $attributes['parameters'], ); } /** * {@inheritDoc} */ public function toArray(): array { return [ 'name' => $this->name, 'description' => $this->description, 'parameters' => $this->parameters, ]; } }