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

Merged
merged 16 commits into from
Jan 28, 2025

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?

@anticorrelator anticorrelator force-pushed the dustin/add-prompts-versions-listing branch from fd9cb5d to 1562974 Compare January 28, 2025 17:08
@anticorrelator anticorrelator merged commit ad42f06 into prompts Jan 28, 2025
54 checks passed
@anticorrelator anticorrelator deleted the dustin/add-prompts-versions-listing branch January 28, 2025 19:41
mikeldking added a commit that referenced this pull request Feb 6, 2025
* feat(promts): skeleton UI for promts (#5726)

* wip

* WIP

* WIP

* add the prompt type

* add initial listing

* feat: temporary prompt

* final changes

* add aria role

* Build OpenAPI schema

* Use GID, not databse ID

* Build openapi schema

* Refactor to use prompt identifier

* Update OpenAPI schema

* Ruff 🐶

* Update route and openapi schema

* Use new pydantic models

* Restore latest route

* Rebuild schema

* Add warning (we're not handling citation events)

* Temporarily ignore `assert_never`

* Remove react component

* Remove component

* Ruff 🐶

---------

Co-authored-by: Mikyo King <[email protected]>
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: Done
Development

Successfully merging this pull request may close these issues.

3 participants