docs: `cloudflare` update (#14779)

Added provider page.
Added links, descriptions
pull/14784/head
Leonid Ganeline 10 months ago committed by GitHub
parent 132be82d7e
commit 1075e7d6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,18 @@
# Cloudflare
>[Cloudflare, Inc. (Wikipedia)](https://en.wikipedia.org/wiki/Cloudflare) is an American company that provides
> content delivery network services, cloud cybersecurity, DDoS mitigation, and ICANN-accredited
> domain registration services.
>[Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/) allows you to run machine
> learning models, on the `Cloudflare` network, from your code via REST API.
## Embedding models
See [installation instructions and usage example](/docs/integrations/text_embedding/cloudflare_workersai).
```python
from langchain.embeddings.cloudflare_workersai import CloudflareWorkersAIEmbeddings
```

@ -6,34 +6,48 @@
"id": "59428e05",
"metadata": {},
"source": [
"# Text Embeddings on Cloudflare Workers AI\n",
"# Cloudflare Workers AI\n",
"\n",
"[Cloudflare AI document](https://developers.cloudflare.com/workers-ai/models/text-embeddings/) listed all text embeddings models available.\n",
">[Cloudflare, Inc. (Wikipedia)](https://en.wikipedia.org/wiki/Cloudflare) is an American company that provides content delivery network services, cloud cybersecurity, DDoS mitigation, and ICANN-accredited domain registration services.\n",
"\n",
">[Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/) allows you to run machine learning models, on the `Cloudflare` network, from your code via REST API.\n",
"\n",
">[Cloudflare AI document](https://developers.cloudflare.com/workers-ai/models/text-embeddings/) listed all text embeddings models available.\n",
"\n",
"## Setting up\n",
"\n",
"Both Cloudflare account ID and API token are required. Find how to obtain them from [this document](https://developers.cloudflare.com/workers-ai/get-started/rest-api/).\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "92c5b61e",
"execution_count": 2,
"id": "f60023b8",
"metadata": {},
"outputs": [],
"source": [
"from langchain.embeddings.cloudflare_workersai import CloudflareWorkersAIEmbeddings"
"import getpass\n",
"\n",
"my_account_id = getpass.getpass(\"Enter your Cloudflare account ID:\\n\\n\")\n",
"my_api_token = getpass.getpass(\"Enter your Cloudflare API token:\\n\\n\")"
]
},
{
"cell_type": "markdown",
"id": "1c94b531-f5a6-4eea-9f08-a85e9d3bff28",
"metadata": {},
"source": [
"## Example"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "f60023b8",
"execution_count": 1,
"id": "92c5b61e",
"metadata": {},
"outputs": [],
"source": [
"import getpass\n",
"\n",
"my_account_id = getpass.getpass(\"Enter your Cloudflare account ID:\\n\\n\")\n",
"my_api_token = getpass.getpass(\"Enter your Cloudflare API token:\\n\\n\")"
"from langchain.embeddings.cloudflare_workersai import CloudflareWorkersAIEmbeddings"
]
},
{
@ -112,7 +126,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.10.12"
},
"vscode": {
"interpreter": {

Loading…
Cancel
Save