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: Spike out dummy PromptVersion connection #5767

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

anticorrelator
Copy link
Contributor

resolves #5754

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Dec 17, 2024
@anticorrelator anticorrelator changed the base branch from main to prompts December 17, 2024 22:42
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Dec 17, 2024
Comment on lines 12 to 14
class PromptTemplateType(str, Enum):
TEXT = "text"
JSON = "json"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this supposed to match what's in the DB?

        sa.Column(
            "template_type",
            sa.String,
            sa.CheckConstraint(
                "template_type IN ('chat', 'str')",
                name="template_type",
            ),
            nullable=False,
        ),

Copy link
Contributor

@mikeldking mikeldking Dec 17, 2024

Choose a reason for hiding this comment

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

Good catch

Comment on lines 18 to 23
class PromptTemplateFormat(str, Enum):
MUSTACHE = "mustache"
FSTRING = "fstring"

Copy link
Contributor

Choose a reason for hiding this comment

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

is this missing NONE?

description: String!
templateType: PromptTemplateType!
templateFormat: PromptTemplateFormat!
template: JSON!
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can make this a union type and give it a bit more structure

@@ -612,6 +617,85 @@ def prompts(
args=args,
)

@strawberry.field
async def prompt_versions(
Copy link
Contributor

Choose a reason for hiding this comment

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

this goes on prompt

@mikeldking mikeldking force-pushed the dustin/spike-out-prompthub-gql branch from 66d8379 to 45fb1f8 Compare December 18, 2024 01:00
@mikeldking mikeldking merged commit c063e81 into prompts Dec 18, 2024
49 checks passed
@mikeldking mikeldking deleted the dustin/spike-out-prompthub-gql branch December 18, 2024 01:08
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.

[hub] [gql] prompt versions list
3 participants