Skip to content

Commit

Permalink
DOC: Fix SageMaker example (#4598)
Browse files Browse the repository at this point in the history
# Fix SageMaker example typing

Since #3249 a new type
`LLMContentHandler` is enforced for SageMaker Endpoints

Fixes #4168
  • Loading branch information
seanpmorgan committed May 17, 2023
1 parent e90654f commit 5372a06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/modules/models/llms/integrations/sagemaker.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"from typing import Dict\n",
"\n",
"from langchain import PromptTemplate, SagemakerEndpoint\n",
"from langchain.llms.sagemaker_endpoint import ContentHandlerBase\n",
"from langchain.llms.sagemaker_endpoint import LLMContentHandler\n",
"from langchain.chains.question_answering import load_qa_chain\n",
"import json\n",
"\n",
Expand All @@ -110,7 +110,7 @@
" template=prompt_template, input_variables=[\"context\", \"question\"]\n",
")\n",
"\n",
"class ContentHandler(ContentHandlerBase):\n",
"class ContentHandler(LLMContentHandler):\n",
" content_type = \"application/json\"\n",
" accepts = \"application/json\"\n",
"\n",
Expand Down

0 comments on commit 5372a06

Please sign in to comment.