* Add loading spinner overlay to Response Inspector when it hangs on UI reload
* Use Mantine React Table in Response Inspector
* Merge toolbar into Mantine React Table toolbar, to save space
* Disable counting num of matches in search bar, since this is non-trivial now. We might merge later, but the user can use the num of items in the table view as a proxy.
* Adds `StringLookup` table. Change types related to `LLMResponse`s with a `StringOrHash` type, which can be a string or a number.
* Import/export the lookup table when importing/exporting the flow state.
* Update package version
* feat(bedrock_llama3): added support for Llama3 (#270)
- added also Claude 3 Opus to the list of models
- replaced hardcoded model Id strings with refs to NativeLLM enum
* chore: bump @mirai73/bedrock-fm library (#277)
- the new version adds source code to facilitate debugging
Co-authored-by: ianarawjo <fatso784@gmail.com>
* Adding together.ai support (#280)
---------
Co-authored-by: ianarawjo <fatso784@gmail.com>
* Add Together.ai and update Bedrock models
---------
Co-authored-by: Massimiliano Angelino <angmas@amazon.com>
Co-authored-by: Can Bal <canbal@users.noreply.github.com>
* Refactor: modularize response boxes into a separate component
* Type store.js. Change info to vars. NOTE: This may break backwards compat.
* Refactor addNodes in App.tsx to be simpler.
* Turn AlertModal into a Provider with useContext
* Remove fetch_from_backend.
* Add build/ to gitignore
* Add support for image models and add Dall-E models.
* Better rate limiting with Bottleneck
* Fix new Chrome bug with file import readers not appearing as arrays; and fix bug with exportCache
* Add ability to add custom right-click context menu items per node
* Convert to/from TF and Items nodes
* Add lazyloader for images
* Add compression to images by default before storing in cache
* Add image compression toggle in Global Settings
* Move Alert Provider to top level of index.js
* Adding support for Amazon Bedrock models (#247)
* Create global setting for GenAI features provider, to support Bedrock (Anthropic) models as an alternative
* Reformats dropdown in PromptNode to use Mantine ContextMenu with a nested menu, to save space.
* Remove build folder from git
* Fix context menu to close on click-off. Refactor context menu array code.
* Ensure context menu is positioned below the Add+ button, like a proper dropdown.
* Toggle context menu off when clicking btn again.
---------
Co-authored-by: Massimiliano Angelino <angmas@amazon.com>
Adds pyodide WebWorker to run Python scripts, thanks to idea by Shreya.
* Add sandbox option to Python eval nodes.
* Add new Anthropic models
* Disable guards for Python evals on server
* Fix bug with detecting async func in runOverResponses
---------
Co-authored-by: Shreya Shankar <ss.shankar505@gmail.com>
* Adds a purple GenAI button to Code Evaluator Nodes, to allow easier creation of evaluation functions. (NOTE: This, like the TextFields and Items Nodes GenAI features, is experimental and requires an OpenAI API key to access.)
* Adds a drop-down to LLM evaluators
* Ensures LLM evaluators load cache'd responses on load
* Fixes a bug where right-clicking in pop-up Inspectors would bring up the node context menu.
* Internally, refactors evaluator nodes to have inner components that take care of running evaluations, in preparation for multi-eval and running evals elsewhere
* 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>
* 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
* Resizeable textfield in prompt nodes
* Popup when user clicks X to delete node
* Collapseable supergroups in response inspector
* Nicer hierarchical color scheme for response group headers in response inspectors
* Beginning to convert Python backend to Typescript
* Change all fetch() calls to fetch_from_backend switcher
* wip converting query.py to query.ts
* wip started utils.js conversion. Tested that OpenAI API call works
* more progress on converting utils.py to Typescript
* jest tests for query, utils, template.ts. Confirmed PromptPipeline works.
* wip converting queryLLM in flask_app to TS
* Tested queryLLM and StorageCache compressed saving/loading
* wip execute() in backend.ts
* Added execute() and tested w concrete func. Need to test eval()
* Added craco for optional webpack config. Config'd for TypeScript with Node.js packages browserify'd
* Execute JS code on iframe sandbox
* Tested and working JS Evaluator execution.
* wip swapping backends
* Tested TypeScript backendgit status! :) woot
* Added fetchEnvironAPIKeys to Flask server to fetch os.environ keys when running locally
* Route Anthropic calls through Flask when running locally
* Added info button to Eval nodes. Rebuilt react
* Edits to info modal on Eval node
* Remove/error out on Python eval nodes when not running locally.
* Check browser compat and display error if not supported
* Changed all example flows to use JS. Bug fix in query.ts
* Refactored to LLMProvider to streamline model additions
* Added HuggingFace models API
* Added back Dalai call support, routing through Flask
* Remove flask app calls and socketio server that are no longer used
* Added Comment Nodes. Rebuilt react.
* Fix PaLM temp=0 build, update package vers and rebuild react
* Use Mantine Textarea controlled for Textfields node, instead of textarea
* Added Tabular data node
* TabularData context menus
* Make TabularData template hooks responsive to column name changes.
* Reduced spacing between template hooks
* Better table styling and rename column popup
* Add 'carry with' feature to Prompt Permutation recursive generation using `associate_id`
* Much nicer var tags on inspect window
* Nicer styling for LLM group headers in inspect screen
* Pass metavars around in the backend to surface them to front-end
* Set min-height on inspect node to be larger
* Added in-line print in Eval nodes
* Append error message to print output
* Minor inspect node CSS tweaks and fixes
* Removed mix-blend-mode due to performance issues scrolling large text
* Added ground truth eval example for math problems
* Updated React build and version number
* Model settings forms
* Editable nicknames and emojis
* Saving and loading model settings
* Temperature indicator on LLM items in PromptNodes
* Ensure LLM nicknames are unique
* Detect when PaLM blocks responses and output standard error msg in response instead
* Fix examples/ to use new cache format
* Add helpful 'could not reach server' text on countQueries fail
* Add Dalai model settings
* Rebuild react and update package version
* Rename main folders
* Preparing for package deployment
* Use absolute paths and imports
* Move react-server into chainforge dir
* Add MANIFEST.in to copy react-server build over to package
* Add include_package_data
* Add manifest.json and icons to /static.
* Update README.md
* Update GUIDE.md