Get token usage when using self hosted version #1745
Unanswered
Edwin-Luijten
asked this question in
Forums - Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am calling the API of the container on this endpoint:
http://localhost:11235/crawlUsing this model:
gemini/gemini-2.0-flash-liteThis is the request:
{ "urls": [], "browser_config": { "type": "BrowserConfig", "params": { "headless": true } }, "crawler_config": { "type": "CrawlerRunConfig", "params": { "session_id": "", "stream": false, "cache_mode": "BYPASS", "scan_full_page": true, "wait_until": "domcontentloaded", "extraction_strategy": { "type": "LLMExtractionStrategy", "params": { "extraction_type": "schema", "instruction": "", "llm_config": { "params": { "api_token": "", "provider": "gemini/gemini-2.0-flash-lite" }, "type": "LLMConfig" }, "schema": { "properties": {} } } }, "word_count_threshold": 0, "capture_console_messages": true, "js_code": [], "pdf": false } }, "crawler_strategy": null }Which returns a successful crawl but is missing token usage, see below the raw response (removed all website content information).
{ "success": true, "results": [ { "url": "", "html": "", "fit_html": "", "success": true, "cleaned_html": "", "media": { "images": [], "videos": [], "audios": [] }, "links": { "internal": [], "external": [] }, "downloaded_files": null, "js_execution_result": null, "screenshot": null, "pdf": null, "mhtml": null, "extracted_content": "", "metadata": {}, "error_message": "", "session_id": null, "response_headers": {}, "status_code": 200, "ssl_certificate": null, "dispatch_result": null, "redirected_url": "", "network_requests": null, "console_messages": null, "tables": [], "markdown": {} } ], "server_processing_time_s": 38.860623359680176, "server_memory_delta_mb": 0.0, "server_peak_memory_mb": 320.75390625 }Is it even possible when using this method?
Beta Was this translation helpful? Give feedback.
All reactions