core[patch]: update docstrings (#26241)

This commit is contained in:
Bagatur
2024-09-09 17:04:57 -07:00
committed by GitHub
parent d588ce1f29
commit baad44965e
4 changed files with 6 additions and 6 deletions

View File

@@ -1180,7 +1180,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
Example: Pydantic schema (include_raw=False):
.. code-block:: python
from langchain_core.pydantic_v1 import BaseModel
from pydantic import BaseModel
class AnswerWithJustification(BaseModel):
'''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):
.. code-block:: python
from langchain_core.pydantic_v1 import BaseModel
from pydantic import BaseModel
class AnswerWithJustification(BaseModel):
'''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):
.. 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
class AnswerWithJustification(BaseModel):

View File

@@ -2364,7 +2364,7 @@ class Runnable(Generic[Input, Output], ABC):
.. code-block:: python
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
def f(x: Dict[str, Any]) -> str:

View File

@@ -97,7 +97,7 @@ class RunnableWithMessageHistory(RunnableBindingBase):
from langchain_core.documents import Document
from langchain_core.messages import BaseMessage, AIMessage
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 (
RunnableLambda,
ConfigurableFieldSpec,

View File

@@ -476,7 +476,7 @@ def tool_example_to_messages(
.. code-block:: python
from typing import List, Optional
from langchain_core.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field
from langchain_openai import ChatOpenAI
class Person(BaseModel):