Spaces:
Sleeping
Sleeping
Download apps/php-sdk/src/Models/AgentOptions.php from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 1.82 kB
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/php-sdk/src/Models/AgentOptions.php
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/php-sdk/src/Models/AgentOptions.php
-
curl -L -o AgentOptions.php https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/php-sdk/src/Models/AgentOptions.php
1.82 kB
| declare(strict_types=1); | |
| namespace Firecrawl\Models; | |
| final class AgentOptions | |
| { | |
| /** | |
| * @param list<string>|null $urls | |
| * @param array<string, mixed>|null $schema | |
| */ | |
| private function __construct( | |
| private readonly ?array $urls = null, | |
| private readonly ?string $prompt = null, | |
| private readonly ?array $schema = null, | |
| private readonly ?string $integration = null, | |
| private readonly ?int $maxCredits = null, | |
| private readonly ?bool $strictConstrainToURLs = null, | |
| private readonly ?string $model = null, | |
| private readonly ?WebhookConfig $webhook = null, | |
| ) {} | |
| /** | |
| * @param list<string>|null $urls | |
| * @param array<string, mixed>|null $schema | |
| */ | |
| public static function with( | |
| ?array $urls = null, | |
| ?string $prompt = null, | |
| ?array $schema = null, | |
| ?string $integration = null, | |
| ?int $maxCredits = null, | |
| ?bool $strictConstrainToURLs = null, | |
| ?string $model = null, | |
| ?WebhookConfig $webhook = null, | |
| ): self { | |
| return new self( | |
| $urls, $prompt, $schema, $integration, | |
| $maxCredits, $strictConstrainToURLs, $model, $webhook, | |
| ); | |
| } | |
| /** @return array<string, mixed> */ | |
| public function toArray(): array | |
| { | |
| $fields = [ | |
| 'urls' => $this->urls, | |
| 'prompt' => $this->prompt, | |
| 'schema' => $this->schema, | |
| 'integration' => $this->integration, | |
| 'maxCredits' => $this->maxCredits, | |
| 'strictConstrainToURLs' => $this->strictConstrainToURLs, | |
| 'model' => $this->model, | |
| 'webhook' => $this->webhook?->toArray(), | |
| ]; | |
| return array_filter($fields, fn (mixed $v): bool => $v !== null); | |
| } | |
| } | |