Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Resolve versions on Prompt #6033

Open
wants to merge 2 commits into
base: prompts
Choose a base branch
from

Conversation

anticorrelator
Copy link
Contributor

resovles #6019

  • Resolves latest PromptVersion on Prompts
  • If passed an optional PromptVersion id, will resolve the specified PromptVersion

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 14, 2025
if version_id:
v_id = from_global_id_with_expected_type(version_id, PromptVersion.__name__)
version = await session.scalar(
select(models.PromptVersion).where(models.PromptVersion.id == v_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and models.PromptVersion.prompt_id == self.id_attr ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: 📘 Todo
Development

Successfully merging this pull request may close these issues.

2 participants