Spaces:
Sleeping
Sleeping
Download apps/ruby-sdk/lib/firecrawl/models/agent_status_response.rb from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 559 Bytes
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/ruby-sdk/lib/firecrawl/models/agent_status_response.rb
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/ruby-sdk/lib/firecrawl/models/agent_status_response.rb
-
curl -L -o agent_status_response.rb https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/ruby-sdk/lib/firecrawl/models/agent_status_response.rb
559 Bytes
| # frozen_string_literal: true | |
| module Firecrawl | |
| module Models | |
| # Status response for monitoring agent tasks. | |
| class AgentStatusResponse | |
| attr_reader :status, :data, :credits_used, :expires_at | |
| def initialize(raw) | |
| @status = raw["status"] | |
| @data = raw["data"] | |
| @credits_used = raw["creditsUsed"] | |
| @expires_at = raw["expiresAt"] | |
| end | |
| def done? | |
| %w[completed failed cancelled].include?(status) | |
| end | |
| def to_s | |
| "AgentStatusResponse{status=#{status}}" | |
| end | |
| end | |
| end | |
| end | |