-
Notifications
You must be signed in to change notification settings - Fork 211
feat: implement Langfuse Prompt client with CRUD operations #450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add prompt management client with list, get, create, update operations - Include comprehensive test coverage for all prompt operations - Support chat message placeholders and prompt compilation
|
@mrh997 Would you mind having a look at this PR? |
|
建议在 example 和 readme 中增加如何使用的示例和说明 |
|
在 Eino 中提供 langfuse 的 prompt 管理,这个功能的主要使用场景是什么?应该不是在编排中使用 |
不需要将prompt硬编码到代码中,可以在远程管理prompt,类似于etcd、nacos等远程管理配置一样 |
如果是这种使用场景,感觉应该实现一个基于 langfuse 的 ChatTemplate,这样才能在编排中用? |
@git-hulk 看看是否和其它语言的用法对齐下,比如通过compile实现参数绑定movie https://langfuse.com/docs/prompt-management/get-started#use-prompt # Get current `production` version of a chat prompt
chat_prompt = langfuse.get_prompt("movie-critic-chat", type="chat") # type arg infers the prompt type (default is 'text')
# Insert variables into chat prompt template
compiled_chat_prompt = chat_prompt.compile(criticlevel="expert", movie="Dune 2")
# -> [{"role": "system", "content": "You are an expert movie critic"}, {"role": "user", "content": "Do you like Dune 2?"}] |
我比较倾向于单独支持 Eino's ChatTemplate 的实现来渲染 Langfuse Prompt |
1f17b7b to
c458ab5
Compare
Check the PR title.
(Optional) More detailed description for this PR(en: English/zh: Chinese).