mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-29 09:58:44 +00:00
Fix Sagemaker Endpoint documentation (#13660)
- **Description:** fixed the transform_input method in the example., - **Issue:** example didn't work, - **Dependencies:** None, - **Tag maintainer:** @baskaryan, - **Twitter handle:** @Ravidhu87
This commit is contained in:
parent
9f9cb71d26
commit
224aa5151d
@ -141,7 +141,7 @@
|
||||
" accepts = \"application/json\"\n",
|
||||
"\n",
|
||||
" def transform_input(self, prompt: str, model_kwargs: Dict) -> bytes:\n",
|
||||
" input_str = json.dumps({prompt: prompt, **model_kwargs})\n",
|
||||
" input_str = json.dumps({\"inputs\": prompt, \"parameters\": model_kwargs})\n",
|
||||
" return input_str.encode(\"utf-8\")\n",
|
||||
"\n",
|
||||
" def transform_output(self, output: bytes) -> str:\n",
|
||||
@ -197,7 +197,7 @@
|
||||
" accepts = \"application/json\"\n",
|
||||
"\n",
|
||||
" def transform_input(self, prompt: str, model_kwargs: Dict) -> bytes:\n",
|
||||
" input_str = json.dumps({prompt: prompt, **model_kwargs})\n",
|
||||
" input_str = json.dumps({\"inputs\": prompt, \"parameters\": model_kwargs})\n",
|
||||
" return input_str.encode(\"utf-8\")\n",
|
||||
"\n",
|
||||
" def transform_output(self, output: bytes) -> str:\n",
|
||||
|
Loading…
Reference in New Issue
Block a user