* Raise error after detecting duplicate variable names (#190)
* Raise error for duplicate variable name
* Created base error class
* Simplified error classes. Made just one `DuplicateVariableNameError` that takes in variable name to have a hard-coded error message
---------
Co-authored-by: Kayla Zethelyn <kaylazethelyn@college.harvard.edu>
* Adding support for Google's Gemini-Pro model. (#194)
* Refined duplicate var error check code
* Tidy up duplicate var name alerts and error handling, and err message
* Rebuild react and update package version
---------
Co-authored-by: Kayla Z <77540029+kamazet@users.noreply.github.com>
Co-authored-by: Kayla Zethelyn <kaylazethelyn@college.harvard.edu>
Co-authored-by: Priyan Vaithilingam <priyanmuthu@gmail.com>
* Implement autofill backend
* Add autofill to ui
* Add argument to getUID to force recalculation of UID's on every call
* Add command fill
* Move popover to the right
* Merge autofill-ui into autofill
* Add minimum rows requirement for autofilling
* Rename local variable in autofill system
* Rename autofill.ts to ai.ts
* Implement generate and replace backend function
* Add purple AI button
* Add ai popover
* Add tabs to ai popover
* Cosmetic changes to AI popover
* Move command fill UI to purple button popover
* Add 'creative' toggle to generateAndReplace
* Generate and replace UI
* Call backend for generate and replace
* Change creative to unconventional in generate and replace system
* Fix generate and replace
* Add loading states
* Cosmetic changes
* Use sparkle icon
* Cosmetic changes
* Add a clarifying sentence to the prompt when the user asks for a prompt
* Change to markdown
* Add error handling to AI system
* Improve prompt prompt
* Remove 'suggestions loading' message
* Change 'pattern' to 'generate a list of' and fix a bug where i forgot to specify unordered markdown list
* Limit output to n in decode()
* Fix bug in error handling
* TEMP: try to fix autofill
* TEMP: disable autofill
* Finally fix autofill's debouncing
* Improve autofill prompt to handle commands
* Fix typo with semicolon
* Implement autofill backend
* Add autofill to ui
* Add argument to getUID to force recalculation of UID's on every call
* Add command fill
* Move popover to the right
* Merge autofill-ui into autofill
* Add minimum rows requirement for autofilling
* Rename local variable in autofill system
* Rename autofill.ts to ai.ts
* Implement generate and replace backend function
* Add purple AI button
* Add ai popover
* Add tabs to ai popover
* Cosmetic changes to AI popover
* Move command fill UI to purple button popover
* Add 'creative' toggle to generateAndReplace
* Generate and replace UI
* Call backend for generate and replace
* Change creative to unconventional in generate and replace system
* Fix generate and replace
* Add loading states
* Cosmetic changes
* Use sparkle icon
* Cosmetic changes
* Add a clarifying sentence to the prompt when the user asks for a prompt
* Change to markdown
* Add error handling to AI system
* Improve prompt prompt
* Remove 'suggestions loading' message
* Change 'pattern' to 'generate a list of' and fix a bug where i forgot to specify unordered markdown list
* Limit output to n in decode()
* Fix bug in error handling
* TEMP: try to fix autofill
* TEMP: disable autofill
* Finally fix autofill's debouncing
* Improve autofill prompt to handle commands
* Fix typo with semicolon
* Refactor the AI Popover into a new component
* Refactor the AI Popover into a new component
* Refactor the autofill functionality into two backend files
* Minor refactoring and styling fixes
* Parse markdown using markdown library
* Add no_cache flag support in backend to ignore cache for AI popover
* trim quotation marks and escape braces in AI autofill
* Add AI Support Tab in Global Settings pane.
* Convert Jinja braces
* Fix typo in AiPopover import
* Handle template variables with Extend and Autocomplete + Check template variable correctness in outputs
* Escape the braces of generate and replace prompts
* Update prompts to strengthen AI support for multiple template variables
* Log the system message
* Reduce minimum rows required to 1 for autocomplete to begin generating
* Reduce min rows to extend to 1 and add warning below 2
* Create a defaultdict utility
* Consider null values as nonexistant in defaultdict
* Make placeholders stick to their assigned text field without using defaultdict
* Make placeholder logic more readable
* Cache rendering of text fields to avoid expensive computation
* Calculate whether to refresh suggestions based on expected suggestions instead of previous suggestions
* Fix bug where LLM was returning templates in generate and replace where none was requested
* Force re-render of text fields on Extend
* Add Sean Yang to README
* Add GenAI support to Items Node
* Pass front-end API keys to AI support features
* Escape braces on Items Node outputs
* Update package to 0.2.8
* Disable autosaving if it takes 1 second or longer to save to localStorage
* Skip autosave when browser tab is inactive
* Fetch environment API keys only once upon load
* Check for OpenAI API key in AIPopover. If not present, display Alert.
---------
Co-authored-by: Sean Yang <53060248+shawseanyang@users.noreply.github.com>
* Show metavars in Table View
* Remove showing metavar col when var is col-plotted
* Add collapseable drawer to prompt node
* Add inspect drawer to eval nodes
* Rebuild app and package version
* Revise CSS so text in inspect drawer is selectable
* Disable delete key deleting a node in RF
* Change FLASK_BASE_URL to use relative path except in dev mode
* Rename CSVNode to ItemsNode and replace its icon.
* Update package version and rebuild react
* Add new Claude models
* Add Code Processor nodes.
* Renamed EvaluatorNode to CodeEvaluatorNode.
* Changed the way evaluator nodes pull responses (from grabResponses to pullInputData).
* Fix SimpleEvalNode to be consistent with CodeEvaluatorNode
* Fix Vis Node where no eval resps are connected, but resps are connected.
* Rebuilt react and update package version
* Convert table values to strings upon export
* Make ordering of LLM responses consistent w vars dict ordering
* Rebuild react and package version
* Make sure ordering considers vars as objects
* Add support for "continue w prior LLM" toggle on base Prompt Node
* Fix anthropic chat bug
* Detect immediate prompt chaining, and show cont LLM toggle in that case
* Update react build and package
* Auto-change shortname upon model settings edit
* Adding context menu to nodes on right-click
* Add BaseNode and subclass all CF nodes with BaseNode component
* Add BaseNode to CSVNode
* Move HF and Aleph up in LLM list.
* Rebuild react
* add aleph alpha to installg guide description
* add aleph alpha to settings to add key
* add settings for alephalpha
* add aleph alpha to models
* add aleph alpha api key to keymap
* no visible changes, removed console.log
* current working copy
* added settings for aleph alpha, added test, working api request
* removed console log
* added static build with Aleph Alpha integration
* added static build with Aleph Alpha integration
* Corrected from ALEPH_ALPHA_KEY to ALEPH_ALPHA_API_KEY
* add additional settings requested
* merge conflicts
* add build to gitignore, best practice, reduces conflicts
* remove empty lines
* Delete chainforge/react-server/build directory
build directory should not be in remote
* remove unnecessary changes
* Update backend.ts
* ...
* fixed import
* add aleph alpha to store, remove available llms from modelsettings, remove double palm key input from globalsettings
* Update to ReactFlow v11
* Add remove button to edge on hover
* Quality of life improvements (#133)
* Quality of life improvements for node and python
* Pinned minor version for mantine modules
* Updated package-lock.json
* Added .gitignore to react-server
* Updated .gitignore to python module
---------
Co-authored-by: ianarawjo <fatso784@gmail.com>
* update gitignore
* Minor fixes to AlephAlpha integration code
* Tested npm i and rebuilt react
* Force commit the react build
* Update package version
---------
Co-authored-by: Denise Wagenführ <denise.wagenfuehr@capgemini.com>
Co-authored-by: fguderia <falko.guderian@capgemini.com>
Co-authored-by: denise710 <53524926+denise710@users.noreply.github.com>
Co-authored-by: wday-cs <119377799+wday-cs@users.noreply.github.com>
* Removed Python backend files that are no longer used (everything in `promptengine`)
* Added `providers` subdomain, with `CustomProviderProtocol`, `provider` decorator, and global singleton `ProviderRegistry`
* Added a tab for custom providers, and a dropzone, in ChainForge global settings UI
* List custom providers in the Global Settings screen once added.
* Added ability to remove custom providers by clicking X.
* Make custom funcs sync but call them async'ly.
* Add Cohere custom provider example in examples/
*Cache the custom provider scripts and load them upon page load
* Rebuild react and update package version
* Bug fix when custom provider is deleted and settings screen is opened on the deleted custom provider
* Add red dot in Inspect Responses footer to indicate something changed
* Abstract out inspect footer button to component
* Add tooltips to AddNode menu items.
* Simple eval wip
* Add menu sections to Add Node. Minor tweaks to simple eval.
* Save state of simple eval when editing fields
* Add 'only show scores' toggle to response inspector
* Change 2 example flows to use simple evals. Fix bg of toolbar buttons.
* Update version and rebuild react
* Add LLM scorer node (#107)
* Modularize the LLM list container, extracting it from prompt node
* Working LLM scorer node
* Bug and minor fixes
* Change modals to use perc left.
* Add inspect response footer to LLMEvalNode.
* Make Play buttons light green
* Fix React errors w keys in JSX arrays
* Add Chat Turn node and support for chat history (#108)
* Adds chat_history across backend's cache and querying mechanisms.
* Adds Chat Turn nodes, which allow for continuing a conversation.
* Adds automatic conversions of ChatHistory (in OpenAI format) to Anthropic and Google PaLM's chat formats. Converts chat history to appropriate format and passes it as context in the API call.
* Bug fix and error popup when missing past convo in Chat Turn
* Bug squashing to progress in chat turn node
* bug squashing
* Color false scores bright red in eval inspector
* fix tooltip when cont chat present
* Rebuild react
* bug fix llm eval node
* Add HF chat model support.
* Show multiple response objs in table inspector view
* Fix LLM item deletion bug
* Rebuild react and update package version
* Fix obscure bug when LLM outputs have no 'llm' property (due to prior CF version)
* Fix isLooselyEqual bug
* Update examples so that their cached 'fields' include llm nicknames
* rebuild react
* Add Chelse to readme
* Make vars in inspect table view multiline
* Choose var to use for columns in table view of resp inspector
* Only default to prompt var as column if num vars > 1
* Rebuild react and update package version
* Invalidate eval node upon upstream changes.
* Chain update pings across nodes. Autoresize textfields when typing.
* Wide output handles when entire node is output
* update package version