langchain/libs/partners/prompty/langchain_prompty
Matthieu 783397eacb
community: avoid double templating in langchain_prompty (#25777)
## Description

In `langchain_prompty`, messages are templated by Prompty. However, a
call to `ChatPromptTemplate` was initiating a second templating. We now
convert parsed messages to `Message` objects before calling
`ChatPromptTemplate`, signifying clearly that they are already
templated.

We also revert #25739 , which applied to this second templating, which
we now avoid, and did not fix the original issue.

## Issue

Closes #25703
2024-08-28 18:18:18 -04:00
..
__init__.py prompty: adding Microsoft langchain_prompty package (#21346) 2024-05-11 04:03:44 +00:00
core.py prompty: docstring (#23152) 2024-06-19 12:50:58 -04:00
langchain.py community: avoid double templating in langchain_prompty (#25777) 2024-08-28 18:18:18 -04:00
parsers.py community: avoid double templating in langchain_prompty (#25777) 2024-08-28 18:18:18 -04:00
renderers.py prompty: docstring (#23152) 2024-06-19 12:50:58 -04:00
utils.py prompty: docstring (#23152) 2024-06-19 12:50:58 -04:00