Langfuse.create_prompt() got an unexpected keyword argument 'version' #3957
-
|
As title, I'd like to achieve versioning control over prompt tab in langfuse UI. Error: Langfuse.create_prompt() got an unexpected keyword argument 'version' I refer to doc: https://langfuse.com/docs/prompts/get-started#use-prompt Anyone can help it ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hey @silenceliang! I'm here to help you with any bugs, questions, or contributions you have. Let's get this issue sorted out together! To manage versioning control over prompts in the Langfuse UI, you should not specify a To retrieve specific versions of a prompt, you can use the Here's a brief example: # Create a prompt without specifying a version
langfuse.create_prompt(
name="story_summarization",
prompt="Extract the key information from this text and return it in JSON format.",
config={
"model": "gpt-3.5-turbo-1106",
"temperature": 0
}
)
# Retrieve a specific version of the prompt
specific_version_prompt = langfuse.get_prompt("story_summarization", version=1)By managing prompts directly in the Langfuse UI, you can effectively control versions and make iterative improvements without needing to specify a version during creation [1][2]. |
Beta Was this translation helpful? Give feedback.
Hey @silenceliang! I'm here to help you with any bugs, questions, or contributions you have. Let's get this issue sorted out together!
To manage versioning control over prompts in the Langfuse UI, you should not specify a
versionargument when using thecreate_promptmethod, as it does not support this parameter. Instead, versioning is handled automatically by Langfuse. When you create a new prompt with the same name, Langfuse automatically increments the version number.To retrieve specific versions of a prompt, you can use the
get_promptmethod with theversionargument. This allows you to access any version of the prompt that has been managed in the Langfuse UI.Here's a brief example:
…