style: more sweeping refs work (#33513)

This commit is contained in:
Mason Daugherty
2025-10-15 23:33:39 -04:00
committed by GitHub
parent 26e0a00c4c
commit 707e96c541
42 changed files with 615 additions and 607 deletions

View File

@@ -343,9 +343,9 @@ class BasePromptTemplate(
file_path: Path to directory to save prompt to.
Raises:
`ValueError`: If the prompt has partial variables.
`ValueError`: If the file path is not json or yaml.
`NotImplementedError`: If the prompt type is not implemented.
ValueError: If the prompt has partial variables.
ValueError: If the file path is not json or yaml.
NotImplementedError: If the prompt type is not implemented.
Example:
```python

View File

@@ -140,9 +140,9 @@ class PromptTemplate(StringPromptTemplate):
"""Override the + operator to allow for combining prompt templates.
Raises:
`ValueError`: If the template formats are not f-string or if there are
ValueError: If the template formats are not f-string or if there are
conflicting partial variables.
`NotImplementedError`: If the other object is not a `PromptTemplate` or str.
NotImplementedError: If the other object is not a `PromptTemplate` or str.
Returns:
A new `PromptTemplate` that is the combination of the two.

View File

@@ -150,7 +150,7 @@ class StructuredPrompt(ChatPromptTemplate):
A RunnableSequence object.
Raises:
`NotImplementedError`: If the first element of `others`
NotImplementedError: If the first element of `others`
is not a language model.
"""
if (others and isinstance(others[0], BaseLanguageModel)) or hasattr(