docs: Fix URL formatting in deprecation warnings (#23075)

**Description**

Updated the URLs in deprecation warning messages. The URLs were
previously written as raw strings and are now formatted to be clickable
HTML links.

Example of a broken link in the current API Reference:
https://api.python.langchain.com/en/latest/chains/langchain.chains.openai_functions.extraction.create_extraction_chain_pydantic.html

<img width="942" alt="Screenshot 2024-06-18 at 13 21 07"
src="https://github.com/langchain-ai/langchain/assets/4854600/a1b1863c-cd03-4af2-a9bc-70375407fb00">
This commit is contained in:
Artem Mukhin
2024-06-18 20:49:58 +02:00
committed by GitHub
parent c6660df58e
commit e271f75bee
9 changed files with 25 additions and 25 deletions

View File

@@ -101,7 +101,7 @@ def create_importer(
f">> from {new_module} import {name}\n"
"You can use the langchain cli to **automatically** "
"upgrade many imports. Please see documentation here "
"https://python.langchain.com/v0.2/docs/versions/v0_2/ "
"<https://python.langchain.com/v0.2/docs/versions/v0_2/>"
),
)
return result
@@ -133,7 +133,7 @@ def create_importer(
f">> from {fallback_module} import {name}\n"
"You can use the langchain cli to **automatically** "
"upgrade many imports. Please see documentation here "
"https://python.langchain.com/v0.2/docs/versions/v0_2/ "
"<https://python.langchain.com/v0.2/docs/versions/v0_2/>"
),
)
return result

View File

@@ -50,13 +50,13 @@ Passage:
"LangChain has introduced a method called `with_structured_output` that"
"is available on ChatModels capable of tool calling."
"You can read more about the method here: "
"https://python.langchain.com/docs/modules/model_io/chat/structured_output/"
"<https://python.langchain.com/docs/modules/model_io/chat/structured_output/>. "
"Please follow our extraction use case documentation for more guidelines"
"on how to do information extraction with LLMs."
"https://python.langchain.com/docs/use_cases/extraction/."
"<https://python.langchain.com/docs/use_cases/extraction/>. "
"If you notice other issues, please provide "
"feedback here:"
"https://github.com/langchain-ai/langchain/discussions/18154"
"<https://github.com/langchain-ai/langchain/discussions/18154>"
),
removal="0.3.0",
alternative=(
@@ -120,13 +120,13 @@ def create_extraction_chain(
"LangChain has introduced a method called `with_structured_output` that"
"is available on ChatModels capable of tool calling."
"You can read more about the method here: "
"https://python.langchain.com/docs/modules/model_io/chat/structured_output/"
"<https://python.langchain.com/docs/modules/model_io/chat/structured_output/>. "
"Please follow our extraction use case documentation for more guidelines"
"on how to do information extraction with LLMs."
"https://python.langchain.com/docs/use_cases/extraction/."
"<https://python.langchain.com/docs/use_cases/extraction/>. "
"If you notice other issues, please provide "
"feedback here:"
"https://github.com/langchain-ai/langchain/discussions/18154"
"<https://github.com/langchain-ai/langchain/discussions/18154>"
),
removal="0.3.0",
alternative=(

View File

@@ -20,14 +20,14 @@ If a property is not present and is not required in the function parameters, do
"LangChain has introduced a method called `with_structured_output` that"
"is available on ChatModels capable of tool calling."
"You can read more about the method here: "
"https://python.langchain.com/docs/modules/model_io/chat/structured_output/"
"<https://python.langchain.com/docs/modules/model_io/chat/structured_output/>. "
"Please follow our extraction use case documentation for more guidelines"
"on how to do information extraction with LLMs."
"https://python.langchain.com/docs/use_cases/extraction/."
"<https://python.langchain.com/docs/use_cases/extraction/>. "
"with_structured_output does not currently support a list of pydantic schemas. "
"If this is a blocker or if you notice other issues, please provide "
"feedback here:"
"https://github.com/langchain-ai/langchain/discussions/18154"
"<https://github.com/langchain-ai/langchain/discussions/18154>"
),
removal="0.3.0",
alternative=(

View File

@@ -32,13 +32,13 @@ from langchain_core.utils.function_calling import (
"LangChain has introduced a method called `with_structured_output` that "
"is available on ChatModels capable of tool calling. "
"You can read more about the method here: "
"https://python.langchain.com/docs/modules/model_io/chat/structured_output/ "
"<https://python.langchain.com/docs/modules/model_io/chat/structured_output/>. "
"Please follow our extraction use case documentation for more guidelines "
"on how to do information extraction with LLMs. "
"https://python.langchain.com/docs/use_cases/extraction/. "
"<https://python.langchain.com/docs/use_cases/extraction/>. "
"If you notice other issues, please provide "
"feedback here: "
"https://github.com/langchain-ai/langchain/discussions/18154"
"<https://github.com/langchain-ai/langchain/discussions/18154>"
),
removal="0.3.0",
alternative=(
@@ -150,13 +150,13 @@ def create_openai_fn_runnable(
"LangChain has introduced a method called `with_structured_output` that "
"is available on ChatModels capable of tool calling. "
"You can read more about the method here: "
"https://python.langchain.com/docs/modules/model_io/chat/structured_output/ "
"<https://python.langchain.com/docs/modules/model_io/chat/structured_output/>."
"Please follow our extraction use case documentation for more guidelines "
"on how to do information extraction with LLMs. "
"https://python.langchain.com/docs/use_cases/extraction/. "
"<https://python.langchain.com/docs/use_cases/extraction/>. "
"If you notice other issues, please provide "
"feedback here: "
"https://github.com/langchain-ai/langchain/discussions/18154"
"<https://github.com/langchain-ai/langchain/discussions/18154>"
),
removal="0.3.0",
alternative=(