queryGraph()
queryGraph(
prompts:string[],options?:QueryGraphOptions):Promise<unknown>
Defined in: packages/core/src/index.ts:1373
Query the graph
Parameters
| Parameter | Type | Description |
|---|---|---|
prompts | string[] | Array of prompt strings |
options? | QueryGraphOptions | Query options (step, limit, key_elements, sources, mutual_connections) |
Returns
Promise<unknown>
Query results
Example
import { queryGraph } from "@cpod/sdk";
const results = await queryGraph(["Retrieve recent Bike thefts"], { limit: 10 });