Skip to content

[ENHANCEMENT]: Print Prompt #6747

@jlopatec

Description

@jlopatec

I think you need a way to simple print the:
phoenix.client.types.prompts.PromptVersion object

I created a prompt, can't remember what my prompt vars were, Just want to see the message JSON as a string. I'm having to go back to the UI just to see the prompt as a string.

We should be able to choose a model format (say OpenAI) by default and just print. Example below:

from phoenix.client import Client

client = Client()

prompt_name = "article-bullet-summarizer"
client.prompts.get(prompt_identifier=prompt_name)

prompt = client.prompts.get(prompt_version_id="UHJvbXB0VmVyc2lvbjoy")

print(prompt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions