with FireCrawl and AI/ML API?
Crawls a given URL and returns the contents of sub-pages. See the documentation
Extract structured data from one or multiple URLs. See the documentation
Obtains the status and data from a previous crawl operation. See the documentation
Obtains the status and data from a previous extract operation. See the documentation
Maps a given URL using Firecrawl's Map endpoint. Optionally, you can provide a search term to filter the mapping. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    firecrawl: {
      type: "app",
      app: "firecrawl",
    }
  },
  async run({steps, $}) {
    const data = {
      "url": "https://pipedream.com",
    }
    return await axios($, {
      method: "post",
      url: `https://api.firecrawl.dev/v0/crawl`,
      headers: {
        Authorization: `Bearer ${this.firecrawl.$auth.api_key}`,
      },
      data,
    })
  },
})
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    ai_ml_api: {
      type: "app",
      app: "ai_ml_api",
    }
  },
  async run({steps, $}) {
    const data = {
          "model": "mistralai/Mistral-7B-v0.1",
          "messages":  [
            {
                "role": "system",
                "content": "You are an AI assistant who knows everything.",
            },
            {
                "role": "user",
                "content": "Tell me, why is the sky blue?"
            },
        ]
    }
    return await axios($, {
      method: "POST",
      url: `https://api.aimlapi.com/chat/completions`,
      headers: {
        Authorization: `Bearer ${this.ai_ml_api.$auth.api_key}`,
      },
      data,
    })
  },
})