PromptyChatParser#

class langchain_prompty.parsers.PromptyChatParser(prompty: Prompty)[source]#

Parse a chat prompt into a list of messages.

Methods

__init__(prompty)

inline_image(image_item)

invoke(data)

parse_content(content)

for parsing inline images

Parameters:

prompty (Prompty) –

__init__(prompty: Prompty) None[source]#
Parameters:

prompty (Prompty) –

Return type:

None

inline_image(image_item: str) str[source]#
Parameters:

image_item (str) –

Return type:

str

invoke(data: BaseModel) BaseModel[source]#
Parameters:

data (BaseModel) –

Return type:

BaseModel

parse_content(content: str) str | List[source]#

for parsing inline images

Parameters:

content (str) –

Return type:

str | List