bitflicker64 commented on code in PR #540:
URL: https://github.com/apache/hugegraph-doc/pull/540#discussion_r4306990638


##########
content/en/docs/quickstart/toolchain/hugegraph-hubble.md:
##########
@@ -147,16 +141,54 @@ Inspect person properties in table or JSON view. To 
visualize the people-to-soft
 g.V().hasLabel('person').outE('created').inV().path()
 ```
 
-![Gremlin path query and graph result](/docs/images/hubble/query.jpg)
-
 Graph results support 2D / 3D. Click a vertex or edge to inspect its ID, 
label, and properties; double-click a vertex to expand its neighbors.
 Layout, styling, and filtering help highlight relevant relationships, while 
export helps share results.
-Use **New** to create elements, or edit existing data when authorized. Layout, 
colors, and display limits only change presentation;
-adding/editing elements and Gremlin writes change Server data.
+Use **New** to create elements, or edit existing data when authorized. Layout 
adjustments, styling, and display bounds only affect the local canvas;
+adding or editing elements via the UI or executing Gremlin write statements 
modifies underlying Server graph data.
+
+Press `Ctrl` / `Command` + `Enter` to execute queries quickly. Immediate 
execution is ideal for interactive exploration; submit long or 
resource-intensive
+queries as background async tasks. Cypher is available when supported by the 
backend Server.
+The keyboard shortcut acts on whichever input currently has focus: generating 
a query from
+the natural language prompt, or running statements in the code editor.
+
+### Text2GQL natural-language queries {#text2gql}
+
+> [!NOTE]
+> The Text2GQL backend capabilities (including Model settings, 
built-in/temporary models, and Prompt templates) require a Hubble build with
+> 
[apache/hugegraph-toolchain#824](https://github.com/apache/hugegraph-toolchain/pull/824)
 or a release containing it.
+> Earlier builds display a preview tab without model management.
 
-Use `Ctrl` / `Command` + `Enter` to execute. Immediate mode suits small 
explorations; submit long queries asynchronously
-and avoid returning an entire large graph. Cypher is available only when 
Server supports it.
-Text2GQL is currently a UI preview with no model or query service connected; 
it cannot generate executable queries.
+Describe your query requirement in the **Natural language** input. Text2GQL 
combines the current graph schema to generate read-only Gremlin or Cypher
+and execute it automatically. Generated statements can be edited freely 
(read-only safety checks still apply before execution).
+In **Async** mode, both generated and handwritten queries can be submitted as 
background tasks.
+Inputs automatically restore the graph's most recent query prompt without 
running it, and the execution history retains original natural-language 
questions.
+
+```gallery
+![Text2GQL query and graph results](/docs/images/hubble/text2gql.jpg) # Query 
workspace
+![Shared model settings](/docs/images/hubble/text2gql-settings.jpg) # Model 
settings
+![Gremlin and Cypher Prompt 
templates](/docs/images/hubble/text2gql-prompt.jpg) # Text2GQL Prompt
+```
+
+| Model source | Configuration and storage |
+| --- | --- |
+| Use built-in model | Configure under **System & Operations → Model 
settings**; Keys are encrypted in H2 and never returned to the browser |
+| Use temporary model | Enter the API type, Base URL, model name, and 
temporary API Key on the query page; the Key clears on refresh |
+
+Choose **OpenAI compatible** for OpenAI, DeepSeek, GLM, and similar services, 
or **Ollama (local)** for local Ollama; unauthenticated Ollama needs no Key.
+The Base URL must be reachable from Hubble's backend; container `localhost` 
refers to that container.
+Administrators manage shared settings. When Server authentication is disabled, 
anyone who can access the deployment can manage them.

Review Comment:
   Minor: "Administrators manage shared settings" does not say which account. 
At toolchain#824 head 4a64079d, only the anonymous context and the `SUPERADMIN` 
role get `model_settings_manage` (`AuthContextService`), and the Sidebar, route 
and `requireModelSettingsManager` all check it. In standalone mode, 
`UserService.standaloneUserLevel` maps only the account named `admin` to that 
role. In PD mode, GraphSpace administrators do not get it. Line 285 of this 
guide describes space administrators, so they will look for a page they cannot 
open.
   
   Please write something like "Only the `admin` account (a super administrator 
in PD mode) manages shared settings", and make the same change in 
`content/cn/docs/quickstart/toolchain/hugegraph-hubble.md:166`.



##########
content/en/docs/quickstart/toolchain/hugegraph-hubble.md:
##########
@@ -147,16 +141,54 @@ Inspect person properties in table or JSON view. To 
visualize the people-to-soft
 g.V().hasLabel('person').outE('created').inV().path()
 ```
 
-![Gremlin path query and graph result](/docs/images/hubble/query.jpg)
-
 Graph results support 2D / 3D. Click a vertex or edge to inspect its ID, 
label, and properties; double-click a vertex to expand its neighbors.
 Layout, styling, and filtering help highlight relevant relationships, while 
export helps share results.
-Use **New** to create elements, or edit existing data when authorized. Layout, 
colors, and display limits only change presentation;
-adding/editing elements and Gremlin writes change Server data.
+Use **New** to create elements, or edit existing data when authorized. Layout 
adjustments, styling, and display bounds only affect the local canvas;
+adding or editing elements via the UI or executing Gremlin write statements 
modifies underlying Server graph data.
+
+Press `Ctrl` / `Command` + `Enter` to execute queries quickly. Immediate 
execution is ideal for interactive exploration; submit long or 
resource-intensive
+queries as background async tasks. Cypher is available when supported by the 
backend Server.
+The keyboard shortcut acts on whichever input currently has focus: generating 
a query from
+the natural language prompt, or running statements in the code editor.
+
+### Text2GQL natural-language queries {#text2gql}
+
+> [!NOTE]
+> The Text2GQL backend capabilities (including Model settings, 
built-in/temporary models, and Prompt templates) require a Hubble build with
+> 
[apache/hugegraph-toolchain#824](https://github.com/apache/hugegraph-toolchain/pull/824)
 or a release containing it.
+> Earlier builds display a preview tab without model management.
 
-Use `Ctrl` / `Command` + `Enter` to execute. Immediate mode suits small 
explorations; submit long queries asynchronously
-and avoid returning an entire large graph. Cypher is available only when 
Server supports it.
-Text2GQL is currently a UI preview with no model or query service connected; 
it cannot generate executable queries.
+Describe your query requirement in the **Natural language** input. Text2GQL 
combines the current graph schema to generate read-only Gremlin or Cypher
+and execute it automatically. Generated statements can be edited freely 
(read-only safety checks still apply before execution).
+In **Async** mode, both generated and handwritten queries can be submitted as 
background tasks.
+Inputs automatically restore the graph's most recent query prompt without 
running it, and the execution history retains original natural-language 
questions.
+
+```gallery
+![Text2GQL query and graph results](/docs/images/hubble/text2gql.jpg) # Query 
workspace
+![Shared model settings](/docs/images/hubble/text2gql-settings.jpg) # Model 
settings
+![Gremlin and Cypher Prompt 
templates](/docs/images/hubble/text2gql-prompt.jpg) # Text2GQL Prompt
+```
+
+| Model source | Configuration and storage |
+| --- | --- |
+| Use built-in model | Configure under **System & Operations → Model 
settings**; Keys are encrypted in H2 and never returned to the browser |
+| Use temporary model | Enter the API type, Base URL, model name, and 
temporary API Key on the query page; the Key clears on refresh |
+
+Choose **OpenAI compatible** for OpenAI, DeepSeek, GLM, and similar services, 
or **Ollama (local)** for local Ollama; unauthenticated Ollama needs no Key.
+The Base URL must be reachable from Hubble's backend; container `localhost` 
refers to that container.

Review Comment:
   Minor: The Base URL guidance gives only the reachability rule. The backend 
also checks the scheme and address, so a reader learns the rule only from the 
error.
   
   At toolchain#824 head 4a64079d, `Text2GqlService.validateBaseUrl` and 
`resolveAndValidate` accept plain `http` only when every resolved address is 
loopback, site-local or unique-local. Public hosts need `https`. Link-local, 
wildcard, multicast and metadata hosts are always rejected, and so are URLs 
with user info, a query or a fragment. For example, `http://<public-ip>:11434` 
for a remote Ollama fails with `text2gql.invalid-base-url`. Separately, 
`Text2GqlSettingsService` requires a new key, or an explicit clear, when a key 
is saved and the Base URL changes (`text2gql.shared.new-key-required`).
   
   Please add one sentence: HTTPS for public endpoints, HTTP only for local or 
private-network models, and, in Model settings, a new key or clearing the saved 
key when the Base URL changes. The Chinese line 
`content/cn/docs/quickstart/toolchain/hugegraph-hubble.md:165` needs the same 
change.



-- 
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