chore: Fixing PromptNode .prompt() docstring to include the PromptTemplate object as an option (#4135)

* fix to include the PromptTemplate object as an option

* small fix
This commit is contained in:
Tuana Celik 2023-02-16 19:05:04 +01:00 committed by GitHub
parent a4407f8f98
commit cdb05f0f9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -777,13 +777,11 @@ class PromptNode(BaseComponent):
def prompt(self, prompt_template: Optional[Union[str, PromptTemplate]], *args, **kwargs) -> List[str]:
"""
Prompts the model and represents the central API for the PromptNode. It takes a prompt template,
a list of non-keyword and keyword arguments, and returns a list of strings - the responses from
the underlying model.
a list of non-keyword and keyword arguments, and returns a list of strings - the responses from the underlying model.
If you specify the optional prompt_template parameter, it takes precedence over the default prompt
template for this PromptNode.
If you specify the optional prompt_template parameter, it takes precedence over the default PromptTemplate for this PromptNode.
:param prompt_template: The name of the optional prompt template to use.
:param prompt_template: The name or object of the optional PromptTemplate to use.
:return: A list of strings as model responses.
"""
results = []