Skip to content

Instantly share code, notes, and snippets.

@kristoph
kristoph / batch_scrape_failure_1.txt
Created November 4, 2024 23:50
Firecrawl: clean batch scrape result
{:formats=>["markdown", "screenshot@fullPage"], :onlyMainContent=>true, :urls=>["https://example.org", "https://www.iana.org/help/example-domains", "https://www.firecrawl.dev"]}
https://api.firecrawl.dev/v1/batch/scrape/b2451a9d-f9ec-4aa9-bfb5-aa1b37db1058
{"success":true,"status":"scraping","completed":0,"total":3,"creditsUsed":3,"expiresAt":"2024-11-05T23:47:03.000Z","next":"https://api.firecrawl.dev/v1/batch/scrape/b2451a9d-f9ec-4aa9-bfb5-aa1b37db1058?skip=0","data":[]}
https://api.firecrawl.dev/v1/batch/scrape/b2451a9d-f9ec-4aa9-bfb5-aa1b37db1058?skip=0
{"success":true,"status":"scraping","completed":0,"total":3,"creditsUsed":3,"expiresAt":"2024-11-05T23:47:03.000Z","next":"https://api.firecrawl.dev/v1/batch/scrape/b2451a9d-f9ec-4aa9-bfb5-aa1b37db1058?skip=0","data":[]}
https://api.firecrawl.dev/v1/batch/scrape/b2451a9d-f9ec-4aa9-bfb5-aa1b37db1058?skip=0
{"success":true,"status":"scraping","completed":0,"total":3,"creditsUsed":3,"expiresAt":"2024-11-05T23:47:03.000Z","next":"https://api.firecrawl.dev/v1/
@kristoph
kristoph / batch_scrape_failure_0.txt
Created November 4, 2024 17:04
Firecrawl: url of call with result from that that call
https://api.firecrawl.dev/v1/batch/scrape/e6d1cc2b-3884-4e16-b219-7fb8a155f471
{:success=>true, :status=>"scraping", :completed=>0, :total=>3, :creditsUsed=>3, :expiresAt=>"2024-11-05T17:01:42.000Z", :next=>"https://api.firecrawl.dev/v1/batch/scrape/e6d1cc2b-3884-4e16-b219-7fb8a155f471?skip=0", :data=>[]}
https://api.firecrawl.dev/v1/batch/scrape/e6d1cc2b-3884-4e16-b219-7fb8a155f471?skip=0
{:success=>true, :status=>"scraping", :completed=>0, :total=>3, :creditsUsed=>3, :expiresAt=>"2024-11-05T17:01:42.000Z", :next=>"https://api.firecrawl.dev/v1/batch/scrape/e6d1cc2b-3884-4e16-b219-7fb8a155f471?skip=0", :data=>[]}
https://api.firecrawl.dev/v1/batch/scrape/e6d1cc2b-3884-4e16-b219-7fb8a155f471?skip=0
{:success=>true, :status=>"scraping", :completed=>0, :total=>3, :creditsUsed=>3, :expiresAt=>"2024-11-05T17:01:42.000Z", :next=>"https://api.firecrawl.dev/v1/batch/scrape/e6d1cc2b-3884-4e16-b219-7fb8a155f471?skip=0", :data=>[]}
https://api.firecrawl.dev/v1/batch/scrape/e6d1cc2b-3884-4e16-b219-7fb8a155f471?skip=0
{:s
@kristoph
kristoph / request.json
Created October 31, 2024 18:48
the payload of a failing request with base64 encoded audio
{"generationConfig":{"maxOutputTokens":32,"temperature":0.0},"systemInstruction":{"role":"user","parts":[{"text":"\n You are integrated into a test platform. It is very important that you answer \n succinctly and always provide the text in the requested format without any additional \n text. \n "}]},"contents":[{"role":"user","parts":[{"text":"what is the text in the attached file?\n"},{"inline_data":{"mime_type":"audio/mp4","data":"..."}}]},{"role":"model","parts":[{"text":"this is a test\n"}]},{"role":"user","parts":[{"text":"what about this file?\n"},{"inline_data":{"mime_type":"audio/mp4","data":"AAAAHGZ0eXBNNEEgAAAAAE00QSBpc29tbXA0MgAAAAFtZGF0AAAAAAAAOYYA0EAHAOafzD835UuVG4N5w76yrrbj8+5aX3rQ4Q2/3gBwuhUnwCEHQUTlyTkEYNQnlMhQUi1DE1z7OlYBI7bIHP5bJoKDOQOWFXYXsv7po3W/G8ZQxu3n+o+t+7+XeGlDxtIi0HEey5Mtu8KFCcKvuurrOH1z9vyiz9UzvOJ8H+m44fd86G1Y7s9xPOd6v2JOhtyTZWEbuVv31gbLYWWNxEk8Ksm9aoZ/qtldfrwiV8pORrn5RNPZzPwWzY91TZ8lr/Oy2S6pZ27cZ/NJKC7ms8PvaknDK09Xhn9/TzbxWMtGfkrLnbO91rRPAk
{
"model": "together_ai/llama_31_70B_T0",
"system_prompt": null,
"prompt": "\nIn Caucasians the incidence of cystic fibrosis is about 1 in 2,000 births; but, among nonwhites the incidence is about 1 in 250,000 births. What would be the rate of incidence amongmatingsbetween Caucasians and nonwhites? If these offspring were to mate randomly among themselves, what incidence would be expected among their offspring?\n\nA) 1 in 125,000 births; 1 in 62,500 births\nB) 1 in 30,000 births; 1 in 15,000 births\nC) 1 in 4,000 births; 1 in 100,000 births\nD) 1 in 10,000 births; 1 in 20,000 births\nE) 1 in 2,000 births; 1 in 250,000 births\nF) 1 in 8,000 births; 1 in 16,000 births\nG) 1 in 60,000 births; 1 in 120,000 births\nH) 1 in 1,000 births; 1 in 5,000 births\nI) 1 in 22,000 births; 1 in 6,700 births\nJ) 1 in 16,000 births; 1 in 32,000 births\n\nYou MUST end your response with the following text:\n\n\"The answer is X.\"\n\n( where X is replaced with the letter that corresponds with your answer )",
"answer": "I"
@kristoph
kristoph / gemini-1.5-pro-002-spacing-issue.txt
Created September 26, 2024 23:55
Google Gemini 1.5 Pro 002 Space Issue
$ curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-002:generateContent?key=${GOOGLE_API_KEY}" \
-H 'Content-Type: application/json' \
--no-buffer \
-d '{ "contents":[{"parts":[{"text": "Write a story about a magic backpack."}]}]}'
{
"candidates": [
{
"content": {
"parts": [
{
@kristoph
kristoph / gist:78a203f10c23ff8f4f831bb7e85b9b9f
Created September 26, 2024 22:38
Google Generative Language API request + response example
$ curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:streamGenerateContent?alt=sse&key=${GOOGLE_API_KEY}" \
-H 'Content-Type: application/json' \
--no-buffer \
-d '{ "contents":[{"parts":[{"text": "Write a story about a magic backpack."}]}]}'
data: {"candidates": [{"content": {"parts": [{"text": "The"}],"role": "model"},"finishReason": "STOP","index": 0}],"usageMetadata": {"promptTokenCount": 8,"candidatesTokenCount": 1,"totalTokenCount": 9}}
data: {"candidates": [{"content": {"parts": [{"text": " old, dusty attic smelled of mothballs and forgotten dreams. Elias, a boy with"}],"role": "model"},"finishReason": "STOP","index": 0,"safetyRatings": [{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HATE_SPEECH","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS_CONTENT","probability": "NEGLIGIBLE"}]}],"usageMetadata": {"prom