-
Notifications
You must be signed in to change notification settings - Fork 16k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The [provider page](https://python.langchain.com/docs/integrations/providers/alibabacloud_opensearch) holds the vector store information. The [Chat example](https://python.langchain.com/docs/integrations/chat/pai_eas_chat_endpoint) was incorrectly sorted in the navbar because of the wrong file name. - Recreated a provide page - Added missed links and descriptions - Compound information about vector store from two pages into one - Fixed file name
- Loading branch information
Showing
5 changed files
with
121 additions
and
53 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
30 changes: 0 additions & 30 deletions
30
docs/docs/integrations/providers/alibabacloud_opensearch.md
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [[email protected]]([email protected]), 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 | ||
} | ||
} |
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