Update SageMaker Endpoint Embeddings docs to be up to date with current requirements (#8103)

- **Description:** Simple change of the Class that ContentHandler
inherits from. To create an object of type SagemakerEndpointEmbeddings,
the property content_handler must be of type EmbeddingsContentHandler
not ContentHandlerBase anymore,
  - **Twitter handle:** @Juanjo_Torres11

Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
Juan José Torres 2023-07-24 15:35:06 -05:00 committed by GitHub
parent 7cbe28ba9b
commit 1cc7d4c9eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,11 +39,11 @@
"source": [ "source": [
"from typing import Dict, List\n", "from typing import Dict, List\n",
"from langchain.embeddings import SagemakerEndpointEmbeddings\n", "from langchain.embeddings import SagemakerEndpointEmbeddings\n",
"from langchain.llms.sagemaker_endpoint import ContentHandlerBase\n", "from langchain.embeddings.sagemaker_endpoint import EmbeddingsContentHandler\n",
"import json\n", "import json\n",
"\n", "\n",
"\n", "\n",
"class ContentHandler(ContentHandlerBase):\n", "class ContentHandler(EmbeddingsContentHandler):\n",
" content_type = \"application/json\"\n", " content_type = \"application/json\"\n",
" accepts = \"application/json\"\n", " accepts = \"application/json\"\n",
"\n", "\n",