mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-30 10:23:30 +00:00
docs: cloudflare
update (#14779)
Added provider page. Added links, descriptions
This commit is contained in:
parent
132be82d7e
commit
1075e7d6e8
18
docs/docs/integrations/providers/cloudflare.mdx
Normal file
18
docs/docs/integrations/providers/cloudflare.mdx
Normal file
@ -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,23 +6,19 @@
|
|||||||
"id": "59428e05",
|
"id": "59428e05",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"# Text Embeddings on Cloudflare Workers AI\n",
|
"# Cloudflare Workers AI\n",
|
||||||
"\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",
|
"\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"
|
"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",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"from langchain.embeddings.cloudflare_workersai import CloudflareWorkersAIEmbeddings"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": 2,
|
||||||
@ -36,6 +32,24 @@
|
|||||||
"my_api_token = getpass.getpass(\"Enter your Cloudflare API token:\\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": 1,
|
||||||
|
"id": "92c5b61e",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from langchain.embeddings.cloudflare_workersai import CloudflareWorkersAIEmbeddings"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": 3,
|
||||||
@ -112,7 +126,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.9.18"
|
"version": "3.10.12"
|
||||||
},
|
},
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"interpreter": {
|
"interpreter": {
|
||||||
|
Loading…
Reference in New Issue
Block a user