You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Langchain as of recent supports (finally) mustache style variables {{var}}. Langfuse would have to implement some minor changes to export ChatPrompts correctly into that format.
ChatPromptClient
Was able to simplify conversion of get_langchain_prompt to [(msg["role"], msg["content"]) for msg in prompt].
TextPromptClient
Could just return the prompt, so no need for the helper function if mustache is used.
Additional information
No response
The text was updated successfully, but these errors were encountered:
@maxjacu is there an upside compared to the current implementation? downside here: langchain changed this recently, thus if we change this in langfuse sdk, this does not work if used with older langchain versions
Discussed in https://github.com/orgs/langfuse/discussions/1774
Originally posted by maxjacu April 18, 2024
Describe the feature or potential improvement
Langchain as of recent supports (finally) mustache style variables {{var}}. Langfuse would have to implement some minor changes to export ChatPrompts correctly into that format.
ChatPromptClient
Was able to simplify conversion of get_langchain_prompt to
[(msg["role"], msg["content"]) for msg in prompt]
.TextPromptClient
Could just return the prompt, so no need for the helper function if mustache is used.
Additional information
No response
The text was updated successfully, but these errors were encountered: