Socket
Book a DemoInstallSign in
Socket

genkitx-neo4j

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

genkitx-neo4j

Genkit AI framework plugin for Neo4j Graph database

latest
Source
npmnpm
Version
0.5.17
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

genkitx-neo4j - Neo4j plugin for Genkit

This is a Genkit Plugin for Neo4j.

Installing the plugin

npm i --save genkitx-neo4j

Environment variable

Define Neo4j credentials using:

NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=password

Using the plugin

import { genkit } from 'genkit';
import {
  neo4j,
  neo4jRetrieverRef,
  neo4jIndexerRef,
} from 'genkitx-neo4j';

const ai = genkit({
  plugins: [
    neo4j([
      {
        indexId: 'bob-facts',
        embedder: textEmbedding004,
      },
    ]),
  ],
});

export const bobFactsIndexer = neo4jIndexerRef({
  indexId: 'bob-facts',
});
await ai.index({ indexer: bobFactsIndexer, documents });

// To specify an index:
export const bobFactsRetriever = neo4jRetrieverRef({
  indexId: 'bob-facts',
});

// To use the index you configured when you loaded the plugin:
let docs = await ai.retrieve({ retriever: bobFactsRetriever, query });

Usage information and reference details can be found in Genkit documentation.

Keywords

genkit

FAQs

Package last updated on 01 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts