mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-23 07:57:16 +00:00
Update azureml_chat_endpoint code exemple (#11602)
- **Description:** azureml_chat_endpoint code exemple now takes endpoint_url and endpoint_api_key parameter into consideration, - **Issue:** None), - **Dependencies:** None, - **Tag maintainer:** None, - **Twitter handle:** @ElliotAlladaye
This commit is contained in:
parent
fca34eb122
commit
683f4a93b9
@ -63,7 +63,11 @@
|
|||||||
"from langchain.chat_models.azureml_endpoint import LlamaContentFormatter\n",
|
"from langchain.chat_models.azureml_endpoint import LlamaContentFormatter\n",
|
||||||
"from langchain.schema import HumanMessage\n",
|
"from langchain.schema import HumanMessage\n",
|
||||||
"\n",
|
"\n",
|
||||||
"chat = AzureMLChatOnlineEndpoint(content_formatter=LlamaContentFormatter())\n",
|
"chat = AzureMLChatOnlineEndpoint(\n",
|
||||||
|
" endpoint_url=\"https://<your-endpoint>.<your_region>.inference.ml.azure.com/score\",\n",
|
||||||
|
" endpoint_api_key=\"my-api-key\",\n",
|
||||||
|
" content_formatter=LlamaContentFormatter,\n",
|
||||||
|
"))\n",
|
||||||
"response = chat(messages=[\n",
|
"response = chat(messages=[\n",
|
||||||
" HumanMessage(content=\"Will the Collatz conjecture ever be solved?\")\n",
|
" HumanMessage(content=\"Will the Collatz conjecture ever be solved?\")\n",
|
||||||
"])\n",
|
"])\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user