The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs(core): remove stale Args/Raises entries from FileCallbackHandler._write and ChatGeneration.set_text (#40211)
Manohar Paturieef3eaeac8ff
diff --git a/libs/core/langchain_core/callbacks/file.py b/libs/core/langchain_core/callbacks/file.pyindex 3ba0e863c7..aeffc49d15 100644--- a/libs/core/langchain_core/callbacks/file.py+++ b/libs/core/langchain_core/callbacks/file.py@@ -135,7 +135,6 @@ class FileCallbackHandler(BaseCallbackHandler):text: The text to write to the file.color: Optional color for the text. Defaults to `self.color`.end: String appended after the text.- file: Optional file to write to. Defaults to `self.file`.Raises:RuntimeError: If the file is closed or not available.diff --git a/libs/core/langchain_core/outputs/chat_generation.py b/libs/core/langchain_core/outputs/chat_generation.pyindex b104d9b613..2768ec9683 100644--- a/libs/core/langchain_core/outputs/chat_generation.py+++ b/libs/core/langchain_core/outputs/chat_generation.py@@ -43,17 +43,7 @@ class ChatGeneration(Generation):@model_validator(mode="after")def set_text(self) -> Self:- """Set the text attribute to be the contents of the message.-- Args:- values: The values of the object.-- Returns:- The values of the object with the text attribute set.-- Raises:- ValueError: If the message is not a string or a list.- """+ """Set the text attribute to be the contents of the message."""# Check for legacy blocks with "text" key but no "type" field.# Otherwise, delegate to `message.text`.if isinstance(self.message.content, list):