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: string batch generators #7572

Merged
merged 13 commits into from
Jan 19, 2025
Merged

Conversation

psychedelicious
Copy link
Collaborator

Summary

  • Add string batch generators:

    • Parse String: Split the input string on the user-defined character. Same as float and int parse string generators.
    • Dynamic Prompts (Random): Run dynamic prompts on the input string with its random generator. Optionally provide a seed for reproducible outputs.
    • Dynamic Prompts (Combinatorial): Run dynamic prompts on the input string with its combinatorial generator.

    The dynamic prompts generators are split like this because

    • It's hard to fit them in a single node with a smooth UI. I couldn't get it to feel or look nice.
    • Fiddly implementation to handle both in one generator, because they want different settings (e.g. max prompts vs count + seed).
  • Support loading from file for all string input generators. The files are loaded into memory in the frontend, they are never uploaded to the server. Max size of 128KB bc we don't want to load so much data into the node. This might be way too big but it shouldn't break anything, might just be a bit laggy if a user loads such a huge list of strings.

  • Support for special characters like \n to split string inputs on newlines.

Related Issues / Discussions

QA Instructions

Try it out!

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog

@github-actions github-actions bot added api python PRs that change python files invocations PRs that change invocations frontend PRs that change frontend files labels Jan 18, 2025
@psychedelicious
Copy link
Collaborator Author

Demo of the string generators and load from file functionality. All generators that take a string input support load from file and have the same parsing (shown with the float generator).

Screen.Recording.2025-01-20.at.8.37.54.am.mov

@psychedelicious psychedelicious enabled auto-merge (rebase) January 19, 2025 21:56
@psychedelicious psychedelicious merged commit 7535d2e into main Jan 19, 2025
15 checks passed
@psychedelicious psychedelicious deleted the psyche/feat/ui/string-generators branch January 19, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api frontend PRs that change frontend files invocations PRs that change invocations python PRs that change python files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants