Commit bf168ee
authored
GML-2015 Add UI page for configurations, Role base access (#28)
### **User description**
Updated code for
-Pages for Configuration
-Role based access to setup configurations
-graph level access to change configuration
___
### **PR Type**
Enhancement, Bug fix
___
### **Description**
- Add setup UI for configs and prompts
- Enforce role-based access across endpoints
- Support graph-specific LLM/prompt configurations
- Fix VertexAI imports and model naming
GML-2066, GML-2065, GML-2051, GML-2050, GML-2047, GML-2015, GML-2016, GML-2017, GML-2048
___
### Diagram Walkthrough
```mermaid
flowchart LR
uiSetup["Setup UI pages (KG Admin, Server Config, Prompts)"]
apiRoutes["New UI API routes (/config, /prompts, /roles)"]
roleGuard["Role checks (superuser/globaldesigner/graph admin)"]
cfgReload["Config reload (LLM/DB/GraphRAG)"]
perGraph["Per-graph completion config + prompts"]
eccJobs["ECC jobs use fresh config"]
vertexFix["VertexAI import/model fixes"]
uiSetup -- "calls" --> apiRoutes
apiRoutes -- "protected by" --> roleGuard
apiRoutes -- "persist + sanitize" --> perGraph
apiRoutes -- "trigger" --> cfgReload
cfgReload -- "applies to" --> eccJobs
perGraph -- "used by" --> eccJobs
vertexFix -- "stabilizes" --> eccJobs
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>16
files</summary><table>
<tr>
<td><strong>ui.py</strong><dd><code>Add config/prompts APIs with
role-based access</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-6bd0577645f5c331c0503b21762ac99be7a11b0f1dd72d4435a84a02f0d18f62">+904/-8</a>
</td>
</tr>
<tr>
<td><strong>config.py</strong><dd><code>Graph-specific config resolution
and reload utilities</code> </dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-1bacff878451e5aa9c6d164150c7b2daad028d5e7acba90bb720cb73ffdd827b">+277/-25</a></td>
</tr>
<tr>
<td><strong>agent.py</strong><dd><code>Use per-graph completion config
for agents</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-21b6ee06c77f665fd7772366a70c1d9861d4c82cfed32bc423ac7e72607f1b19">+22/-23</a>
</td>
</tr>
<tr>
<td><strong>main.py</strong><dd><code>Reload configs at job start and
consistency routes</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-870d07e9c93da59bd2a82227a8dc69ee6276f08f25402fd85c3202f6fb8cb5c3">+47/-0</a>
</td>
</tr>
<tr>
<td><strong>ecc_util.py</strong><dd><code>LLM provider selection via
per-graph config</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-890bb6f3c6fbe84bfda83faf66d59a1f8058f9760e9e2ee4cac1c388a90f276f">+23/-20</a>
</td>
</tr>
<tr>
<td><strong>community_summarizer.py</strong><dd><code>Load community
summary prompt from configured path</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-270a6c623b596eaa5517e1fc7852ae7fc99564cf1891df7e6816f04567e09de8">+32/-13</a>
</td>
</tr>
<tr>
<td><strong>workers.py</strong><dd><code>Pass graph to LLM provider for
summarization</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-cbee2f3b2dbbc0676fa995614cd945484790f3b540b6186b8ad3ee1dd04a1165">+1/-1</a>
</td>
</tr>
<tr>
<td><strong>KGAdmin.tsx</strong><dd><code>KG admin page for init,
ingest, refresh</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-c890ce7851058e4166e4f2e8c6aa0fd6c2614618943979d6634aebcbee828041">+664/-0</a>
</td>
</tr>
<tr>
<td><strong>GraphRAGConfig.tsx</strong><dd><code>UI to edit GraphRAG
processing settings</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-b1fb191ce371e2ece92c0d79ebc192098e126c3134a1822907321b8f0ad8b27d">+408/-0</a>
</td>
</tr>
<tr>
<td><strong>ModeToggle.tsx</strong><dd><code>Show Setup link based on
resolved roles</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-71e4cc45ff2a15d61601a45f0fcb76d2bbda863f3f2e7f3fa75ab0cf3eaa2afe">+73/-9</a>
</td>
</tr>
<tr>
<td><strong>main.tsx</strong><dd><code>Router for setup sections and
redirects</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-e82a3eb03a96f5d8bc1e29c14b6080b9eb7d437436c438b0664c6cf50e4e8a64">+43/-3</a>
</td>
</tr>
<tr>
<td><strong>IngestGraph.tsx</strong><dd><code>Ingestion UI for local and
cloud sources</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-7c6239f8c037f4932a1560909f98d7be9e8b61b55885826868ccc6396e56fe4d">+1557/-0</a></td>
</tr>
<tr>
<td><strong>LLMConfig.tsx</strong><dd><code>UI to edit and test LLM
services</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-05a185f34839daf1c51a0df75797327440e048a8fd18ccc84e242b2b7421261b">+1344/-0</a></td>
</tr>
<tr>
<td><strong>GraphDBConfig.tsx</strong><dd><code>UI to edit and test DB
connection</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-54811255264c66ff4612849b6f5e9bb33e9a28d12e5ad9a25cd780a7aba9f658">+437/-0</a>
</td>
</tr>
<tr>
<td><strong>CustomizePrompts.tsx</strong><dd><code>UI to view and save
prompt files</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-944c356cf7bf774a678a10aefa6548022be34e2a435262ff8eb1b333b196431e">+298/-0</a>
</td>
</tr>
<tr>
<td><strong>SetupLayout.tsx</strong><dd><code>Shared layout for setup
navigation</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-9618af5b3efab64eabcaf0630bd505606c803afc751e6c92d9bb461d852e01b2">+260/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>embedding_services.py</strong><dd><code>Fix VertexAI
embeddings import and parameters</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-62ff02032575bd23572c349ff431d2153113c3155a2aea25140dc9d0bd54a960">+3/-2</a>
</td>
</tr>
<tr>
<td><strong>google_vertexai_service.py</strong><dd><code>Switch to
official VertexAI client and args</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-966fe514eeac8da87dc59de3b3cf731fd06e1618992cd0f147301c85133fbcb2">+3/-2</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>nginx.conf</strong><dd><code>Add reverse proxy rules for
/setup routes</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-f03c325fe986004de6d5dc60fa018b94878b383e21cee2b2b7173a6638a0a964">+10/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>requirements.txt</strong><dd><code>Add
langchain-google-vertexai dependency</code>
</dd></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-e66887509cf346e41e1a9ccb30ddab589260f362899946f6b26602b5e29c547c">+1/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>6 files</summary><table>
<tr>
<td><strong>community_summarization.txt</strong></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-53833bf48ab85e4e40fa95f9fbc3b1a74bbe68524b5e12b4fb86dab372ef1685">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>community_summarization.txt</strong></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-8cd711e857e436db39e75eaa04ab3c726bafde0c1a2673c8217e566cfda7dbb1">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>community_summarization.txt</strong></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-613eb6dcb521365ef109dfdc5194b2ac8c4d44320deb1b86711bc52a2d8f30e6">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>community_summarization.txt</strong></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-210f52b3d8035997a4c91287cc2fb566b75fec16c3c393fb2ed78ee11f154c0e">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>community_summarization.txt</strong></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-6f555d1a39a1bdc30123f90c415c072f7f3ef65c1e200cc5dfedb3aac9bd8e04">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>Bot.tsx</strong></td>
<td><a
href="https://github.com/tigergraph/graphrag/pull/28/files#diff-240a9434a7410733cf592017b89dd0fe904ccc99e0d71b2b819dfacdae66feae">+1/-0</a>
</td>
</tr>
</table></details></td></tr></tr></tbody></table>
</details>
___86 files changed
Lines changed: 9301 additions & 1123 deletions
File tree
- common
- embeddings
- extractors
- llm_services
- metrics
- prompts
- aws_bedrock_claude3haiku
- custom/aml
- gcp_vertexai_palm
- google_gemini
- openai_gpt4
- utils
- docs/tutorials
- configs
- ecc/app
- graphrag
- supportai
- graphrag-ui
- src
- actions
- components
- hooks
- pages
- setup
- graphrag
- app
- agent
- routers
- supportai/retrievers
- tools
- tests
- __pycache__
- report-service/app
- report_agent
- routers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
106 | | - | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | | - | |
| 203 | + | |
202 | 204 | | |
203 | 205 | | |
204 | | - | |
| 206 | + | |
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
| |||
419 | 421 | | |
420 | 422 | | |
421 | 423 | | |
| 424 | + | |
| 425 | + | |
422 | 426 | | |
423 | 427 | | |
424 | 428 | | |
| |||
427 | 431 | | |
428 | 432 | | |
429 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
430 | 448 | | |
431 | 449 | | |
432 | 450 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | 451 | | |
437 | 452 | | |
438 | 453 | | |
439 | 454 | | |
440 | | - | |
441 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
442 | 461 | | |
443 | 462 | | |
444 | 463 | | |
445 | 464 | | |
446 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
447 | 493 | | |
448 | 494 | | |
449 | 495 | | |
| |||
464 | 510 | | |
465 | 511 | | |
466 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
467 | 606 | | |
468 | 607 | | |
469 | 608 | | |
| |||
0 commit comments