alexrosen
alexrosen6d ago

alexrosen - After I got tracing working, I got ...

After I got tracing working, I got interested in doing more with langfuse, particularly using your Prompt Management capability for a new prompt I need to add to my application. I am going to create a simple function that combines get_prompt and compile. I was a bit frustrated that I could not find a doc describing the compile method. I searched the docs and the reference and did not find anything. I wanted a doc or example to see how to use compile with more than one variable being substituted. I want my function to take a dictionary of variables to be used in substitutions in compile, but wasn't sure if I could just add a dictionary to compile. I think I can, but a reference would make it so I'm confident vs. doing trial and error. My suggestion is to add an example of compile with more than one variable being substituted and to either add compile to the reference or make it show up in search.
2 Replies
Marc
Marc4d ago
Thanks for sharing! I'll update the docs. The compile methods takes arbitrary key/value pairs as kwargs