Resolves issue DOC: Incorrect and confusing documentation of AIMessag… (#10379)

Resolves issue DOC: Incorrect and confusing documentation of
AIMessagePromptTemplate and HumanMessagePromptTemplate #10378

- Description: Revised docstrings to correctly and clearly document each
PromptTemplate
- Issue: #10378
- Dependencies: N/A
- Tag maintainer: @baskaryan

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
captivus 2023-09-08 17:53:08 -05:00 committed by GitHub
parent 8c0f391815
commit c902a1545b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,7 +229,7 @@ class ChatMessagePromptTemplate(BaseStringMessagePromptTemplate):
class HumanMessagePromptTemplate(BaseStringMessagePromptTemplate): class HumanMessagePromptTemplate(BaseStringMessagePromptTemplate):
"""Human message prompt template. This is a message that is sent to the user.""" """Human message prompt template. This is a message sent from the user."""
def format(self, **kwargs: Any) -> BaseMessage: def format(self, **kwargs: Any) -> BaseMessage:
"""Format the prompt template. """Format the prompt template.
@ -245,7 +245,7 @@ class HumanMessagePromptTemplate(BaseStringMessagePromptTemplate):
class AIMessagePromptTemplate(BaseStringMessagePromptTemplate): class AIMessagePromptTemplate(BaseStringMessagePromptTemplate):
"""AI message prompt template. This is a message that is not sent to the user.""" """AI message prompt template. This is a message sent from the AI."""
def format(self, **kwargs: Any) -> BaseMessage: def format(self, **kwargs: Any) -> BaseMessage:
"""Format the prompt template. """Format the prompt template.