prompty: docstring (#23152)

Added missed docstrings. Format docstrings to the consistent format
(used in the API Reference)

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
This commit is contained in:
Leonid Ganeline
2024-06-19 09:50:58 -07:00
committed by GitHub
parent 9b82707ea6
commit 50484be330
6 changed files with 256 additions and 87 deletions

View File

@@ -8,6 +8,8 @@ from .core import Invoker, Prompty, SimpleModel
class PromptyChatParser(Invoker):
"""Parse a chat prompt into a list of messages."""
def __init__(self, prompty: Prompty) -> None:
self.prompty = prompty
self.roles = ["assistant", "function", "system", "user", "human", "ai"]