Skip to content

v0.2.8: AI for ChainForge BETA: TextFields, Items

Compare
Choose a tag to compare
@ianarawjo ianarawjo released this 13 Dec 19:03
· 43 commits to main since this release
ce583a2

Adds purple sparkly generative AI button to TextFields and Items Nodes, courtesy of @shawseanyang !

This button gives you easy access to generating input values using LLM calls to OpenAI GPT-3.5 and GPT-4 models. You can access to two features:

  • Replace: Replace the existing fields with new fields, given the prompt entered.
  • Extend: Given the existing fields, extrapolate the pattern and extend the list the best you can.

image

Try it out on chainforge.ai/play, or install locally via pip install chainforge --upgrade (BYO OpenAI API key!)

Note: You must have input an OpenAI API key (either directly in Settings, or via environment variables) to use generative AI features. In the future, we might support letting users change the model used for this feature, if there's interest (or if you submit a PR! :)

Yes, prompts generate too... sort of!

Replace will also consider if you ask for prompts and can generate prompt templates. Extend will also consider prompt templates and try to keep to your existing template variables. If you use prompt generation, you are probably best off Extending after manually entering 2-3 prompts/prompt templates as examples.

Note that prompt template generation is very experimental atm, and we're working on improving this aspect.

Screen Shot 2023-12-12 at 10 34 45 PM

This feature is in BETA. There may be rough edges, mistakes in generation, etc.

However, we've been enjoying it greatly and found it very helpful for speeding up input data generation. Play around and let us know what you think!

If you don't want to see the buttons, you can toggle off AI support in the Settings Window. Also, you can toggle on the Autocomplete feature on TextFields nodes, if you're feeling experimental! :)

This feature represents a semester's worth of work from @shawseanyang! Thank you Sean! 🎉🥳


Other small changes in this release:

  • the max Num of responses per prompt counter on Prompt Nodes has been increased to 999
  • In-browser autosaving now disables if you start working with lots of LLM responses (talking files upwards of 20MB or more). localStorage can only handle so much.
  • Relatedly, when you tab away from the ChainForge browser tab, autosaving will not occur in the background. This is to save you performance and help with the check above.
  • API keys are now loaded from environment variables only upon load of the application, rather than every call, for consistency.