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

Generating generators #91

Merged
merged 4 commits into from
Aug 28, 2024
Merged

Generating generators #91

merged 4 commits into from
Aug 28, 2024

Conversation

swerner
Copy link
Contributor

@swerner swerner commented Aug 28, 2024

New CLI command coming!

This new command sublayer generate generator drops you into a walkthrough for generating a new sublayer generator for your project.

Seeing a longer prompt like this definitely makes me think we need a better abstraction for prompts - this could probably be a good place to look at and experiment with for #75 I think. There are some clear sections that I'd like to break out into methods to build the prompt, a mix of background information, few shot (1 for now) examples, and instructions.

I also had an issue where I was using the same heredoc delimiter in the example and in the code so it blew up when I tried to just inline everything. Gotta be a better way to handle this.

Also ran into an issue trying to integration test this command as running the CLI on a separate thread wouldn't allow VCR to hook into and record the requests. Would love a better solution there to actually testing these commands. Probably need to come up with a mock provider for things like this.

Anywho, this sets the stage pretty well for doing the same thing with Agents and Actions which should come through a lot quicker and be ready for a release very shortly!

@swerner
Copy link
Contributor Author

swerner commented Aug 28, 2024

Fixes #89

@swerner
Copy link
Contributor Author

swerner commented Aug 28, 2024

Related to #63

@swerner swerner merged commit c1226ee into main Aug 28, 2024
1 check passed
name: "four_digit_passcode",
description: "an uncommon and difficult to guess four digit passcode"

llm_output_adapter type: :list_of_named_strings,
Copy link
Contributor

Choose a reason for hiding this comment

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

gonna open an issue for this.

one idea here is that we can create a very flexible output adapter that is as amorphic as (direct translation of) the json shema (essential takes type as a named param and can do so recursively)

it could serve as both a fallback adapter as well as a simple adapter for this kind of use case (prompts)

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

2 participants