Replies: 3 comments 3 replies
-
thanks for raising this. This is a mostly langchain specific change, we could generalize it to {chat_history} across our prompt management integrations. Currently you can achieve this by manually adding the history within the returned chat message array at runtime. |
Beta Was this translation helpful? Give feedback.
-
I would suggest something like a named placeholder in the prompt template, which you could put anywhere. Then in the prompt compilation you would pass The named placeholder would allow for custom functionality like message history and likely other things that I can't think of right now. |
Beta Was this translation helpful? Give feedback.
-
+1 I need this. Currently the workaround I use if using prompt template for system message only then inalying inside ChatPromptTemplate.fromMessages([
SystemMessagePromptTemplate.fromTemplate(prompt.getLangchainPrompt()),
new MessagesPlaceholder("messages"),
]) One catch here is that (that's also implicitly mentioned in the original post) is that the placeholder is able to take any arbitrary key and not just ChatPromptTemplate.fromMessages([
SystemMessagePromptTemplate.fromTemplate(prompt.getLangchainPrompt()),
new MessagesPlaceholder("messages"),
new MessagesPlaceholder("agent_scratchpad")
]) |
Beta Was this translation helpful? Give feedback.
-
Describe the feature or potential improvement
Hi, I've bumped into a little lack of functionality when trying to use Langfuse UI for prompt management.
Issue
I want to store a prompt that could be described in Langchain terms like:
But I can't choose a placeholder "role" in the creation prompt panel:
Potential solution
Extend the role selector with the "placeholder" option.
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions