zacky8653
zacky86534w ago

Help to Retrieve Specific Prompt

Hello. I'm new to development and Langfuse. I'm trying to access a specific prompt from my AppSmith account using the REST API. When I use this- https://cloud.langfuse.com/api/public/v2/prompts with "GET", I can retrieve a list of prompts successfully. But when I try to retrieve a specific prompt like this- https://cloud.langfuse.com/api/public/v2/prompts/Generate_Response (with Generate_Response being one of the returned prompts) It's returning a 404 Not Found error. How do I fix this? Please help me.
Solution:
Hi @zacky8653, do you have a prompt version with the producation label applied to it for this prompt name?
Jump to solution
5 Replies
Solution
Marc
Marc4w ago
Hi @zacky8653, do you have a prompt version with the producation label applied to it for this prompt name?
zacky8653
zacky86534w ago
Thank you so much @Marc . That worked. The moment I added the production label, it was available. I was able to successfully retrieve it Are there any other special labels like "production" I should be aware of?
Marc
Marc4w ago
awesome, the error message should include a warning hinting at the production label
zacky8653
zacky86534w ago
I'm sorry. A total newbie. Must've missed it
Marc
Marc4w ago
Are there any other special labels like "production" I should be aware of?
no, next to production, there is also latest which you can fetch if you want always the newest version you can fetch by label via the endpoint, e.g. ?label=latest