The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs: `cloudflare` update (#14779)
Leonid Ganeline1075e7d6e8c9
diff --git a/docs/docs/integrations/providers/cloudflare.mdx b/docs/docs/integrations/providers/cloudflare.mdxnew file mode 100644index 0000000000..bbc124bb0f--- /dev/null+++ b/docs/docs/integrations/providers/cloudflare.mdx@@ -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+```diff --git a/docs/docs/integrations/text_embedding/cloudflare_workersai.ipynb b/docs/docs/integrations/text_embedding/cloudflare_workersai.ipynbindex 25c6ce9601..603ab1f381 100644--- a/docs/docs/integrations/text_embedding/cloudflare_workersai.ipynb+++ b/docs/docs/integrations/text_embedding/cloudflare_workersai.ipynb@@ -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": {