Skip to content

Adding version_pretty to fetch prompt response#383

Open
Pedro Mora (stretpjc) wants to merge 1 commit intomainfrom
return-pretty-version-when-fetching-prompts
Open

Adding version_pretty to fetch prompt response#383
Pedro Mora (stretpjc) wants to merge 1 commit intomainfrom
return-pretty-version-when-fetching-prompts

Conversation

@stretpjc
Copy link
Copy Markdown

Adding a version_pretty property to loaded prompts so callers can access the prettified transaction/version ID directly from the SDK. This helps since the UI exposes the pretty version only instead of the decimal value that is _xact_id by default.

  • Added Prompt.version_pretty
  • Uses the existing prettify_xact() helper
  • Returns the prettified version when _xact_id is present or None if the prompt has no version
  • Added a test for this

Tested locally:
image

@AbhiPrasad
Copy link
Copy Markdown
Member

I’m undecided if we want to extend the public api this way. For now users can just use prettify_xact directly right?

@stretpjc
Copy link
Copy Markdown
Author

Yes, that is correct Abhijeet Prasad (@AbhiPrasad). This would just add it directly to the SDK response so that it is easier for users to cross reference between the UI and SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants