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: Add prompt verions REST route /prompts/{id}/versions #6098

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

Conversation

anticorrelator
Copy link
Contributor

  • Lists all versions for a specific prompt

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 17, 2025
@cephalization
Copy link
Contributor

I get errors on /prompts on this branch

pydantic_core._pydantic_core.ValidationError: 1 validation error for Prompt
name
  Input should be a valid string [type=string_type, input_value=Identifier(root='mycoolprompt'), input_type=Identifier]
    For further information visit https://errors.pydantic.dev/2.9/v/string_type

@cephalization
Copy link
Contributor

This is unlike the prompt version endpoint which accepts a string id

image image

@anticorrelator anticorrelator force-pushed the dustin/add-prompts-versions-listing branch from 02d6ab3 to 6776c13 Compare January 22, 2025 05:04
@anticorrelator
Copy link
Contributor Author

@cephalization whoops! fixed, thank you

@cephalization
Copy link
Contributor

Hmm something about the name validation is unhappy

pydantic_core._pydantic_core.ValidationError: 1 validation error for Prompt
name
  Input should be a valid string [type=string_type, input_value=Identifier(root='test'), input_type=Identifier]
    For further information visit https://errors.pydantic.dev/2.10/v/string_type

I've tried wiping my db and a few names like test and tiny-prompt with the same issue.

This crops up on fetching all prompts or a prompt version. Maybe we need a rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: 👍 Approved
Development

Successfully merging this pull request may close these issues.

2 participants