mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 06:18:05 +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):
|
||||
.. 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):
|
||||
|
@@ -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:
|
||||
|
@@ -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,
|
||||
|
@@ -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):
|
||||
|
Reference in New Issue
Block a user