experimental: docstrings update (#18048)

Added missed docstrings. Formatted docsctrings to the consistent format.
This commit is contained in:
Leonid Ganeline
2024-02-23 18:24:16 -08:00
committed by GitHub
parent 56b955fc31
commit 3f6bf852ea
61 changed files with 316 additions and 102 deletions

View File

@@ -11,7 +11,7 @@ from langchain_experimental.pydantic_v1 import BaseModel, Field
class GenerativeAgent(BaseModel):
"""An Agent as a character with memory and innate characteristics."""
"""Agent as a character with memory and innate characteristics."""
name: str
"""The character's name."""
@@ -48,6 +48,8 @@ class GenerativeAgent(BaseModel):
return [re.sub(r"^\s*\d+\.\s*", "", line).strip() for line in lines]
def chain(self, prompt: PromptTemplate) -> LLMChain:
"""Create a chain with the same settings as the agent."""
return LLMChain(
llm=self.llm, prompt=prompt, verbose=self.verbose, memory=self.memory
)