nlquery

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine translates natural language questions to Cypher and executes them.

func New

func New(g *graph.Graph, s *schema.Schema) *Engine

New creates a new NL query engine. Requires ANTHROPIC_API_KEY env var.

func (*Engine) Query

func (e *Engine) Query(ctx context.Context, question string) (*Response, error)

Query translates a natural language question to Cypher and executes it.

type Response

type Response struct {
	Question       string         `json:"question"`
	GeneratedQuery string         `json:"generated_query"`
	Result         *cypher.Result `json:"result"`
}

Response contains the generated Cypher and query results.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL