Skip to content

The agent engineering platform.

chore(langchain): Fix typos in core docstrings (#32928)

湛露先生406ebc914174
diff --git a/libs/core/langchain_core/messages/utils.py b/libs/core/langchain_core/messages/utils.py
index 735300650a..6f681d7a65 100644
--- a/libs/core/langchain_core/messages/utils.py
+++ b/libs/core/langchain_core/messages/utils.py
@@ -97,7 +97,7 @@ def get_buffer_string(
messages: Messages to be converted to strings.
human_prefix: The prefix to prepend to contents of HumanMessages.
Default is "Human".
- ai_prefix: THe prefix to prepend to contents of AIMessages. Default is "AI".
+ ai_prefix: The prefix to prepend to contents of AIMessages. Default is "AI".
Returns:
A single string concatenation of all input messages.
diff --git a/libs/core/langchain_core/utils/json.py b/libs/core/langchain_core/utils/json.py
index 768471ae53..2703142884 100644
--- a/libs/core/langchain_core/utils/json.py
+++ b/libs/core/langchain_core/utils/json.py
@@ -101,7 +101,7 @@ def parse_partial_json(s: str, *, strict: bool = False) -> Any:
# If we're still inside a string at the end of processing,
# we need to close the string.
if is_inside_string:
- if escaped: # Remoe unterminated escape character
+ if escaped: # Remove unterminated escape character
new_chars.pop()
new_chars.append('"')
diff --git a/libs/core/langchain_core/utils/utils.py b/libs/core/langchain_core/utils/utils.py
index 122f1c0af2..f8da36c035 100644
--- a/libs/core/langchain_core/utils/utils.py
+++ b/libs/core/langchain_core/utils/utils.py
@@ -220,7 +220,7 @@ def _build_model_kwargs(
values: dict[str, Any],
all_required_field_names: set[str],
) -> dict[str, Any]:
- """Build "model_kwargs" param from Pydanitc constructor values.
+ """Build "model_kwargs" param from Pydantic constructor values.
Args:
values: All init args passed in by user.