Brain¶
Overview¶
Knowledge graph visualization endpoints
Available Operations¶
- perform_visualization - Perform Action API – Visualization
perform_visualization¶
Trigger unified graph rendering. Supports legacy connection_id and preferred connection_ids. If no connections are provided, returns the base Neo4j schema. Discovers external relationships between connections when enabled.
Example Usage¶
from fermisdk import Fermisdk
import os
with Fermisdk(
bearer_auth=os.getenv("FERMISDK_BEARER_AUTH", ""),
) as f_client:
res = f_client.brain.perform_visualization(action="visualization", discover_external_relationships=True, confidence_threshold="high", response_format="html")
# Handle response
print(res)
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
action | models.VisualizationRequestAction | :heavy_check_mark: | Must be 'visualization' |
connection_ids | List[str] | :heavy_minus_sign: | Multiple connections to merge (preferred) |
connection_id | Optional[str] | :heavy_minus_sign: | Legacy single-connection input |
discover_external_relationships | Optional[bool] | :heavy_minus_sign: | Enable LLM-based cross-connection edges |
confidence_threshold | Optional[models.ConfidenceThreshold] | :heavy_minus_sign: | Confidence level for external relationship filtering |
response_format | Optional[models.ResponseFormat] | :heavy_minus_sign: | Response format: 'html' returns PyVis HTML, 'json' returns MongoDB schema-style JSON |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response¶
models.PerformVisualizationResponse
Errors¶
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.Error | 400, 404 | application/json |
| errors.Error | 500 | application/json |
| errors.FermisdkDefaultError | 4XX, 5XX | */* |