imbajin opened a new pull request, #824:
URL: https://github.com/apache/hugegraph-toolchain/pull/824

   ## Purpose of the PR
   
   Hubble's Text2GQL tab was a disabled preview. It now turns a 
natural-language question about the selected graph into a read-only Gremlin 
query, runs it automatically, and keeps the query editable for another run.
   
   Org counterpart: https://github.com/hugegraph/hugegraph-toolchain/pull/75
   
   ## Main Changes
   
   - Add a schema-aware generation endpoint using the current graph permissions 
and only `langchain4j-open-ai` as a direct model dependency. Ollama, DeepSeek, 
GLM and OpenAI presets share the compatible chat protocol; Base URL and model 
remain editable.
   - Keep API keys in page memory and non-secret model settings in 
account-scoped browser session storage. No database or deployment configuration 
is required.
   - Reuse graph/table/JSON results and execution history. Separate model 
settings, the question and editable Gremlin, with clear progress, cancellation 
and recoverable errors.
   - Validate generated and edited Text2GQL traversals before execution; reject 
mutations, scripts and lambdas. Preserve editor content when execution changes 
its read-only state.
   
   ```mermaid
   flowchart LR
       Q[Question + authorized graph schema] --> M[Compatible model API]
       M --> V[Validate read-only Gremlin]
       V --> E[Existing query API]
       E --> R[Graph / table / JSON]
       V --> G[Editable Gremlin]
       G --> V
   ```
   
   ![Text2GQL with editable Gremlin and graph 
results](https://raw.githubusercontent.com/hugegraph/hugegraph-toolchain/15265436667c2ad4d97a8c426b8ab8791446e7f7/hugegraph-hubble/docs/images/showcase/text2gql.png)
   
   The screenshot uses a mock model endpoint and a real HugeGraph test graph.
   
   ## Verifying these changes
   
   - [x] Covered by backend unit tests, real SDK HTTP protocol tests, frontend 
interaction tests and production builds.
   - [x] Exercised Chrome with real HugeGraph servers in anonymous and 
authenticated modes, different graph schemas, editing and cancellation. The 
model endpoint is a local protocol fixture; vendor model quality is not claimed.
   
   ## Does this PR potentially affect the following parts?
   
   - [ ] Nope
   - [x] Dependencies (add/update license info)
   - [ ] Modify configurations
   - [x] The public API
   - [x] Other affects: Hubble Text2GQL UI and shared editor state preservation
   
   ## Documentation Status
   
   - [x] `Doc - Done`: usage, provider presets, privacy, execution limits and a 
screenshot are documented in the Hubble README.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to