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

feat: Add AI tool building capabilities #7336

Merged
merged 449 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
449 commits
Select commit Hold shift + click to select a range
b43b824
:zap: Minor code improvement of logWrapper
janober Sep 8, 2023
d136aa5
:zap: Hide CanvasAddButton when Chat Trigger is present
janober Sep 8, 2023
316455e
:zap: Change position of Chat Trigger in Node Creator
janober Sep 8, 2023
5028602
:fire: Remove unused RetrieverVectorStore properties
OlegIvaniv Sep 8, 2023
53f3916
:zap: Fix logWrapper for BaseLLMs
janober Sep 8, 2023
1e6ce76
feat: Add Output Parsers
janober Sep 9, 2023
c56855b
:zap: Small optimization on ChainStructuredOutput Node
janober Sep 9, 2023
7e573c7
feat(core): Add SqlAgent node (#7140)
OlegIvaniv Sep 10, 2023
0385103
Merge branch 'master' into ai-tool-creation
janober Sep 10, 2023
6feb599
:zap: Fix wrongly formatted package file
janober Sep 10, 2023
981197c
feat: Add Structured Output Parser
janober Sep 11, 2023
23ff97d
Merge remote-tracking branch 'origin/master' into pay-356-enable-new-…
valya Sep 11, 2023
04efefb
feat(core): Add support for Supabase Vector Store (#7152)
OlegIvaniv Sep 14, 2023
25249c9
Merge remote-tracking branch 'origin/master' into pay-356-enable-new-…
valya Sep 14, 2023
f1209b1
fix: Expression evaluator not being set for node subtitles
valya Sep 14, 2023
e4a20d4
feat(editor): Implement AI tree-execution view (#7167)
OlegIvaniv Sep 14, 2023
e4bad39
Merge branch 'master' into ai-tool-creation
janober Sep 14, 2023
3ba7437
:bug: Fix LM input parsing in AI View
OlegIvaniv Sep 14, 2023
3734746
Merge branch 'ai-tool-creation' of github.com:n8n-io/n8n into ai-tool…
janober Sep 14, 2023
6d751ce
feat(core): Implement Redis Chat Memory (#7174)
OlegIvaniv Sep 14, 2023
4bbfda4
feat(core): Implement ReAct Agent & OpenAiFunctions Agent nodes (#7178)
OlegIvaniv Sep 14, 2023
f4a0c10
feat(editor): Restyle supplemental connectors (#7148)
alexgrozav Sep 14, 2023
4ff04e4
feat: Add support for Anthropic/Claude
janober Sep 15, 2023
bc6806d
:zap: Improve Anthropic/Claude icon
janober Sep 15, 2023
11d92a8
:zap: Minor improvements
janober Sep 15, 2023
4139e1b
bug(editor): Fix issue that it created invalid connections on node
janober Sep 15, 2023
d0a1a83
bug(editor): Fix display of Output Parsers category
janober Sep 15, 2023
ac7ccff
:zap: Random small fixes
janober Sep 15, 2023
4fbfb42
:zap: Improve error reporting
janober Sep 15, 2023
c172681
feat: Add Ollama support
janober Sep 17, 2023
8ccf573
:zap: Update langchain package to 0.0.150
janober Sep 18, 2023
7c83d99
Merge remote-tracking branch 'origin/pay-356-enable-new-evaluator-con…
janober Sep 18, 2023
8714677
feat: Add LangChain Code Node (#7155)
janober Sep 18, 2023
1d32f3a
:zap: Fix lint issue
janober Sep 18, 2023
1d78fa4
:zap: Change order of output types selection
janober Sep 18, 2023
684485c
Merge branch 'master' into ai-tool-creation
janober Sep 18, 2023
92bbdbe
feat: Add Zep Memory and Vectore Store support
janober Sep 19, 2023
d95629e
bug(editor): Do not allow for two outputs to be connected
janober Sep 19, 2023
c39dcf8
Merge branch 'master' into ai-tool-creation
janober Sep 19, 2023
da2a1f5
feat: Make it possible to supply additional data to Workflow called by
janober Sep 19, 2023
2c62f3c
:zap: Improve error reporting of tools
janober Sep 19, 2023
ed3c2e8
feat: Update node colors on canvas (#7199)
alexgrozav Sep 20, 2023
c97a523
:zap: Display JSON toggle in AI Logs only if the displayed content
janober Sep 20, 2023
88df24e
:zap: Throw error when wrong loader on Binary to Document node is
janober Sep 20, 2023
50a1118
:zap: Improve general error reporting
janober Sep 20, 2023
2d68e58
:zap: Add descriptions for Summarization Chain types
janober Sep 20, 2023
e1de989
:zap: Fix credential documentation links
janober Sep 21, 2023
9e97235
:zap: Automatically set the first node as active in AI Logs
janober Sep 21, 2023
6541864
Merge remote-tracking branch 'origin/master' into ai-tool-creation
netroy Sep 21, 2023
6b3582f
bug(core): Fix issue that log indexes were messed up
janober Sep 22, 2023
6b848e4
:zap: Fix issues & improve parameter order
janober Sep 22, 2023
f2d14dd
:zap: Give property a more generic name (breaks dislpay of old
janober Sep 22, 2023
1d7a5f0
:zap: Allow drop of output connections to display compatible nodes
janober Sep 22, 2023
24b5166
feat(editor): Update node styling, connector styling and grouping (#7…
alexgrozav Sep 22, 2023
0f66b45
Merge branch 'master' into ai-tool-creation
janober Sep 22, 2023
61b5158
bug: Fix automatic connections
janober Sep 22, 2023
d5abf9a
:zap: Fix icons on scaled nodes
janober Sep 22, 2023
177076f
:zap: Make sub-nodes clearer in node creator
janober Sep 22, 2023
95c516b
:zap: Make displaying of sub-nodes more generic
janober Sep 23, 2023
0d7e801
:zap: Improve size of icons of configurable nodes
janober Sep 23, 2023
9f28cc6
:zap: Standardise document loader names and descriptions
janober Sep 23, 2023
a37ac8d
:zap: Make sure nodes move as a group when node gets injected
janober Sep 23, 2023
21bd03f
:zap: Make also keyboard shortcut for multi select work
janober Sep 23, 2023
43fd533
feat(core): Simplify code and add ConnectionType namespace
janober Sep 25, 2023
72008e4
:zap: Slighly improve selected style of nodes
janober Sep 25, 2023
6893e2c
:zap: Remove type subtitle
janober Sep 25, 2023
669ca5a
:zap: Hide output names once connection has been made
janober Sep 25, 2023
bd08cb2
:zap: Match brand names exactly (#7249)
StarfallProjects Sep 25, 2023
62a37fd
:zap: Make supplemental labels easier to read
janober Sep 25, 2023
fd67541
:zap: Apply same style for pulling connections of non-main connectors
janober Sep 25, 2023
3703d43
Adding anthropic SVG instead of PNG
jesper-bylund Sep 25, 2023
c287060
Set all the langchain icons to currentColor
jesper-bylund Sep 25, 2023
2d32985
:zap: Hardcode colors in icons for now until we can make currentColor…
janober Sep 26, 2023
3c59c17
:zap: Fix offset positions of newly created nodes
janober Sep 26, 2023
c8fd98e
feat(editor): Implement input mapping mode for config nodes (#7259)
OlegIvaniv Sep 26, 2023
81d99db
:zap: Rename InMemory Vector Store node
janober Sep 26, 2023
1775dc4
:zap: Fix langchain package name
janober Sep 26, 2023
4df7e03
:zap: Add doc links to nodes
janober Sep 26, 2023
621f9bd
Revert ":zap: Fix langchain package name"
janober Sep 26, 2023
bd861ea
:zap: Fix anthropic icon
janober Sep 26, 2023
918e2d5
feat(editor): Add various AI Tool UX improvements (no-changelog) (#7264)
alexgrozav Sep 26, 2023
0ee032b
:zap: Some node name changes
janober Sep 26, 2023
d5b2f67
feat(core): Google PaLM/Cohere/TensorFlow/HuggingFace embeddings, Goo…
OlegIvaniv Sep 26, 2023
ef642ef
Merge branch 'master' into ai-tool-creation-breaking
janober Sep 26, 2023
8458625
:zap: Update langchain to version 0.154.0
janober Sep 26, 2023
feae0be
:bug: Use `helpers.getBinaryDataBuffer` to correctly get binary data …
OlegIvaniv Sep 26, 2023
314f9d9
:zap: Rename langchain nodes package (breaking-change)
janober Sep 27, 2023
fd12bc9
Merge branch 'ai-tool-creation-breaking' of github.com:n8n-io/n8n int…
janober Sep 27, 2023
e11426e
feat(editor): Restructure AI node creator view (#7276)
OlegIvaniv Sep 27, 2023
541af8b
:zap: Improve descriptions
janober Sep 27, 2023
e07bf58
:zap: Change Splitter icons
janober Sep 27, 2023
4445542
:art: Improve filtering of models for OpenAI Chat/LM
OlegIvaniv Sep 27, 2023
c30e00e
Copy roundup (#7278)
StarfallProjects Sep 27, 2023
a184027
:bug: Fix sorting of agents/chain in AI root view
OlegIvaniv Sep 27, 2023
22745e4
:sparkles: Add miscellaneous category
OlegIvaniv Sep 27, 2023
127eea2
:zap: Add additional description to vector store nodes
janober Sep 27, 2023
16823cc
:zap: Also change the Text Splitter icon in the menu
janober Sep 27, 2023
1321ea6
Update packages/@n8n/nodes-langchain/nodes/agents/OpenAiFunctionsAgen…
StarfallProjects Sep 27, 2023
ece4dd4
Use gpt-3.5-turbo-instruct as default OpenAI LM model
OlegIvaniv Sep 28, 2023
9183e1e
:zap: Remove Vector QA chain and just have a single QA one instead
janober Sep 28, 2023
19c6948
:zap: Fix display of log for Vector Store Retriever
janober Sep 29, 2023
7c2f0c1
:bug: Fix keydown events propagation when chat is open
OlegIvaniv Sep 29, 2023
d0ecd95
feat: Combine all Agents into one
janober Sep 29, 2023
972b67c
Merge branch 'ai-tool-creation-breaking' of github.com:n8n-io/n8n int…
janober Sep 29, 2023
d7d1b64
feat(core): AI Nodes text changes (#7302)
OlegIvaniv Sep 29, 2023
128fce6
:bug: Fix OpenAIFunction and ReAct agents
OlegIvaniv Sep 29, 2023
e41e2c5
feat(editor): Implement beta release UI changes (#7291)
OlegIvaniv Sep 29, 2023
0e00fb1
:zap: Remove StructuredOutput Chain
janober Sep 29, 2023
f7407e0
:goal_net: Check for correct models when using Conversational & OpenA…
OlegIvaniv Sep 29, 2023
ea3f53e
:zap: Update package information
janober Sep 29, 2023
7dc3df3
:zap: Set version number
janober Sep 29, 2023
44023a8
Merge branch 'master' into ai-tool-creation-breaking
janober Sep 29, 2023
0e381df
:zap: Remove run mode and added default prompt to ChainRetrievalQA
janober Sep 29, 2023
04027e5
:bug: Fix SQL Agent credentials
OlegIvaniv Sep 29, 2023
b371732
feat(core): Allow to override agent/chain system messages (#7306)
OlegIvaniv Sep 29, 2023
2490f2f
:zap: Fix option order
janober Sep 29, 2023
0eef6bd
:zap: Fix data transfer + improve error reporting in ToolWorkflow
janober Sep 29, 2023
ca7384c
:bug: Refresh AI Logs in Chat on new message
OlegIvaniv Sep 29, 2023
a414c4f
💄 Prevent LM Chat message overflow & add logs title
OlegIvaniv Sep 29, 2023
20d61de
:bug: Fix InputPanel noOutputData state for config node nodes
OlegIvaniv Sep 29, 2023
2a41ba4
:zap: Add AI nodes also to trigger view
janober Sep 29, 2023
b598591
:speech_balloon: Update summarization chain types description
OlegIvaniv Sep 29, 2023
c24943a
:lipstick: Fix node-options context menu positions & increase hover area
OlegIvaniv Sep 29, 2023
866521b
feat: Add AI tool creation chatbot widget (#7137)
alexgrozav Sep 30, 2023
4e634dc
:zap: Fix issue that ToolWorkflow did not display errors correctly
janober Sep 30, 2023
b7478a0
feat(core): Support some of the Postgres SSL opens in AI Agent (#7309)
Joffcom Sep 30, 2023
e5c9068
Merge branch 'ai-tool-creation-breaking' of github.com:n8n-io/n8n int…
janober Sep 30, 2023
e983dc8
:zap: Fix issue that ToolWorkflow did not display an helpful error on
janober Sep 30, 2023
e776a9f
feat: Add MultiQuery Retriever
janober Oct 1, 2023
603f490
feat: Add Workflow Retriever
janober Oct 1, 2023
f70286a
:zap: Change namespace in ItemListOutputParser
janober Oct 2, 2023
ee5d870
:zap: Fix some lint issues
janober Oct 2, 2023
391c258
:zap: Update n8n-nodes-langchain package version to 0.0.2
janober Oct 2, 2023
b7f51c4
:zap: Remove package.json from eslint to fix error for now
janober Oct 2, 2023
58eacec
:bug: Fix preview environment canvas rendering issues
OlegIvaniv Oct 2, 2023
1fa7adb
Merge remote-tracking branch 'origin/master' into ai-tool-creation-br…
netroy Oct 2, 2023
dbfd5b8
enable lazy-loading for n8n-nodes-langchain
netroy Oct 2, 2023
a4dfde1
:zap: Hide "Execute Node" button also for dynamic inputs
janober Oct 2, 2023
a757bf1
:zap: Fix issue with code nodes and main input
janober Oct 2, 2023
003340f
Debs editing (#7317)
StarfallProjects Oct 2, 2023
2676b10
:zap: Another fix for hide "Execute Node" button
janober Oct 2, 2023
3397ac0
:zap: Prepare for correct parameter resolution in sub-nodes
janober Oct 2, 2023
88b920c
:zap: Add license file to @n8n/chat
janober Oct 2, 2023
4d9032f
:zap: Fix @n8n/chat exmple workflow to work with new agent nodes
janober Oct 2, 2023
5775f6d
:zap: Very minor code improvement
janober Oct 2, 2023
6f12e64
:zap: Fix issue that sometimes AI-logs did not get saved
janober Oct 2, 2023
fb37ce3
:zap: Display helpful error message if input/prompt/text is empty
janober Oct 3, 2023
1b8f0d9
:zap: Change default tool names to be OpenAI Functions compatible
janober Oct 3, 2023
9103d3e
fix(core): Use regular LLM chain if there's no output parser (#7330)
OlegIvaniv Oct 3, 2023
e5f84c3
:bug: Fix RunDataAi not updating based on run & error message when cl…
OlegIvaniv Oct 3, 2023
80c2475
:zap: Update n8n-nodes-langchain version + slighly update README
janober Oct 3, 2023
2cdc092
docs: Add LangChain section to README (#7332)
StarfallProjects Oct 3, 2023
18d4c88
Merge branch 'ai-tool-creation-breaking' of github.com:n8n-io/n8n int…
janober Oct 3, 2023
7f886bd
Merge branch 'master' into ai-beta
janober Oct 3, 2023
1423aa4
Merge branch 'master' into ai-beta
janober Oct 3, 2023
6ce92ce
:zap: Update README links for nodes + chat
janober Oct 3, 2023
edb8038
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Oct 3, 2023
241d663
fix(editor): Fix rare dragging exception and unify LLM chain outputKe…
OlegIvaniv Oct 4, 2023
ab93610
bug(editor): Fix filter not used when inputs defined as expression
janober Oct 4, 2023
679e44b
feat: Update chat widget to work without bundler (no-changelog) (#7352)
alexgrozav Oct 5, 2023
810a64c
Merge branch 'master' into ai-beta
janober Oct 5, 2023
7bbc5f7
:zap: Remove no longer used connection type AiVectorRetriever
janober Oct 5, 2023
c120833
refactor(core): Refactor InMemory Vector Store to support Inser & Loa…
OlegIvaniv Oct 6, 2023
c8c9ba4
:zap: Make sure that it always auto selects a node with data
janober Oct 7, 2023
8da80bb
:zap: Remove old debug console.log
janober Oct 7, 2023
7b8482f
:zap: Make $parameter expressions of sub-nodes resolve correctly in UI
janober Oct 7, 2023
d6487cd
:zap: Add baseURL support to OpenAI nodes
janober Oct 7, 2023
7046c7b
:zap: Fix zep authentication
janober Oct 8, 2023
3a430fa
Merge branch 'master' into ai-beta
janober Oct 9, 2023
c620a2d
:bug: Expose this.logger to Langchain code sandbox & fix example conn…
OlegIvaniv Oct 10, 2023
a5f51e1
fix(core): Fetch Ollama models dynamically (#7395)
OlegIvaniv Oct 10, 2023
0f0469d
:hammer: Fix langchain packaged dev watcher and add dev:ai to root pa…
OlegIvaniv Oct 11, 2023
70ad1fd
:zap: Clean up interface of getInputConnectionData
janober Oct 12, 2023
2ea8a49
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Oct 12, 2023
ca8caed
:zap: Update n8n-nodes-langchain package version to 0.2.0
janober Oct 12, 2023
09338e4
cleanup @n8n/nodes-langchain dependencies
netroy Oct 12, 2023
bb9aee1
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Oct 13, 2023
d0b3f98
fix: Fix readme workflow link in @n8n/chat package (#7438)
alexgrozav Oct 13, 2023
13fff63
Merge branch 'master' into ai-beta
janober Oct 13, 2023
52f34f8
fix: Always stringify workflow tool outpus (#7447)
OlegIvaniv Oct 16, 2023
7e2f658
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Oct 17, 2023
77d3c2f
:zap: Add back dependencies
janober Oct 18, 2023
fbc9aee
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Oct 20, 2023
4faa35e
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Oct 20, 2023
6e6aaac
feat(core): Improve structured schema & add maxIteration for agents (…
OlegIvaniv Oct 20, 2023
7a09c57
feat(core): Add support to include system/ai/human pre-messages for L…
OlegIvaniv Oct 24, 2023
583344f
feat(core): Add support for metadata setting and filtering from vecto…
OlegIvaniv Oct 24, 2023
bae045e
Merge branch 'master' into ai-beta
janober Oct 24, 2023
1b1b2ac
Merge branch 'master' into ai-beta
janober Oct 25, 2023
16f0f3b
Merge branch 'master' into ai-beta
janober Oct 26, 2023
bf23f9f
:zap: Add missing dependency to make csv loading work
janober Oct 26, 2023
7f9324f
fix(core): Fix basic LLM chain failing if query contains curly bracke…
OlegIvaniv Oct 30, 2023
a3334b3
update vector store links (#7562)
StarfallProjects Oct 31, 2023
10c5151
feat(core): Add support for Huggin Face inference endpoints to LM and…
OlegIvaniv Oct 31, 2023
62bc10c
feat(core): Merge & refactor vector store nodes & allow for similiari…
OlegIvaniv Nov 1, 2023
6c74709
Merge branch 'master' into ai-beta
janober Nov 1, 2023
81779de
feat(core): Add support for AWS Bedrock LMs & Embeddings (#7581)
OlegIvaniv Nov 2, 2023
48ca24d
refactor: Rearrange Supabase & Pinecone vector store fields (#7589)
OlegIvaniv Nov 2, 2023
a17af21
Merge branch 'master' into ai-beta
janober Nov 2, 2023
1859850
:zap: Fix output labels in dark mode
janober Nov 2, 2023
09bc934
Merge branch 'master' into ai-beta
janober Nov 2, 2023
b36e2f9
docs: Update vector-store docs links (#7594)
OlegIvaniv Nov 2, 2023
443d437
:zap: Update n8n-nodes-langchain package version to 0.3.0
janober Nov 2, 2023
a6d4390
Merge branch 'ai-beta' of github.com:n8n-io/n8n into ai-beta
janober Nov 2, 2023
35c5471
Merge branch 'master' into ai-beta
janober Nov 3, 2023
ca8e4e0
docs: Update two docs links (#7638)
StarfallProjects Nov 7, 2023
93a26d6
Merge branch 'master' into ai-beta
OlegIvaniv Nov 8, 2023
9b8c08a
feat(core): Langchain nodes tweaks (#7640)
michael-radency Nov 8, 2023
6009cac
feat(core): AI usability improvements (#7627)
OlegIvaniv Nov 8, 2023
39971d4
Fixed chat messages colors for dark mode.
gandreini Nov 9, 2023
e108bdd
feat: Add Plan and Execute Agent Type (#7632)
MasonGeloso Nov 10, 2023
bca30ed
feat: Add AI features unit and e2e tests (#7513)
alexgrozav Nov 10, 2023
962974e
chore: revert icon changes
mutdmour Nov 14, 2023
3f6f215
Merge branch 'master' into ai-beta
OlegIvaniv Nov 14, 2023
11aa3b2
fix: Prevent hanging AI executions (#7680)
janober Nov 14, 2023
2f9de97
remove custom CORS support from webhook node
netroy Nov 14, 2023
0fd745d
:wrench: Increase the default timeout for OpenAI models to 1min
OlegIvaniv Nov 15, 2023
5ec1515
feat: Enable to input image in Basic LLM Chain & render it in the exe…
OlegIvaniv Nov 17, 2023
f0dfa60
Merge branch 'master' into ai-beta
janober Nov 20, 2023
fbead38
Merge branch 'master' into ai-beta
janober Nov 20, 2023
97d8957
:wrench: Add Anthropic Claudia 2.1 model option
OlegIvaniv Nov 21, 2023
514b657
:bug: Correctly escape curly brackets when using chat prompts
OlegIvaniv Nov 22, 2023
2d93290
Merge branch 'master' into ai-beta
OlegIvaniv Nov 22, 2023
428ac05
Merge branch 'master' into ai-beta
OlegIvaniv Nov 22, 2023
1fd67ae
feat(editor): Floating NDV connected nodes (#7776)
OlegIvaniv Nov 23, 2023
de4b513
:bug: Fix GPT vision image detail when using URL
OlegIvaniv Nov 23, 2023
9093860
Merge branch 'master' into ai-beta
OlegIvaniv Nov 27, 2023
967cd0d
🔀 Fix merging issues
OlegIvaniv Nov 27, 2023
a5eb5f2
:bug: Fix sub-nodes error rendering
OlegIvaniv Nov 27, 2023
22bb0aa
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 27, 2023
e27ce87
Revert "fix: Prevent hanging AI executions (#7680)"
netroy Nov 27, 2023
fef4f9a
update build targets
netroy Nov 27, 2023
839b9d7
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 27, 2023
64b17d5
lintfix
netroy Nov 27, 2023
170af86
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 27, 2023
b116cc5
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 27, 2023
d3f820f
✅ Fix editor unit tests store imports
OlegIvaniv Nov 27, 2023
cf8f6fd
:wrench: Enable MD support for textLoader
OlegIvaniv Nov 28, 2023
c8159d4
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 28, 2023
e1d3500
switch back to the success notification on manual execution cancellation
netroy Nov 28, 2023
c1c5dda
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 28, 2023
cc52e1e
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 28, 2023
e56fcaa
fix editor tests
netroy Nov 28, 2023
1edd0fd
fix(core): Tweaks for Some AI nodes (no-changelog) (#7774)
michael-radency Nov 28, 2023
8d02f70
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 28, 2023
e5774cd
feat: OpenAI assistant (#7795)
OlegIvaniv Nov 28, 2023
c14f75f
Merge branch 'master' into ai-beta
OlegIvaniv Nov 29, 2023
900d3a6
Merge remote-tracking branch 'origin/master' into ai-beta
netroy Nov 29, 2023
4f4dd1f
Update cal.svg
netroy Nov 29, 2023
5030ca3
Update Code.node.ts
netroy Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions cypress/composables/modals/chat-modal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Getters
*/

export function getManualChatModal() {
return cy.getByTestId('lmChat-modal');
}

export function getManualChatInput() {
return cy.getByTestId('workflow-chat-input');
}

export function getManualChatSendButton() {
return getManualChatModal().getByTestId('workflow-chat-send-button');
}

export function getManualChatMessages() {
return getManualChatModal().get('.messages .message');
}

export function getManualChatModalCloseButton() {
return getManualChatModal().get('.el-dialog__close');
}

export function getManualChatModalLogs() {
return getManualChatModal().getByTestId('lm-chat-logs');
}

export function getManualChatModalLogsTree() {
return getManualChatModalLogs().getByTestId('lm-chat-logs-tree');
}

export function getManualChatModalLogsEntries() {
return getManualChatModalLogs().getByTestId('lm-chat-logs-entry');
}

/**
* Actions
*/

export function sendManualChatMessage(message: string) {
getManualChatInput().type(message);
getManualChatSendButton().click();
}

export function closeManualChatModal() {
getManualChatModalCloseButton().click();
}
54 changes: 54 additions & 0 deletions cypress/composables/modals/credential-modal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* Getters
*/

export function getCredentialConnectionParameterInputs() {
return cy.getByTestId('credential-connection-parameter');
}

export function getCredentialConnectionParameterInputByName(name: string) {
return cy.getByTestId(`parameter-input-${name}`);
}

export function getEditCredentialModal() {
return cy.getByTestId('editCredential-modal', { timeout: 5000 });
}

export function getCredentialSaveButton() {
return cy.getByTestId('credential-save-button', { timeout: 5000 });
}

export function getCredentialDeleteButton() {
return cy.getByTestId('credential-delete-button');
}

export function getCredentialModalCloseButton() {
return getEditCredentialModal().find('.el-dialog__close').first();
}

/**
* Actions
*/

export function setCredentialConnectionParameterInputByName(name: string, value: string) {
getCredentialConnectionParameterInputByName(name).type(value);
}

export function saveCredential() {
getCredentialSaveButton().click({ force: true });
}

export function closeCredentialModal() {
getCredentialModalCloseButton().click();
}

export function setCredentialValues(values: Record<string, any>, save = true) {
Object.entries(values).forEach(([key, value]) => {
setCredentialConnectionParameterInputByName(key, value);
});

if (save) {
saveCredential();
closeCredentialModal();
}
}
73 changes: 73 additions & 0 deletions cypress/composables/ndv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/**
* Getters
*/

export function getCredentialSelect(eq = 0) {
return cy.getByTestId('node-credentials-select').eq(eq);
}

export function getCreateNewCredentialOption() {
return cy.getByTestId('node-credentials-select-item-new');
}

export function getBackToCanvasButton() {
return cy.getByTestId('back-to-canvas');
}

export function getExecuteNodeButton() {
return cy.getByTestId('node-execute-button');
}

export function getParameterInputByName(name: string) {
return cy.getByTestId(`parameter-input-${name}`);
}

export function getInputPanel() {
return cy.getByTestId('input-panel');
}

export function getMainPanel() {
return cy.getByTestId('node-parameters');
}

export function getOutputPanel() {
return cy.getByTestId('output-panel');
}

export function getOutputPanelDataContainer() {
return getOutputPanel().getByTestId('ndv-data-container');
}

export function getOutputPanelTable() {
return getOutputPanelDataContainer().get('table');
}

/**
* Actions
*/

export function openCredentialSelect(eq = 0) {
getCredentialSelect(eq).click();
}

export function setCredentialByName(name: string) {
openCredentialSelect();
getCredentialSelect().contains(name).click();
}

export function clickCreateNewCredential() {
openCredentialSelect();
getCreateNewCredentialOption().click();
}

export function clickGetBackToCanvas() {
getBackToCanvasButton().click();
}

export function clickExecuteNode() {
getExecuteNodeButton().click();
}

export function setParameterInputByName(name: string, value: string) {
getParameterInputByName(name).clear().type(value);
}
142 changes: 142 additions & 0 deletions cypress/composables/workflow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import { ROUTES } from '../constants';
import { getManualChatModal } from './modals/chat-modal';

/**
* Types
*/

export type EndpointType =
| 'ai_chain'
| 'ai_document'
| 'ai_embedding'
| 'ai_languageModel'
| 'ai_memory'
| 'ai_outputParser'
| 'ai_tool'
| 'ai_retriever'
| 'ai_textSplitter'
| 'ai_vectorRetriever'
| 'ai_vectorStore';

/**
* Getters
*/

export function getAddInputEndpointByType(nodeName: string, endpointType: EndpointType) {
return cy.get(
`.add-input-endpoint[data-jtk-scope-${endpointType}][data-endpoint-name="${nodeName}"]`,
);
}

export function getNodeCreatorItems() {
return cy.getByTestId('item-iterator-item');
}

export function getExecuteWorkflowButton() {
return cy.getByTestId('execute-workflow-button');
}

export function getManualChatButton() {
return cy.getByTestId('workflow-chat-button');
}

export function getNodes() {
return cy.getByTestId('canvas-node');
}

export function getNodeByName(name: string) {
return cy.getByTestId('canvas-node').filter(`[data-name="${name}"]`).eq(0);
}

export function getConnectionBySourceAndTarget(source: string, target: string) {
return cy
.get('.jtk-connector')
.filter(`[data-source-node="${source}"][data-target-node="${target}"]`)
.eq(0);
}

export function getNodeCreatorSearchBar() {
return cy.getByTestId('node-creator-search-bar');
}

export function getNodeCreatorPlusButton() {
return cy.getByTestId('node-creator-plus-button');
}

/**
* Actions
*/

export function addNodeToCanvas(
nodeDisplayName: string,
plusButtonClick = true,
preventNdvClose?: boolean,
action?: string,
) {
if (plusButtonClick) {
getNodeCreatorPlusButton().click();
}

getNodeCreatorSearchBar().type(nodeDisplayName);
getNodeCreatorSearchBar().type('{enter}');
cy.wait(500);
cy.get('body').then((body) => {
if (body.find('[data-test-id=node-creator]').length > 0) {
if (action) {
cy.contains(action).click();
} else {
// Select the first action
cy.get('[data-keyboard-nav-type="action"]').eq(0).click();
}
}
});

if (!preventNdvClose) cy.get('body').type('{esc}');
}

export function navigateToNewWorkflowPage(preventNodeViewUnload = true) {
cy.visit(ROUTES.NEW_WORKFLOW_PAGE);
cy.waitForLoad();
cy.window().then((win) => {
win.preventNodeViewBeforeUnload = preventNodeViewUnload;
});
}

export function addSupplementalNodeToParent(
nodeName: string,
endpointType: EndpointType,
parentNodeName: string,
) {
getAddInputEndpointByType(parentNodeName, endpointType).click({ force: true });
getNodeCreatorItems().contains(nodeName).click();
getConnectionBySourceAndTarget(parentNodeName, nodeName).should('exist');
}

export function addLanguageModelNodeToParent(nodeName: string, parentNodeName: string) {
addSupplementalNodeToParent(nodeName, 'ai_languageModel', parentNodeName);
}

export function addMemoryNodeToParent(nodeName: string, parentNodeName: string) {
addSupplementalNodeToParent(nodeName, 'ai_memory', parentNodeName);
}

export function addToolNodeToParent(nodeName: string, parentNodeName: string) {
addSupplementalNodeToParent(nodeName, 'ai_tool', parentNodeName);
}

export function addOutputParserNodeToParent(nodeName: string, parentNodeName: string) {
addSupplementalNodeToParent(nodeName, 'ai_outputParser', parentNodeName);
}

export function clickExecuteWorkflowButton() {
getExecuteWorkflowButton().click();
}

export function clickManualChatButton() {
getManualChatButton().click();
getManualChatModal().should('be.visible');
}

export function openNode(nodeName: string) {
getNodeByName(nodeName).dblclick();
}
13 changes: 13 additions & 0 deletions cypress/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const INSTANCE_MEMBERS = [

export const MANUAL_TRIGGER_NODE_NAME = 'Manual Trigger';
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking "Execute Workflow"';
export const MANUAL_CHAT_TRIGGER_NODE_NAME = 'Manual Chat Trigger';
export const SCHEDULE_TRIGGER_NODE_NAME = 'Schedule Trigger';
export const CODE_NODE_NAME = 'Code';
export const SET_NODE_NAME = 'Set';
Expand All @@ -41,10 +42,22 @@ export const TRELLO_NODE_NAME = 'Trello';
export const NOTION_NODE_NAME = 'Notion';
export const PIPEDRIVE_NODE_NAME = 'Pipedrive';
export const HTTP_REQUEST_NODE_NAME = 'HTTP Request';
export const AGENT_NODE_NAME = 'AI Agent';
export const BASIC_LLM_CHAIN_NODE_NAME = 'Basic LLM Chain';
export const AI_MEMORY_WINDOW_BUFFER_MEMORY_NODE_NAME = 'Window Buffer Memory';
export const AI_TOOL_CALCULATOR_NODE_NAME = 'Calculator';
export const AI_TOOL_CODE_NODE_NAME = 'Custom Code Tool';
export const AI_TOOL_WIKIPEDIA_NODE_NAME = 'Wikipedia';
export const AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME = 'OpenAI Chat Model';
export const AI_OUTPUT_PARSER_AUTO_FIXING_NODE_NAME = 'Auto-fixing Output Parser';

export const META_KEY = Cypress.platform === 'darwin' ? '{meta}' : '{ctrl}';

export const NEW_GOOGLE_ACCOUNT_NAME = 'Gmail account';
export const NEW_TRELLO_ACCOUNT_NAME = 'Trello account';
export const NEW_NOTION_ACCOUNT_NAME = 'Notion account';
export const NEW_QUERY_AUTH_ACCOUNT_NAME = 'Query Auth account';

export const ROUTES = {
NEW_WORKFLOW_PAGE: '/workflow/new',
};
Loading