mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-28 06:48:50 +00:00
core[patch]: update docstrings (#26241)
This commit is contained in:
@@ -1180,7 +1180,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
|
|||||||
Example: Pydantic schema (include_raw=False):
|
Example: Pydantic schema (include_raw=False):
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from langchain_core.pydantic_v1 import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
class AnswerWithJustification(BaseModel):
|
class AnswerWithJustification(BaseModel):
|
||||||
'''An answer to the user question along with justification for the answer.'''
|
'''An answer to the user question along with justification for the answer.'''
|
||||||
@@ -1200,7 +1200,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
|
|||||||
Example: Pydantic schema (include_raw=True):
|
Example: Pydantic schema (include_raw=True):
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from langchain_core.pydantic_v1 import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
class AnswerWithJustification(BaseModel):
|
class AnswerWithJustification(BaseModel):
|
||||||
'''An answer to the user question along with justification for the answer.'''
|
'''An answer to the user question along with justification for the answer.'''
|
||||||
@@ -1220,7 +1220,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
|
|||||||
Example: Dict schema (include_raw=False):
|
Example: Dict schema (include_raw=False):
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from langchain_core.pydantic_v1 import BaseModel
|
from pydantic import BaseModel
|
||||||
from langchain_core.utils.function_calling import convert_to_openai_tool
|
from langchain_core.utils.function_calling import convert_to_openai_tool
|
||||||
|
|
||||||
class AnswerWithJustification(BaseModel):
|
class AnswerWithJustification(BaseModel):
|
||||||
|
@@ -2364,7 +2364,7 @@ class Runnable(Generic[Input, Output], ABC):
|
|||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from typing import Any, Dict, List
|
from typing import Any, Dict, List
|
||||||
from langchain_core.pydantic_v1 import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from langchain_core.runnables import RunnableLambda
|
from langchain_core.runnables import RunnableLambda
|
||||||
|
|
||||||
def f(x: Dict[str, Any]) -> str:
|
def f(x: Dict[str, Any]) -> str:
|
||||||
|
@@ -97,7 +97,7 @@ class RunnableWithMessageHistory(RunnableBindingBase):
|
|||||||
from langchain_core.documents import Document
|
from langchain_core.documents import Document
|
||||||
from langchain_core.messages import BaseMessage, AIMessage
|
from langchain_core.messages import BaseMessage, AIMessage
|
||||||
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
||||||
from langchain_core.pydantic_v1 import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from langchain_core.runnables import (
|
from langchain_core.runnables import (
|
||||||
RunnableLambda,
|
RunnableLambda,
|
||||||
ConfigurableFieldSpec,
|
ConfigurableFieldSpec,
|
||||||
|
@@ -476,7 +476,7 @@ def tool_example_to_messages(
|
|||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
from langchain_core.pydantic_v1 import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from langchain_openai import ChatOpenAI
|
from langchain_openai import ChatOpenAI
|
||||||
|
|
||||||
class Person(BaseModel):
|
class Person(BaseModel):
|
||||||
|
Reference in New Issue
Block a user