The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community: Fix redundancy in code. (#29022)
Ashvin20a715a103e9
diff --git a/libs/community/langchain_community/llms/azureml_endpoint.py b/libs/community/langchain_community/llms/azureml_endpoint.pyindex bfe61fdbc5..c09ea2edcf 100644--- a/libs/community/langchain_community/llms/azureml_endpoint.py+++ b/libs/community/langchain_community/llms/azureml_endpoint.py@@ -434,7 +434,7 @@ class AzureMLBaseEndpoint(BaseModel):raise ValueError("`endpoint_url` should contain the full invocation URL including ""`/score` for `endpoint_api_type='dedicated'` or `/completions` "- "or `/chat/completions` or `/models/chat/completions` "+ "or `/models/chat/completions` ""for `endpoint_api_type='serverless'`")return field_value@@ -456,18 +456,16 @@ class AzureMLBaseEndpoint(BaseModel):"Endpoints of type `dedicated` should follow the format ""`https://<your-endpoint>.<your_region>.inference.ml.azure.com/score`."" If your endpoint URL ends with `/completions` or"- "`/chat/completions` or `/models/chat/completions`,"+ "`/models/chat/completions`,""use `endpoint_api_type='serverless'` instead.")if field_value == AzureMLEndpointApiType.serverless and not (endpoint_url.endswith("/completions") # type: ignore[union-attr]- or endpoint_url.endswith("/chat/completions") # type: ignore[union-attr]or endpoint_url.endswith("/models/chat/completions") # type: ignore[union-attr]):raise ValueError("Endpoints of type `serverless` should follow the format ""`https://<your-endpoint>.<your_region>.inference.ml.azure.com/completions`"- " or `https://<your-endpoint>.<your_region>.inference.ml.azure.com/chat/completions`"" or `https://<your-endpoint>.<your_region>.inference.ml.azure.com/models/chat/completions`")