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

contrib: OpenAI code generation #675

Merged
merged 3 commits into from
Feb 2, 2024
Merged

contrib: OpenAI code generation #675

merged 3 commits into from
Feb 2, 2024

Conversation

zilto
Copy link
Collaborator

@zilto zilto commented Feb 1, 2024

Specify a coding language and a problem statement to generate a solution

For new dataflows:

Do you have the following?

  • Added a new folder for my dataflow under my username directory.
    • Added a README.md file under my dataflow directory that follows the standard headings and is filled out.
    • Added a init.py file under my dataflow directory that contains the Hamilton code.
    • Added a requirements.txt under my dataflow directory that contains the required packages outside of Hamilton.
    • Added tags.json under my dataflow directory to curate my dataflow.
    • Added valid_configs.jsonl under my dataflow directory to specify the valid configurations.
    • Added a dag.png that shows one possible configuration of my dataflow.
  • I hearby acknowledge that to the best of my ability, that the code I have contributed contains correct attribution
    and notices as appropriate.

How I tested this

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Dataflow documentation has been updated if adding/changing functionality.

@zilto zilto added the contrib Used for code related to contrib package label Feb 1, 2024
Comment on lines 16 to 18
## Overrides
- `prompt_template_to_generate_code`: Create a new prompt template with the fields `query` and `code_language`.
- `prompt_to_generate_code`: Manually provide a prompt to generate Python code
Copy link
Collaborator

Choose a reason for hiding this comment

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

I've also been adding an example of how to execute things...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

perhaps we could automate that by capturing what's under if __name__ == "__main__":

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed. Let's ship this first, and then modify the code generation script to pull that?

Copy link
Collaborator

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

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

add doc strings.

Also add limitations, and how to modify/extend?

Copy link
Collaborator

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

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

just need to add image, and then merge away!

@zilto zilto merged commit da7c676 into main Feb 2, 2024
22 of 24 checks passed
@zilto zilto deleted the contrib/chains branch February 2, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contrib Used for code related to contrib package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants