diff --git a/docs/docs/integrations/chat/pai_eas_chat_endpoint.ipynb b/docs/docs/integrations/chat/alibaba_cloud_pai_eas.ipynb similarity index 54% rename from docs/docs/integrations/chat/pai_eas_chat_endpoint.ipynb rename to docs/docs/integrations/chat/alibaba_cloud_pai_eas.ipynb index 7a93f92271..f24bf8a027 100644 --- a/docs/docs/integrations/chat/pai_eas_chat_endpoint.ipynb +++ b/docs/docs/integrations/chat/alibaba_cloud_pai_eas.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "---\n", - "sidebar_label: AliCloud PAI EAS\n", + "sidebar_label: Alibaba Cloud PAI EAS\n", "---" ] }, @@ -13,23 +13,29 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# PaiEasChatEndpoint\n", - "Machine Learning Platform for AI of Alibaba Cloud is a machine learning or deep learning engineering platform intended for enterprises and developers. It provides easy-to-use, cost-effective, high-performance, and easy-to-scale plug-ins that can be applied to various industry scenarios. With over 140 built-in optimization algorithms, Machine Learning Platform for AI provides whole-process AI engineering capabilities including data labeling (PAI-iTAG), model building (PAI-Designer and PAI-DSW), model training (PAI-DLC), compilation optimization, and inference deployment (PAI-EAS). PAI-EAS supports different types of hardware resources, including CPUs and GPUs, and features high throughput and low latency. It allows you to deploy large-scale complex models with a few clicks and perform elastic scale-ins and scale-outs in real time. It also provides a comprehensive O&M and monitoring system." + "# Alibaba Cloud PAI EAS\n", + "\n", + ">[Alibaba Cloud PAI (Platform for AI)](https://www.alibabacloud.com/help/en/pai/?spm=a2c63.p38356.0.0.c26a426ckrxUwZ) is a lightweight and cost-efficient machine learning platform that uses cloud-native technologies. It provides you with an end-to-end modelling service. It accelerates model training based on tens of billions of features and hundreds of billions of samples in more than 100 scenarios.\n", + "\n", + ">[Machine Learning Platform for AI of Alibaba Cloud](https://www.alibabacloud.com/help/en/machine-learning-platform-for-ai/latest/what-is-machine-learning-pai) is a machine learning or deep learning engineering platform intended for enterprises and developers. It provides easy-to-use, cost-effective, high-performance, and easy-to-scale plug-ins that can be applied to various industry scenarios. With over 140 built-in optimization algorithms, `Machine Learning Platform for AI` provides whole-process AI engineering capabilities including data labelling (`PAI-iTAG`), model building (`PAI-Designer` and `PAI-DSW`), model training (`PAI-DLC`), compilation optimization, and inference deployment (`PAI-EAS`).\n", + ">\n", + ">`PAI-EAS` supports different types of hardware resources, including CPUs and GPUs, and features high throughput and low latency. It allows you to deploy large-scale complex models with a few clicks and perform elastic scale-ins and scale-outs in real-time. It also provides a comprehensive O&M and monitoring system." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Setup Eas Service\n", + "## Setup EAS Service\n", "\n", - "One who want to use eas llms must set up eas service first. When the eas service is launched, eas_service_rul and eas_service token can be got. Users can refer to https://www.alibabacloud.com/help/en/pai/user-guide/service-deployment/ for more information. Try to set environment variables to init eas service url and token:\n", + "Set up environment variables to init EAS service URL and token.\n", + "Use [this document](https://www.alibabacloud.com/help/en/pai/user-guide/service-deployment/) for more information.\n", "\n", - "```base\n", + "```bash\n", "export EAS_SERVICE_URL=XXX\n", "export EAS_SERVICE_TOKEN=XXX\n", "```\n", - "or run as follow codes:" + "Another option is to use this code:" ] }, { @@ -56,7 +62,8 @@ "metadata": {}, "source": [ "## Run Chat Model\n", - "You can use the default settings to call eas service as follows:" + "\n", + "You can use the default settings to call EAS service as follows:" ] }, { @@ -73,7 +80,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Or, call eas service with new inference params:" + "Or, call EAS service with new inference params:" ] }, { @@ -108,7 +115,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -122,10 +129,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" - }, - "orig_nbformat": 4 + "version": "3.10.12" + } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/docs/docs/integrations/providers/alibaba_cloud.mdx b/docs/docs/integrations/providers/alibaba_cloud.mdx new file mode 100644 index 0000000000..e2ccdc08b1 --- /dev/null +++ b/docs/docs/integrations/providers/alibaba_cloud.mdx @@ -0,0 +1,35 @@ +# Alibaba Cloud + +>[Alibaba Group Holding Limited (Wikipedia)](https://en.wikipedia.org/wiki/Alibaba_Group), or `Alibaba` +> (Chinese: 阿里巴巴), is a Chinese multinational technology company specializing in e-commerce, retail, +> Internet, and technology. +> +> [Alibaba Cloud (Wikipedia)](https://en.wikipedia.org/wiki/Alibaba_Cloud), also known as `Aliyun` +> (Chinese: 阿里云; pinyin: Ālǐyún; lit. 'Ali Cloud'), is a cloud computing company, a subsidiary +> of `Alibaba Group`. `Alibaba Cloud` provides cloud computing services to online businesses and +> Alibaba's own e-commerce ecosystem. + + +## Chat Model + +See [installation instructions and a usage example](/docs/integrations/chat/alibaba_cloud_pai_eas). + +```python +from langchain.chat_models import PaiEasChatEndpoint +``` + +## Vectorstore + +See [installation instructions and a usage example](/docs/integrations/vectorstores/alibabacloud_opensearch). + +```python +from langchain.vectorstores import AlibabaCloudOpenSearch, AlibabaCloudOpenSearchSettings +``` + +## Document Loader + +See [installation instructions and a usage example](/docs/integrations/document_loaders/alibaba_cloud_maxcompute). + +```python +from langchain.document_loaders import MaxComputeLoader +``` diff --git a/docs/docs/integrations/providers/alibabacloud_opensearch.md b/docs/docs/integrations/providers/alibabacloud_opensearch.md deleted file mode 100644 index 702286b118..0000000000 --- a/docs/docs/integrations/providers/alibabacloud_opensearch.md +++ /dev/null @@ -1,30 +0,0 @@ -# Alibaba Cloud Opensearch - -[Alibaba Cloud Opensearch](https://www.alibabacloud.com/product/opensearch) OpenSearch is a one-stop platform to develop intelligent search services. OpenSearch was built based on the large-scale distributed search engine developed by Alibaba. OpenSearch serves more than 500 business cases in Alibaba Group and thousands of Alibaba Cloud customers. OpenSearch helps develop search services in different search scenarios, including e-commerce, O2O, multimedia, the content industry, communities and forums, and big data query in enterprises. - -OpenSearch helps you develop high quality, maintenance-free, and high performance intelligent search services to provide your users with high search efficiency and accuracy. - -OpenSearch provides the vector search feature. In specific scenarios,especially in question retrieval and image search scenarios, you can use the vector search feature together with the multimodal search feature to improve the accuracy of search results. - -## Purchase an instance and configure it - -- Purchase OpenSearch Vector Search Edition from [Alibaba Cloud](https://opensearch.console.aliyun.com) and configure the instance according to the help [documentation](https://help.aliyun.com/document_detail/463198.html?spm=a2c4g.465092.0.0.2cd15002hdwavO). - -## Alibaba Cloud Opensearch Vector Store Wrappers -supported functions: -- `add_texts` -- `add_documents` -- `from_texts` -- `from_documents` -- `similarity_search` -- `asimilarity_search` -- `similarity_search_by_vector` -- `asimilarity_search_by_vector` -- `similarity_search_with_relevance_scores` -- `delete_doc_by_texts` - - -For a more detailed walk through of the Alibaba Cloud OpenSearch wrapper, see [this notebook](/docs/integrations/vectorstores/alibabacloud_opensearch) - -If you encounter any problems during use, please feel free to contact [xingshaomin.xsm@alibaba-inc.com](xingshaomin.xsm@alibaba-inc.com) , and we will do our best to provide you with assistance and support. - diff --git a/docs/docs/integrations/vectorstores/alibabacloud_opensearch.ipynb b/docs/docs/integrations/vectorstores/alibabacloud_opensearch.ipynb index 70a1c5be04..a06d97e910 100644 --- a/docs/docs/integrations/vectorstores/alibabacloud_opensearch.ipynb +++ b/docs/docs/integrations/vectorstores/alibabacloud_opensearch.ipynb @@ -8,20 +8,53 @@ "\n", ">[Alibaba Cloud Opensearch](https://www.alibabacloud.com/product/opensearch) is a one-stop platform to develop intelligent search services. `OpenSearch` was built on the large-scale distributed search engine developed by `Alibaba`. `OpenSearch` serves more than 500 business cases in Alibaba Group and thousands of Alibaba Cloud customers. `OpenSearch` helps develop search services in different search scenarios, including e-commerce, O2O, multimedia, the content industry, communities and forums, and big data query in enterprises.\n", "\n", - ">`OpenSearch` helps you develop high quality, maintenance-free, and high performance intelligent search services to provide your users with high search efficiency and accuracy.\n", + ">`OpenSearch` helps you develop high-quality, maintenance-free, and high-performance intelligent search services to provide your users with high search efficiency and accuracy.\n", "\n", ">`OpenSearch` provides the vector search feature. In specific scenarios, especially test question search and image search scenarios, you can use the vector search feature together with the multimodal search feature to improve the accuracy of search results.\n", "\n", - "This notebook shows how to use functionality related to the `Alibaba Cloud OpenSearch Vector Search Edition`.\n", - "To run, you should have an [OpenSearch Vector Search Edition](https://opensearch.console.aliyun.com) instance up and running:\n", + "This notebook shows how to use functionality related to the `Alibaba Cloud OpenSearch Vector Search Edition`." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setting up\n", + "\n", + "\n", + "### Purchase an instance and configure it\n", + "\n", + "Purchase OpenSearch Vector Search Edition from [Alibaba Cloud](https://opensearch.console.aliyun.com) and configure the instance according to the help [documentation](https://help.aliyun.com/document_detail/463198.html?spm=a2c4g.465092.0.0.2cd15002hdwavO).\n", "\n", - "Read the [help document](https://www.alibabacloud.com/help/en/opensearch/latest/vector-search) to quickly familiarize and configure OpenSearch Vector Search Edition instance." + "To run, you should have an [OpenSearch Vector Search Edition](https://opensearch.console.aliyun.com) instance up and running.\n", + "\n", + " \n", + "### Alibaba Cloud OpenSearch Vector Store class\n", + " `AlibabaCloudOpenSearch` class supports functions:\n", + "- `add_texts`\n", + "- `add_documents`\n", + "- `from_texts`\n", + "- `from_documents`\n", + "- `similarity_search`\n", + "- `asimilarity_search`\n", + "- `similarity_search_by_vector`\n", + "- `asimilarity_search_by_vector`\n", + "- `similarity_search_with_relevance_scores`\n", + "- `delete_doc_by_texts`\n", + "\n", + "\n", + "Read the [help document](https://www.alibabacloud.com/help/en/opensearch/latest/vector-search) to quickly familiarize and configure OpenSearch Vector Search Edition instance.\n", + "\n", + "If you encounter any problems during use, please feel free to contact [xingshaomin.xsm@alibaba-inc.com](xingshaomin.xsm@alibaba-inc.com), and we will do our best to provide you with assistance and support." ] }, { "cell_type": "markdown", "metadata": { - "collapsed": false + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } }, "source": [ "After the instance is up and running, follow these steps to split documents, get embeddings, connect to the alibaba cloud opensearch instance, index documents, and perform vector retrieval." @@ -30,7 +63,10 @@ { "cell_type": "markdown", "metadata": { - "collapsed": false + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } }, "source": [ "We need to install the following Python packages first." @@ -48,7 +84,10 @@ { "cell_type": "markdown", "metadata": { - "collapsed": false + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } }, "source": [ "We want to use `OpenAIEmbeddings` so we have to get the OpenAI API Key." @@ -59,6 +98,9 @@ "execution_count": null, "metadata": { "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, "pycharm": { "name": "#%%\n" } @@ -71,6 +113,13 @@ "os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(\"OpenAI API Key:\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example" + ] + }, { "cell_type": "code", "execution_count": null, @@ -359,9 +408,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.6" + "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/docs/vercel.json b/docs/vercel.json index 56b05d1fdb..e80e5f8972 100644 --- a/docs/vercel.json +++ b/docs/vercel.json @@ -1,5 +1,13 @@ { "redirects": [ + { + "source": "docs/docs/integrations/providers/alibabacloud_opensearch", + "destination": "docs/docs/integrations/providers/alibaba_cloud" + }, + { + "source": "/docs/integrations/chat/pai_eas_chat_endpoint", + "destination": "/docs/integrations/chat/alibaba_cloud_pai_eas" + }, { "source": "/docs/integrations/providers/tencentvectordb", "destination": "/docs/integrations/providers/tencent"