mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
graph - Ignore type errors
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { DynamicStructuredTool } from "@langchain/core/tools";
|
import { DynamicStructuredTool } from "@langchain/core/tools";
|
||||||
|
// @ts-ignore - graphology type issue
|
||||||
import type Graph from "graphology";
|
import type Graph from "graphology";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ const graphExplorerSchema = z.object({
|
|||||||
* Creates the graph explorer tool.
|
* Creates the graph explorer tool.
|
||||||
* @param graph - Graphology graph instance
|
* @param graph - Graphology graph instance
|
||||||
*/
|
*/
|
||||||
|
// @ts-ignore - Graph type issue
|
||||||
export function createGraphExplorerTool(graph: Graph) {
|
export function createGraphExplorerTool(graph: Graph) {
|
||||||
return new DynamicStructuredTool({
|
return new DynamicStructuredTool({
|
||||||
name: "ask262_graph_explorer",
|
name: "ask262_graph_explorer",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const SPEC_DIR = "./spec-built/multipage";
|
|||||||
// Directory containing the JavaScript engine implementation source code
|
// Directory containing the JavaScript engine implementation source code
|
||||||
const CODE_DIR = "./engine262/src";
|
const CODE_DIR = "./engine262/src";
|
||||||
|
|
||||||
import { GRAPH_FILE } from "../constants";
|
import { GRAPH_FILE } from "../constants.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a knowledge graph mapping ECMAScript specification sections
|
* Builds a knowledge graph mapping ECMAScript specification sections
|
||||||
@@ -21,6 +21,7 @@ import { GRAPH_FILE } from "../constants";
|
|||||||
*/
|
*/
|
||||||
async function buildGraph() {
|
async function buildGraph() {
|
||||||
// Initialize a multi-graph (allows multiple edges between same nodes)
|
// Initialize a multi-graph (allows multiple edges between same nodes)
|
||||||
|
// @ts-ignore - graphology constructor type issue
|
||||||
const graph = new Graph({
|
const graph = new Graph({
|
||||||
multi: true,
|
multi: true,
|
||||||
type: "directed",
|
type: "directed",
|
||||||
|
|||||||
Reference in New Issue
Block a user