Created
May 30, 2024 04:12
-
-
Save mizchi/65f51cbb0a4962be003f8494a63a4c3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cloudflare from "npm:cloudflare@3.2.0"; | |
const cf = new Cloudflare({ | |
apiToken: Deno.env.get('CLOUDFLARE_API_TOKEN')!, | |
}); | |
const result = await cf.workers.ai.run('@cf/baai/bge-base-en-v1.5', { | |
account_id: Deno.env.get('CLOUDFLARE_ACCOUNT_ID')!, | |
text: ['This is a story about an orange cloud'], | |
}); | |
console.log(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment