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

MAINT: Updating get_seed_prompt_groups to include individual seed_prompts #651

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rlundeen2
Copy link
Contributor

@rlundeen2 rlundeen2 commented Jan 20, 2025

Previously, when calling get_seed_prompt_groups it would only return groups with a specified group_id and not include seed_prompts that matched the filter criteria if the group_id was not set. Additionally, groups had to be specified one per yaml file.

This PR makes it easier to manage SeedPrompts and SeedPromptGroups within yaml files and when querying from the database.

  • Made seedPrompts by default be seedPrompt groups with only one prompt, allowing users to retrieve all seedPromptGroups with one call to memory.
  • Added prompt_group_alias, which is a way to group seedPrompts within a single yaml file
  • Added data_types as a query filter when searching for SeedPromptGroups
  • Added validation to seedPromptGroups to ensure the group_id is the same.
  • Added logic to raise an exception if group id is set in yaml (this will result in duplicates and weirdness when sending)

@@ -55,7 +55,7 @@ def __init__(
metadata: Optional[Dict[str, str]] = None,
parameters: Optional[List[str]] = None,
prompt_group_id: Optional[uuid.UUID] = None,
sequence: Optional[int] = None,
sequence: Optional[int] = 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Default of 0 matches promptRequestResponses that are only made up of a single piece

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't sequence 0 the first turn? If you have 3 pieces, wouldn't they all get sequence 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is probably what we want by default I would guess? We could require this to be set, but I'd imagine most seedPrompts are only the first turn.

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.

3 participants