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/plugins #12547

Merged
merged 1,071 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1071 commits
Select commit Hold shift + click to select a range
7f5e27d
chore: extend form component for override
AkaraChen Dec 27, 2024
697ee49
chore: upd mock form for dev
AkaraChen Dec 27, 2024
67019d1
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Dec 27, 2024
5cdca9c
fix: marketplace i18n
zxhlyh Dec 27, 2024
2f65d04
fix: not parall not group by branch
iamjoel Dec 27, 2024
df5fb6d
feat: agent strategy max iter slider
AkaraChen Dec 27, 2024
ef3e904
feat: model-selector in Agent node (case: installed models)
YIXIAO0 Dec 27, 2024
e34eebf
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Dec 27, 2024
69a6556
tool item
JzoNgKVO Dec 27, 2024
08c517d
feat: iteration support parallel
iamjoel Dec 27, 2024
ed6c962
fix scope features
JzoNgKVO Dec 27, 2024
31cca29
chore: remove test page
iamjoel Dec 27, 2024
e903cd8
fix: llm node
AkaraChen Dec 27, 2024
ae42edb
remove test code
JzoNgKVO Dec 27, 2024
0d2a74b
feat: output var
AkaraChen Dec 27, 2024
04d8d16
chore: fix retry not work in iteration
iamjoel Dec 27, 2024
0d0a4cf
fix: select var
AkaraChen Dec 27, 2024
23913b8
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 27, 2024
e4cc8f7
refact workflow run log
zxhlyh Dec 27, 2024
3a51707
fix: pararllel title
iamjoel Dec 27, 2024
573c8f9
add multiple tool selector
JzoNgKVO Dec 27, 2024
0108b28
feat: model list on agent node
AkaraChen Dec 27, 2024
da2982b
feat: model list on agent node
AkaraChen Dec 27, 2024
3d5620d
fix: parallel start node not insert into the right place
iamjoel Dec 27, 2024
de48a1c
fix: type error
AkaraChen Dec 27, 2024
18393d2
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 27, 2024
6a2a7ac
chore: tool node support agent logs
iamjoel Dec 27, 2024
a863e9f
refact workflow run log
zxhlyh Dec 27, 2024
3c85363
multiple tool selector
JzoNgKVO Dec 27, 2024
891a76f
enabled count
JzoNgKVO Dec 27, 2024
6f8e217
refact workflow run log
zxhlyh Dec 27, 2024
8a90a9b
fix: in steam mode trigger the error in change list
iamjoel Dec 27, 2024
b5ad9a5
default value for multiple tool selector
JzoNgKVO Dec 30, 2024
84febd5
fix: agent log structure
zxhlyh Dec 30, 2024
0c5101f
fix default value for multiple tool selector
JzoNgKVO Dec 30, 2024
f72818b
fix: agent log structure
zxhlyh Dec 30, 2024
98a03b0
fix: agent log structure
zxhlyh Dec 30, 2024
a5509fb
feat: agent node toolbox
AkaraChen Dec 30, 2024
08a1f24
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 30, 2024
ba16cbc
feat: add install options for model configuration
YIXIAO0 Dec 30, 2024
f461f56
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Dec 30, 2024
2ac6f00
fix: agent node toolbox
AkaraChen Dec 30, 2024
cd7e6ca
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 30, 2024
f5b4366
fix: agent node
AkaraChen Dec 30, 2024
2007828
installation state of tool
JzoNgKVO Dec 30, 2024
e1cb85c
fix label of tool picker
JzoNgKVO Dec 30, 2024
afb3548
refactor: agent parameters
AkaraChen Dec 30, 2024
9b6f580
add model install in model configuration for the agent node
YIXIAO0 Dec 30, 2024
1284109
temp
iamjoel Dec 30, 2024
0a30018
chore: one step circle check
iamjoel Dec 30, 2024
d9d42b2
feat: multi step circle
iamjoel Dec 30, 2024
a3f736f
feat: multi steps circle
iamjoel Dec 30, 2024
232fb66
ui fixes in model selector
YIXIAO0 Dec 31, 2024
3a09f43
feat: update the install logic
YIXIAO0 Dec 31, 2024
3bed034
fix: choose tools
iamjoel Dec 31, 2024
eba4042
wip: instruction field
AkaraChen Dec 31, 2024
fe57027
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 31, 2024
df42179
add model info in model selector
JzoNgKVO Dec 31, 2024
e47aaad
remove test codes
JzoNgKVO Dec 31, 2024
4855e87
fix: editor
AkaraChen Dec 31, 2024
f81bbee
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 31, 2024
066595f
chore: remove unused code
AkaraChen Dec 31, 2024
ec2dd75
fix: set a fixed height to the model selection in agent node
YIXIAO0 Dec 31, 2024
2cdf2b2
fix the model icon size in the agent node
YIXIAO0 Dec 31, 2024
21d082f
feat: tool single run
zxhlyh Dec 31, 2024
d7cbbbc
fix: tool single run
zxhlyh Dec 31, 2024
7011a50
merge main
zxhlyh Dec 31, 2024
3e979a5
fix: model selector's trigger ui
YIXIAO0 Dec 31, 2024
b1831bc
fix the model icon ui
YIXIAO0 Dec 31, 2024
2a29dd3
fix: letter list not right
iamjoel Dec 31, 2024
f956c2e
chore: update style
AkaraChen Dec 31, 2024
8707795
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 31, 2024
5bba422
fix model icon size in llm node
YIXIAO0 Dec 31, 2024
cab8c6c
feat: support scroll into letter
iamjoel Dec 31, 2024
504c794
add icons and fix ui typos
YIXIAO0 Dec 31, 2024
8d229f2
fix: card name too long
iamjoel Dec 31, 2024
52537c9
fix: model deprecated in model list
AkaraChen Dec 31, 2024
9e6f3e9
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 31, 2024
be36aed
agent node: fix installed model ui
YIXIAO0 Dec 31, 2024
bc5cd44
agent node single run
zxhlyh Dec 31, 2024
afe8c85
model feature icons
YIXIAO0 Dec 31, 2024
f9ce6b6
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Dec 31, 2024
3c829a1
fix: some style
AkaraChen Dec 31, 2024
91ac660
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Dec 31, 2024
4663af8
tool setting schema
JzoNgKVO Jan 2, 2025
1b8ec67
feat: agent node checklist
AkaraChen Jan 2, 2025
e112357
chore: temp
iamjoel Jan 2, 2025
f11ea5a
fix: title not show all if space is enough
iamjoel Jan 2, 2025
c1ae681
feat: agent checklist i18n
AkaraChen Jan 2, 2025
d3d6067
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 2, 2025
c6c388f
feat: agent checklist i18n
AkaraChen Jan 2, 2025
55aad37
fix: multi loop nodes remove children error
iamjoel Jan 2, 2025
c469da2
fix: handle install title and descript may caused i18n problem
iamjoel Jan 2, 2025
add6dff
feat: agent node check install strategy
AkaraChen Jan 2, 2025
0ed4ec5
fix: agent strategy selector show workflow
AkaraChen Jan 2, 2025
a432fcf
agent node single run
zxhlyh Jan 2, 2025
336b265
feat: agent form string type support var
AkaraChen Jan 2, 2025
87ce813
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 2, 2025
a514bde
fix: marketplace page size
zxhlyh Jan 2, 2025
d5cfb26
feat: support make retry data
iamjoel Jan 2, 2025
f2eb095
feat: strategy install status
AkaraChen Jan 2, 2025
055fb22
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 2, 2025
c458c28
feat: enhance plugin item localization with i18n support
WTW0313 Jan 2, 2025
5fb356f
refactor: rename renderI18nObject to getValueFromI18nObject for clarity
WTW0313 Jan 2, 2025
39335b8
refactor I18n render in plugin detail
JzoNgKVO Jan 3, 2025
5ba0b85
feat: install plugin button
AkaraChen Jan 3, 2025
390107f
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 3, 2025
483890b
fix install in tool item
JzoNgKVO Jan 3, 2025
06f0c3c
refactor: strategy status
AkaraChen Jan 3, 2025
2296bb1
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 3, 2025
fbf9984
refactor: strategy status
AkaraChen Jan 3, 2025
5fdfba6
feat: make iteration
iamjoel Jan 3, 2025
07aa2ca
fix: single run log
zxhlyh Jan 3, 2025
e0ed17a
chore: can generator middle struct
iamjoel Jan 6, 2025
228cd1c
feat: add iteration id
iamjoel Jan 6, 2025
61d2f70
feat: add transform node to node data
iamjoel Jan 6, 2025
15f3e46
refactor: some field name in strategy status
AkaraChen Jan 7, 2025
0beebab
fix: workflow store agent strategy not up to date
AkaraChen Jan 7, 2025
bdb9d67
chore: update switch plugin i18n
AkaraChen Jan 7, 2025
a8c4870
refactor: switch plugin version component to not accept version
AkaraChen Jan 7, 2025
e24b04b
refactor: switch plugin version component to not accept version
AkaraChen Jan 7, 2025
5d25643
fix: group icon style
YIXIAO0 Jan 7, 2025
1419430
chore: upd
AkaraChen Jan 7, 2025
0e98794
feat: use all refresh plugin tools to hooks
iamjoel Jan 7, 2025
0f6cbf2
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 7, 2025
8d39ec1
chart drak mode
JzoNgKVO Jan 3, 2025
f5b2735
theme default light
JzoNgKVO Jan 7, 2025
1348e32
fix balance model z-index
JzoNgKVO Jan 7, 2025
275696e
fix system model selector
JzoNgKVO Jan 7, 2025
910e6d1
feat: adjust strategy selector height
AkaraChen Jan 7, 2025
4c5fa00
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 7, 2025
6d5c345
fix qrcode z-index
JzoNgKVO Jan 7, 2025
e6eae85
chore: update the model install button
YIXIAO0 Jan 7, 2025
ff61c22
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 7, 2025
851fe24
fix: installing info in plugin nav
zxhlyh Jan 7, 2025
48b88b9
feat: i18n text in agent strategy selector
AkaraChen Jan 7, 2025
b39acd0
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 7, 2025
46614cc
fix badge & refresh state of tool install state
JzoNgKVO Jan 7, 2025
8512a7d
chore: update the onOpenModel function to a hook
YIXIAO0 Jan 7, 2025
e207894
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 7, 2025
f03631f
feat: init agent strategy install from marketplace
AkaraChen Jan 7, 2025
aac2184
chore: use install button in tool item
JzoNgKVO Jan 7, 2025
f840b7d
fix: type for tool list
AkaraChen Jan 7, 2025
130cfaf
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 7, 2025
2f5da1f
fix: update model icon
YIXIAO0 Jan 7, 2025
5817c07
feat: local install refresh
iamjoel Jan 7, 2025
a6d172f
feat: github refresh plugin list
iamjoel Jan 7, 2025
768e1b9
fix: wrong tooltip content for switch plugin version
AkaraChen Jan 7, 2025
8561065
node ui fix
YIXIAO0 Jan 7, 2025
0383fce
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 7, 2025
55ad1fe
chore: tool selelct use the same tools data
iamjoel Jan 7, 2025
6006380
fix: tool select ui problem in workflow
iamjoel Jan 7, 2025
99e2eaa
fix: switch plugin version
AkaraChen Jan 8, 2025
3cbb288
feat: add version check i18n
YIXIAO0 Jan 8, 2025
d17932d
fix: install task icon
zxhlyh Jan 8, 2025
adf0d94
unsupported actions
JzoNgKVO Jan 8, 2025
9380614
chore: plugin mutation modal component
AkaraChen Jan 8, 2025
53bb1bb
fix: agent node cannot output var
AkaraChen Jan 8, 2025
98ad18b
fix: agent log
zxhlyh Jan 8, 2025
17dfb36
feat: add version incompatible case
YIXIAO0 Jan 8, 2025
2dac103
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 8, 2025
8c9c336
fix: isInModelList default value
YIXIAO0 Jan 8, 2025
f63cc9e
chore: remove switch version component in strategy select
AkaraChen Jan 8, 2025
b0b373d
fix: revert the modelInList check in the model icon component
YIXIAO0 Jan 8, 2025
fdfe724
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 8, 2025
5e4d2f9
Revert "chore: remove switch version component in strategy select"
AkaraChen Jan 8, 2025
fa83f2e
fix: switch version plugin
AkaraChen Jan 8, 2025
5481b42
dark mode for tracing dropdown
JzoNgKVO Jan 8, 2025
05d273d
fix tracing dropdown
JzoNgKVO Jan 8, 2025
4b01ef2
fix: chat log
zxhlyh Jan 8, 2025
23b29b1
fix: check-dependencies typo and fetch model list typo
YIXIAO0 Jan 8, 2025
755685a
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 8, 2025
2fd0836
feat: new switch plugin version
AkaraChen Jan 8, 2025
f58eef7
feat: switch plugin version changelog
AkaraChen Jan 8, 2025
369e3eb
feat: add version switch in model selector
YIXIAO0 Jan 8, 2025
0fdf7b2
feat: add 'agent' tag to plugin constants and translations
WTW0313 Jan 8, 2025
b656b7a
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
WTW0313 Jan 8, 2025
586f9d8
fix: agent log
zxhlyh Jan 8, 2025
87d7df3
fix: make the status indicator component compatible with the switch p…
YIXIAO0 Jan 8, 2025
84c2a9d
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 8, 2025
8372321
fix: agent node getNodeUsedVars
AkaraChen Jan 8, 2025
d65c121
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 8, 2025
c3215a8
feat: fold into animation
iamjoel Jan 8, 2025
62d5339
fix: add bg color to the top section in plugins page
YIXIAO0 Jan 8, 2025
763f91f
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 8, 2025
c357ec0
chore: add loading to the model selector trigger
YIXIAO0 Jan 8, 2025
3ae7787
fix: number not supported
AkaraChen Jan 8, 2025
88b3c0b
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 8, 2025
0248c8c
fix: agent key
zxhlyh Jan 8, 2025
38dd285
fix: long model name display issue
YIXIAO0 Jan 8, 2025
596e340
fix: agent prompt
AkaraChen Jan 8, 2025
701520f
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 8, 2025
aae601f
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 8, 2025
61237e8
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 8, 2025
6483d20
feat: install countdown
iamjoel Jan 8, 2025
7ccc268
fix: stop anim
iamjoel Jan 8, 2025
4a6a1b9
chore: fix request form data
JzoNgKVO Jan 8, 2025
1b940e7
feat: add ci job to test template for docker compose (#12514)
kurokobo Jan 8, 2025
cc0d864
fix: agent node tool list header width
AkaraChen Jan 9, 2025
b4c1c2f
fix: Reverse sync docker-compose-template.yaml (#12509)
fujita-h Jan 9, 2025
a157af7
fix: marketplace submit button
zxhlyh Jan 9, 2025
41b7205
merge main
zxhlyh Jan 9, 2025
018e32e
fix: installed not clear countdown
iamjoel Jan 9, 2025
9822445
chore: all hide logic to hooks
iamjoel Jan 9, 2025
192af8d
feat: local and bundle support hide anim
iamjoel Jan 9, 2025
4aac48e
feat: github install add anim
iamjoel Jan 9, 2025
297b528
tracing modal & config
JzoNgKVO Jan 9, 2025
eaf1177
dark mode of overview card view
JzoNgKVO Jan 9, 2025
a7f0933
chore: add checks in the url fetch step of the installFromGitHub
YIXIAO0 Jan 9, 2025
eff6a55
fix: install button
AkaraChen Jan 9, 2025
e3e8eaf
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 9, 2025
bb60db7
feat: tool selector get icon from marketplace
AkaraChen Jan 9, 2025
5ec4695
feat: tool icon check plugin status
AkaraChen Jan 9, 2025
06fe17c
chore: enchance fold into anim
iamjoel Jan 9, 2025
dc9675d
fix: plugin tool width in agent app
iamjoel Jan 9, 2025
d7ec013
modals of app overview
JzoNgKVO Jan 9, 2025
195a507
dark mode of api
JzoNgKVO Jan 9, 2025
08cff00
feat: form not installed indicator
AkaraChen Jan 9, 2025
a87c2d7
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 9, 2025
52553a6
fix style of agent strategy
JzoNgKVO Jan 9, 2025
38437ef
fix: change "upgrade" to "install" for generality in plugin version s…
YIXIAO0 Jan 9, 2025
f4ca593
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
YIXIAO0 Jan 9, 2025
0ad08f5
chore: add tooltip props to agent strategy select
AkaraChen Jan 9, 2025
7b4d49a
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 9, 2025
b964c71
chore: add tooltip props to agent strategy select
AkaraChen Jan 9, 2025
db60150
chore: change use new log struct generator
iamjoel Jan 9, 2025
641395b
feat: agent strategy form support required mark
AkaraChen Jan 9, 2025
566dc9b
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 9, 2025
ab66f30
feat: add parallel test case
iamjoel Jan 9, 2025
0fe4fd6
fix: down arrow not shown not agent strategy selector
AkaraChen Jan 9, 2025
efb6a5d
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 9, 2025
145ef79
fix: switch version not work
AkaraChen Jan 9, 2025
f7edff6
fix: agent log
zxhlyh Jan 9, 2025
f2f0265
fix style of required
JzoNgKVO Jan 9, 2025
60b582d
chore: remove log
AkaraChen Jan 9, 2025
90b3903
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 9, 2025
6d55ecd
fix: modal label show when no model selected
AkaraChen Jan 9, 2025
dfe69a9
keep panel show after tool selecting
JzoNgKVO Jan 9, 2025
3bdaf2d
chore: avoid unnecessary loading for the model selector in agent node
YIXIAO0 Jan 9, 2025
6b0325d
fix: revert prev commit bc it causes corner issues
YIXIAO0 Jan 9, 2025
31e0aea
fix: checklist show error when import dsl
AkaraChen Jan 9, 2025
4bbcc78
Merge branch 'feat/plugins' of https://github.com/langgenius/dify int…
AkaraChen Jan 9, 2025
43f60ce
feat: show error when not select required model
AkaraChen Jan 9, 2025
4e29694
feat: show error when not select required model
AkaraChen Jan 9, 2025
b450c6f
fix: checklist show error when strategy provider list not fetched
AkaraChen Jan 9, 2025
4042c1f
fix: prevent show error when data is not ready
AkaraChen Jan 9, 2025
dc6e02f
fix plugin card
JzoNgKVO Jan 9, 2025
d78c7fc
fix: agent log
zxhlyh Jan 9, 2025
8e89682
merge plugins/beta
zxhlyh Jan 9, 2025
745763e
feat: reset parameters when switch agent strategy
AkaraChen Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .devcontainer/post_create_command.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash

cd web && npm install
npm add -g [email protected]
cd web && pnpm install
pipx install poetry

echo 'alias start-api="cd /workspaces/dify/api && poetry run python -m flask run --host 0.0.0.0 --port=5001 --debug"' >> ~/.bashrc
echo 'alias start-worker="cd /workspaces/dify/api && poetry run python -m celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace,app_deletion"' >> ~/.bashrc
echo 'alias start-web="cd /workspaces/dify/web && npm run dev"' >> ~/.bashrc
echo 'alias start-web="cd /workspaces/dify/web && pnpm dev"' >> ~/.bashrc
echo 'alias start-containers="cd /workspaces/dify/docker && docker-compose -f docker-compose.middleware.yaml -p dify up -d"' >> ~/.bashrc
echo 'alias stop-containers="cd /workspaces/dify/docker && docker-compose -f docker-compose.middleware.yaml -p dify down"' >> ~/.bashrc

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
with:
node-version: 20
cache: yarn
cache: pnpm
cache-dependency-path: ./web/package.json

- name: Web dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Web style check
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn run lint
run: pnpm run lint

superlinter:
name: SuperLinter
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tool-test-sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: ''
cache-dependency-path: 'yarn.lock'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Install Dependencies
run: yarn install
run: pnpm install

- name: Test
run: yarn test
run: pnpm test
4 changes: 2 additions & 2 deletions .github/workflows/translate-i18n-base-on-english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

- name: Install dependencies
if: env.FILES_CHANGED == 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Run npm script
if: env.FILES_CHANGED == 'true'
run: npm run auto-gen-i18n
run: pnpm run auto-gen-i18n

- name: Create Pull Request
if: env.FILES_CHANGED == 'true'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/web-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
with:
node-version: 20
cache: yarn
cache: pnpm
cache-dependency-path: ./web/package.json

- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Run tests
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn test
run: pnpm test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,6 @@ api/.vscode

.idea/
.vscode

# pnpm
/.pnpm-store
9 changes: 6 additions & 3 deletions api/core/helper/ssrf_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,20 @@ def make_request(method, url, max_retries=SSRF_DEFAULT_MAX_RETRIES, **kwargs):
if response.status_code not in STATUS_FORCELIST:
return response
else:
logging.warning(f"Received status code {response.status_code} for URL {url} which is in the force list")
logging.warning(
f"Received status code {response.status_code} for URL {url} which is in the force list")

except httpx.RequestError as e:
logging.warning(f"Request to URL {url} failed on attempt {retries + 1}: {e}")
logging.warning(f"Request to URL {url} failed on attempt {
retries + 1}: {e}")
if max_retries == 0:
raise

retries += 1
if retries <= max_retries:
time.sleep(BACKOFF_FACTOR * (2 ** (retries - 1)))
raise MaxRetriesExceededError(f"Reached maximum retries ({max_retries}) for URL {url}")
raise MaxRetriesExceededError(
f"Reached maximum retries ({max_retries}) for URL {url}")


def get(url, max_retries=SSRF_DEFAULT_MAX_RETRIES, **kwargs):
Expand Down
45 changes: 30 additions & 15 deletions api/core/rag/datasource/vdb/lindorm/lindorm_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from models.dataset import Dataset

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logging.basicConfig(level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s")
logging.getLogger("lindorm").setLevel(logging.WARN)

ROUTING_FIELD = "routing_field"
Expand Down Expand Up @@ -134,7 +135,8 @@ def delete_by_ids(self, ids: list[str]) -> None:
self._client.delete(index=self._collection_name, id=id, params=params)
self.refresh()
else:
logger.warning(f"DELETE BY ID: ID {id} does not exist in the index.")
logger.warning(
f"DELETE BY ID: ID {id} does not exist in the index.")

def delete(self) -> None:
if self._using_ugc:
Expand All @@ -145,7 +147,8 @@ def delete(self) -> None:
self.refresh()
else:
if self._client.indices.exists(index=self._collection_name):
self._client.indices.delete(index=self._collection_name, params={"timeout": 60})
self._client.indices.delete(
index=self._collection_name, params={"timeout": 60})
logger.info("Delete index success")
else:
logger.warning(f"Index '{self._collection_name}' does not exist. No deletion performed.")
Expand All @@ -168,7 +171,8 @@ def search_by_vector(self, query_vector: list[float], **kwargs: Any) -> list[Doc
raise ValueError("All elements in query_vector should be floats")

top_k = kwargs.get("top_k", 10)
query = default_vector_search_query(query_vector=query_vector, k=top_k, **kwargs)
query = default_vector_search_query(
query_vector=query_vector, k=top_k, **kwargs)
try:
params = {}
if self._using_ugc:
Expand Down Expand Up @@ -220,7 +224,8 @@ def search_by_full_text(self, query: str, **kwargs: Any) -> list[Document]:
routing=routing,
routing_field=self._routing_field,
)
response = self._client.search(index=self._collection_name, body=full_text_query)
response = self._client.search(
index=self._collection_name, body=full_text_query)
docs = []
for hit in response["hits"]["hits"]:
docs.append(
Expand All @@ -238,7 +243,8 @@ def create_collection(self, dimension: int, **kwargs):
with redis_client.lock(lock_name, timeout=20):
collection_exist_cache_key = f"vector_indexing_{self._collection_name}"
if redis_client.get(collection_exist_cache_key):
logger.info(f"Collection {self._collection_name} already exists.")
logger.info(
f"Collection {self._collection_name} already exists.")
return
if self._client.indices.exists(index=self._collection_name):
logger.info(f"{self._collection_name.lower()} already exists.")
Expand All @@ -258,10 +264,13 @@ def create_collection(self, dimension: int, **kwargs):
hnsw_ef_construction = kwargs.pop("hnsw_ef_construction", 500)
ivfpq_m = kwargs.pop("ivfpq_m", dimension)
nlist = kwargs.pop("nlist", 1000)
centroids_use_hnsw = kwargs.pop("centroids_use_hnsw", True if nlist >= 5000 else False)
centroids_use_hnsw = kwargs.pop(
"centroids_use_hnsw", True if nlist >= 5000 else False)
centroids_hnsw_m = kwargs.pop("centroids_hnsw_m", 24)
centroids_hnsw_ef_construct = kwargs.pop("centroids_hnsw_ef_construct", 500)
centroids_hnsw_ef_search = kwargs.pop("centroids_hnsw_ef_search", 100)
centroids_hnsw_ef_construct = kwargs.pop(
"centroids_hnsw_ef_construct", 500)
centroids_hnsw_ef_search = kwargs.pop(
"centroids_hnsw_ef_search", 100)
mapping = default_text_mapping(
dimension,
method_name,
Expand All @@ -281,7 +290,8 @@ def create_collection(self, dimension: int, **kwargs):
using_ugc=self._using_ugc,
**kwargs,
)
self._client.indices.create(index=self._collection_name.lower(), body=mapping)
self._client.indices.create(
index=self._collection_name.lower(), body=mapping)
redis_client.set(collection_exist_cache_key, 1, ex=3600)
# logger.info(f"create index success: {self._collection_name}")

Expand Down Expand Up @@ -347,7 +357,8 @@ def default_text_mapping(dimension: int, method_name: str, **kwargs: Any) -> dic
}

if excludes_from_source:
mapping["mappings"]["_source"] = {"excludes": excludes_from_source} # e.g. {"excludes": ["vector_field"]}
# e.g. {"excludes": ["vector_field"]}
mapping["mappings"]["_source"] = {"excludes": excludes_from_source}

if using_ugc and method_name == "ivfpq":
mapping["settings"]["index"]["knn_routing"] = True
Expand Down Expand Up @@ -385,7 +396,8 @@ def default_text_search_query(
# build complex search_query when either of must/must_not/should/filter is specified
if must:
if not isinstance(must, list):
raise RuntimeError(f"unexpected [must] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [must] clause with {type(filters)}")
if query_clause not in must:
must.append(query_clause)
else:
Expand All @@ -395,19 +407,22 @@ def default_text_search_query(

if must_not:
if not isinstance(must_not, list):
raise RuntimeError(f"unexpected [must_not] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [must_not] clause with {type(filters)}")
boolean_query["must_not"] = must_not

if should:
if not isinstance(should, list):
raise RuntimeError(f"unexpected [should] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [should] clause with {type(filters)}")
boolean_query["should"] = should
if minimum_should_match != 0:
boolean_query["minimum_should_match"] = minimum_should_match

if filters:
if not isinstance(filters, list):
raise RuntimeError(f"unexpected [filter] clause with {type(filters)}")
raise RuntimeError(
f"unexpected [filter] clause with {type(filters)}")
boolean_query["filter"] = filters

search_query = {"size": k, "query": {"bool": boolean_query}}
Expand Down
2 changes: 1 addition & 1 deletion api/core/rag/extractor/word_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, file_path: str, tenant_id: str, user_id: str):

self.web_path = self.file_path
# TODO: use a better way to handle the file
self.temp_file = tempfile.NamedTemporaryFile() # noqa: SIM115
self.temp_file = tempfile.NamedTemporaryFile()
self.temp_file.write(r.content)
self.file_path = self.temp_file.name
elif not os.path.isfile(self.file_path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,22 @@ def _run(self):
variable_pool = self.graph_runtime_state.variable_pool

# extract variables
variable = variable_pool.get(node_data.query_variable_selector) if node_data.query_variable_selector else None
variable = variable_pool.get(
node_data.query_variable_selector) if node_data.query_variable_selector else None
query = variable.value if variable else None
variables = {"query": query}
# fetch model config
model_instance, model_config = self._fetch_model_config(node_data.model)
model_instance, model_config = self._fetch_model_config(
node_data.model)
# fetch memory
memory = self._fetch_memory(
node_data_memory=node_data.memory,
model_instance=model_instance,
)
# fetch instruction
node_data.instruction = node_data.instruction or ""
node_data.instruction = variable_pool.convert_template(node_data.instruction).text
node_data.instruction = variable_pool.convert_template(
node_data.instruction).text

files = (
self._fetch_files(
Expand Down Expand Up @@ -178,12 +181,15 @@ def _extract_variable_selector_to_variable_mapping(
variable_mapping = {"query": node_data.query_variable_selector}
variable_selectors = []
if node_data.instruction:
variable_template_parser = VariableTemplateParser(template=node_data.instruction)
variable_selectors.extend(variable_template_parser.extract_variable_selectors())
variable_template_parser = VariableTemplateParser(
template=node_data.instruction)
variable_selectors.extend(
variable_template_parser.extract_variable_selectors())
for variable_selector in variable_selectors:
variable_mapping[variable_selector.variable] = variable_selector.value_selector

variable_mapping = {node_id + "." + key: value for key, value in variable_mapping.items()}
variable_mapping = {node_id + "." + key: value for key,
value in variable_mapping.items()}

return variable_mapping

Expand All @@ -204,7 +210,8 @@ def _calculate_rest_token(
context: Optional[str],
) -> int:
prompt_transform = AdvancedPromptTransform(with_variable_tmpl=True)
prompt_template = self._get_prompt_template(node_data, query, None, 2000)
prompt_template = self._get_prompt_template(
node_data, query, None, 2000)
prompt_messages = prompt_transform.get_prompt(
prompt_template=prompt_template,
inputs={},
Expand All @@ -217,13 +224,15 @@ def _calculate_rest_token(
)
rest_tokens = 2000

model_context_tokens = model_config.model_schema.model_properties.get(ModelPropertyKey.CONTEXT_SIZE)
model_context_tokens = model_config.model_schema.model_properties.get(
ModelPropertyKey.CONTEXT_SIZE)
if model_context_tokens:
model_instance = ModelInstance(
provider_model_bundle=model_config.provider_model_bundle, model=model_config.model
)

curr_message_tokens = model_instance.get_llm_num_tokens(prompt_messages)
curr_message_tokens = model_instance.get_llm_num_tokens(
prompt_messages)

max_tokens = 0
for parameter_rule in model_config.model_schema.parameter_rules:
Expand Down Expand Up @@ -264,7 +273,8 @@ def _get_prompt_template(
prompt_messages: list[LLMNodeChatModelMessage] = []
if model_mode == ModelMode.CHAT:
system_prompt_messages = LLMNodeChatModelMessage(
role=PromptMessageRole.SYSTEM, text=QUESTION_CLASSIFIER_SYSTEM_PROMPT.format(histories=memory_str)
role=PromptMessageRole.SYSTEM, text=QUESTION_CLASSIFIER_SYSTEM_PROMPT.format(
histories=memory_str)
)
prompt_messages.append(system_prompt_messages)
user_prompt_message_1 = LLMNodeChatModelMessage(
Expand Down Expand Up @@ -305,4 +315,5 @@ def _get_prompt_template(
)

else:
raise InvalidModelTypeError(f"Model mode {model_mode} not support.")
raise InvalidModelTypeError(
f"Model mode {model_mode} not support.")
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def test_executor_with_json_body_and_object_variable():
system_variables={},
user_inputs={},
)
variable_pool.add(["pre_node_id", "object"], {"name": "John Doe", "age": 30, "email": "[email protected]"})
variable_pool.add(["pre_node_id", "object"], {
"name": "John Doe", "age": 30, "email": "[email protected]"})

# Prepare the node data
node_data = HttpRequestNodeData(
Expand Down Expand Up @@ -123,7 +124,8 @@ def test_executor_with_json_body_and_nested_object_variable():
system_variables={},
user_inputs={},
)
variable_pool.add(["pre_node_id", "object"], {"name": "John Doe", "age": 30, "email": "[email protected]"})
variable_pool.add(["pre_node_id", "object"], {
"name": "John Doe", "age": 30, "email": "[email protected]"})

# Prepare the node data
node_data = HttpRequestNodeData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
from models.workflow import WorkflowNodeExecutionStatus, WorkflowType


def test_plain_text_to_dict():
assert _plain_text_to_dict("aa\n cc:") == {"aa": "", "cc": ""}
assert _plain_text_to_dict("aa:bb\n cc:dd") == {"aa": "bb", "cc": "dd"}
assert _plain_text_to_dict("aa:bb\n cc:dd\n") == {"aa": "bb", "cc": "dd"}
assert _plain_text_to_dict("aa:bb\n\n cc : dd\n\n") == {
"aa": "bb", "cc": "dd"}


def test_http_request_node_binary_file(monkeypatch):
data = HttpRequestNodeData(
title="test",
Expand Down Expand Up @@ -183,7 +191,8 @@ def test_http_request_node_form_with_file(monkeypatch):

def attr_checker(*args, **kwargs):
assert kwargs["data"] == {"name": "test"}
assert kwargs["files"] == {"file": (None, b"test", "application/octet-stream")}
assert kwargs["files"] == {
"file": (None, b"test", "application/octet-stream")}
return httpx.Response(200, content=b"")

monkeypatch.setattr(
Expand Down
2 changes: 1 addition & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ TENCENT_VECTOR_DB_SHARD=1
TENCENT_VECTOR_DB_REPLICAS=2

# ElasticSearch configuration, only available when VECTOR_STORE is `elasticsearch`
ELASTICSEARCH_HOST=elasticsearch
ELASTICSEARCH_HOST=0.0.0.0
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=elastic
Expand Down
Loading
Loading