Skip to content

Dev #1218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 166 commits into from
Apr 17, 2025
Merged

Dev #1218

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
26581db
Read only mode for unauthenticated users (#1046)
kartikpersistent Jan 30, 2025
449552d
langchain updates (#1048)
prakriti-solankey Jan 30, 2025
2d86c5c
testing script changed for better logging errors and results of vario…
kaustubh-darekar Jan 30, 2025
578efad
Deepseek models integration (#1051)
kaustubh-darekar Jan 30, 2025
339488a
fixed top-line of drop-area (#1049)
kartikpersistent Jan 30, 2025
1dbd902
Schema viz (#1035)
prakriti-solankey Jan 30, 2025
6f3f863
updated to new ndl minor version and fixed sources modal display for …
kartikpersistent Feb 3, 2025
38eb72e
Chunk size overlap config (#1059)
prakriti-solankey Feb 7, 2025
6e60361
fix-load-existing-schema (#1061)
dhiaaeddine16 Feb 10, 2025
228ab9b
added bug report feature request and format fixes
kartikpersistent Feb 11, 2025
fbd9d3e
configured dependenabot for python
kartikpersistent Feb 11, 2025
6893a26
configuration fix
kartikpersistent Feb 11, 2025
4b831df
Fixed the logging time issue
praveshkumar1988 Feb 11, 2025
d53ba43
Backend connection config (#1060)
prakriti-solankey Feb 11, 2025
71e013e
Unable to get the status of document node resolved due to leading spa…
kaustubh-darekar Feb 11, 2025
d9a89f8
updated dependency
kartikpersistent Feb 11, 2025
2c8fe2a
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Feb 11, 2025
192a1bc
always show schema button
prakriti-solankey Feb 11, 2025
e8e576f
always show schema button
prakriti-solankey Feb 11, 2025
ed69115
uri
prakriti-solankey Feb 11, 2025
3624feb
Update README.md
kartikpersistent Feb 11, 2025
738eecc
Update README.md
kartikpersistent Feb 11, 2025
69a1003
Update README.md
kartikpersistent Feb 12, 2025
4c48124
Update README.md
kartikpersistent Feb 12, 2025
bd917ae
Fixed the create community issue for backend connection configuration
praveshkumar1988 Feb 12, 2025
8b8368b
removal of unused code
prakriti-solankey Feb 12, 2025
5591741
Support added for gpt 3o mini & gemini flash 2.0 in dev (#1069)
kaustubh-darekar Feb 12, 2025
6762367
Cancelling the API's on Unmounting phase (#1068)
kartikpersistent Feb 13, 2025
7f075d5
Merge branch 'staging' into dev
prakriti-solankey Feb 13, 2025
6a6c82c
removed unused neo4j-driver
kartikpersistent Feb 13, 2025
f198ca5
added auth0 in the frame src
kartikpersistent Feb 13, 2025
a72f3cf
message change
prakriti-solankey Feb 14, 2025
43d3bed
Update docker-compose.yml
kartikpersistent Feb 16, 2025
7bd5dd3
Bump tailwindcss from 3.4.9 to 4.0.6 in /frontend (#1091)
dependabot[bot] Feb 17, 2025
c198260
message check
prakriti-solankey Feb 17, 2025
a0cd597
V0.7.1 documentation updates (#1094)
kartikpersistent Feb 17, 2025
1cc723c
Merge branch 'staging' into dev
kartikpersistent Feb 17, 2025
db20e29
Merge branch 'staging' into dev
prakriti-solankey Feb 17, 2025
896bdee
Bump react-dropzone from 14.2.3 to 14.3.5 in /frontend (#1084)
dependabot[bot] Feb 18, 2025
8938cd1
Bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 in /fronte…
dependabot[bot] Feb 18, 2025
4ea5305
Bump eslint-plugin-react-hooks from 4.6.2 to 5.1.0 in /frontend (#1082)
dependabot[bot] Feb 18, 2025
74e8bdc
Bump typescript from 5.5.4 to 5.7.3 in /frontend (#1081)
dependabot[bot] Feb 18, 2025
5444e6b
fix-additional-instructions (#1089)
dhiaaeddine16 Feb 18, 2025
041837d
V0.7.1 minor fixes (#1097)
praveshkumar1988 Feb 19, 2025
e81655d
remove try except from llm.py
praveshkumar1988 Feb 19, 2025
78f1015
Remove example.env from main folder (#1099)
praveshkumar1988 Feb 19, 2025
fcb6bcc
moved to taulwind 3
kartikpersistent Feb 20, 2025
5c2029c
tailwind 4 migration
kartikpersistent Feb 20, 2025
36f2548
format fixes
kartikpersistent Feb 20, 2025
7e7a2c3
Source list api convert to post (#1102)
kartikpersistent Feb 20, 2025
7186ac4
Merge branch 'staging' into dev
prakriti-solankey Feb 20, 2025
7f8b8c9
height issue
prakriti-solankey Feb 20, 2025
cf92222
fix: Profile CSS Fix
kartikpersistent Feb 20, 2025
2274706
fix: display flex issue fix
kartikpersistent Feb 20, 2025
28780c5
Merge branch 'staging' into dev
prakriti-solankey Feb 21, 2025
c1b7b4d
Update dependabot.yml (#1122)
kaustubh-darekar Feb 24, 2025
5ca76aa
added automated linting and formatting through husky hooks
kartikpersistent Feb 24, 2025
0cf3f32
renamed the files
kartikpersistent Feb 24, 2025
2c9d1d6
husky setup fix
kartikpersistent Feb 24, 2025
381dc16
added permission
kartikpersistent Feb 24, 2025
97f0fd2
test commiy
kartikpersistent Feb 24, 2025
e4f1e91
type checking through husky hooks
kartikpersistent Feb 24, 2025
cc158d1
something bad code
kartikpersistent Feb 24, 2025
b88c7df
some bad code
kartikpersistent Feb 24, 2025
17ff72c
some bad code
kartikpersistent Feb 24, 2025
2f3f164
testing pre-commit code
kartikpersistent Feb 24, 2025
36c9c53
testing pre-commit code
kartikpersistent Feb 24, 2025
2bb53b1
lint setup on staged commits
kartikpersistent Feb 24, 2025
53da28c
test commt
kartikpersistent Feb 24, 2025
06d9b4f
test commit with errors
kartikpersistent Feb 24, 2025
2d084da
fix
kartikpersistent Feb 24, 2025
0b46eba
added pypandoc-binary package for OSError: No pandoc was found during…
kaustubh-darekar Feb 24, 2025
269d76b
added document plus icon
kartikpersistent Feb 25, 2025
f79feb8
Bump axios from 1.7.3 to 1.7.9 in /frontend (#1113)
dependabot[bot] Feb 25, 2025
ddb5852
Bump eslint-plugin-react-refresh from 0.4.9 to 0.4.19 in /frontend (#…
dependabot[bot] Feb 25, 2025
fcae55a
Bump postcss from 8.4.41 to 8.5.3 in /frontend (#1114)
dependabot[bot] Feb 25, 2025
69db442
Bump react-icons from 5.2.1 to 5.5.0 in /frontend (#1115)
dependabot[bot] Feb 25, 2025
b761f23
different url web page having same title issue fixed (#1110)
kaustubh-darekar Feb 25, 2025
3a222cc
Text file encoding issue (#1126)
kaustubh-darekar Feb 25, 2025
ede3095
Resolved UnicodeDecodeError issue for files having other than utf-8 e…
kaustubh-darekar Feb 26, 2025
370ab9e
Sanitizing additional instruction (#1130)
kaustubh-darekar Feb 26, 2025
ebbabd3
resolved UnboundLocalError: local variable 'graphDb_data_Access' refe…
kaustubh-darekar Feb 26, 2025
aca4f81
connection not there message for data resources (#1131)
prakriti-solankey Feb 26, 2025
455269b
dockerfile updates and utils functions change
prakriti-solankey Feb 26, 2025
e81aa00
fix: readonly issue fix
kartikpersistent Feb 27, 2025
a1ed635
Resolved uploaded file extraction failing on deployed version (#1136)
kaustubh-darekar Feb 27, 2025
cf11494
UI fixes v0.7.2 (#1138)
kartikpersistent Mar 3, 2025
979434d
Update BreakDownPopOver.tsx
kartikpersistent Mar 3, 2025
41b0370
chunk_count_val
prakriti-solankey Mar 3, 2025
bfe127f
type error
prakriti-solankey Mar 3, 2025
93ff881
spell fixes and protected route fixes
kartikpersistent Mar 3, 2025
a1a998e
top entities not found - bug resolved (#1150)
kaustubh-darekar Mar 4, 2025
506dfb0
limiting content fetching to current wikipedia page (#1151)
kaustubh-darekar Mar 4, 2025
3c8d669
added the link for login redirectig
kartikpersistent Mar 4, 2025
a8fb41a
removed loading statw
kartikpersistent Mar 5, 2025
de69dbd
added the padding and changed the message
kartikpersistent Mar 5, 2025
1ee0112
Bump re-resizable from 6.9.17 to 6.11.2 in /frontend (#1149)
dependabot[bot] Mar 5, 2025
e26a2e2
Bump eslint-plugin-react from 7.35.0 to 7.37.4 in /frontend (#1148)
dependabot[bot] Mar 5, 2025
2fe68f7
Bump @types/node from 20.14.14 to 22.13.9 in /frontend (#1152)
dependabot[bot] Mar 5, 2025
6f1e96d
Bump eslint-config-prettier from 8.10.0 to 10.0.2 in /frontend (#1146)
dependabot[bot] Mar 5, 2025
9e427c8
Bump react-dropzone from 14.3.5 to 14.3.8 in /frontend (#1145)
dependabot[bot] Mar 5, 2025
0090ae1
Update dependabot.yml
kartikpersistent Mar 5, 2025
738bc5b
Update the query to check DB is gds version (#1153)
praveshkumar1988 Mar 6, 2025
36c3fa4
Entity details shown for entity mode (#1154)
kaustubh-darekar Mar 6, 2025
dc0b83c
Merge branch 'staging' into dev
kartikpersistent Mar 6, 2025
e1fa2d5
bracket missing
prakriti-solankey Mar 6, 2025
ab75932
fix: auth 0 fix
kartikpersistent Mar 6, 2025
5f39980
Merge branch 'staging' into dev
kartikpersistent Mar 6, 2025
1014119
fixes (#1170)
kartikpersistent Mar 10, 2025
0f9c9a2
Bump @neo4j-nvl/react from 0.3.6 to 0.3.7 in /frontend (#1163)
dependabot[bot] Mar 17, 2025
d74b5ea
Bump @tailwindcss/postcss from 4.0.7 to 4.0.12 in /frontend (#1162)
dependabot[bot] Mar 17, 2025
11003a9
Bump prettier from 2.8.8 to 3.5.3 in /frontend (#1161)
dependabot[bot] Mar 17, 2025
cb907be
Bump @types/node from 22.13.9 to 22.13.10 in /frontend (#1160)
dependabot[bot] Mar 17, 2025
c67abd5
Bump axios from 1.7.9 to 1.8.2 in /frontend (#1159)
dependabot[bot] Mar 17, 2025
927c372
gitignore changes
kartikpersistent Mar 17, 2025
8604b5b
border missing for graph
prakriti-solankey Mar 17, 2025
7bde2ab
openai 4.5 and claude 3.7 added (#1181)
kaustubh-darekar Mar 18, 2025
59aebba
Handled deadlock errors in executing cypher query (#1187)
kaustubh-darekar Mar 19, 2025
7eb344e
Updating dependencies (#1189)
kaustubh-darekar Mar 19, 2025
93765a3
updating node & rel count in between extraction process (#1191)
kaustubh-darekar Mar 19, 2025
4dd1299
fix: Database name not being passed
kartikpersistent Mar 20, 2025
14e81c7
added generic type for queue
kartikpersistent Mar 21, 2025
7273d88
Fix : default value of function param
praveshkumar1988 Mar 24, 2025
4db55ab
log the info only when last chunk uploaded and merge the file
praveshkumar1988 Mar 24, 2025
81e7255
Product tour v1 (#1186)
kartikpersistent Mar 25, 2025
ccc94e1
tour fix for auth disabled scenario
kartikpersistent Apr 3, 2025
c6c9dc1
removed unused code
kartikpersistent Apr 3, 2025
2a337e0
conditions updates
kartikpersistent Apr 3, 2025
bc18c7f
Merge branch 'staging' into dev
kartikpersistent Apr 4, 2025
624c15d
Selection dropdown (#1217)
prakriti-solankey Apr 4, 2025
b609bf4
lint fixes
kartikpersistent Apr 4, 2025
8855fde
changes
prakriti-solankey Apr 4, 2025
8b4e1ba
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Apr 4, 2025
d59444a
lint issues
prakriti-solankey Apr 4, 2025
faff0c3
Merge branch 'staging' into dev
kartikpersistent Apr 4, 2025
fb1a18e
Bump @mui/styled-engine from 5.16.6 to 7.0.1 in /frontend (#1209)
dependabot[bot] Apr 4, 2025
8a56e42
Bump eslint-config-prettier from 10.0.2 to 10.1.1 in /frontend (#1208)
dependabot[bot] Apr 4, 2025
d4ff5f6
Bump uuid from 9.0.1 to 11.1.0 in /frontend (#1207)
dependabot[bot] Apr 4, 2025
b5ed17b
Bump axios from 1.8.3 to 1.8.4 in /frontend (#1206)
dependabot[bot] Apr 4, 2025
3927cc0
Bump lint-staged from 15.4.3 to 15.5.0 in /frontend (#1205)
dependabot[bot] Apr 4, 2025
44743c0
Gemini 2.5 model addition (#1221)
kaustubh-darekar Apr 7, 2025
7c1e11c
Updating source node for failed upload file (#1222)
kaustubh-darekar Apr 8, 2025
cc9164a
Llama4 model addition (#1223)
kaustubh-darekar Apr 8, 2025
bd34cfe
Update README.md
kartikpersistent Apr 8, 2025
f99e642
Update README.md
kartikpersistent Apr 8, 2025
c678890
Update README.md
kartikpersistent Apr 8, 2025
3949bb7
Update requirements.txt
karanchellani Apr 8, 2025
4355776
New fixes (#1224)
prakriti-solankey Apr 8, 2025
304675a
Update README.md
kartikpersistent Apr 8, 2025
cefb5b6
New fixes (#1228)
kartikpersistent Apr 9, 2025
e4dc92b
lint fixes
kartikpersistent Apr 9, 2025
6d50d54
type fix
kartikpersistent Apr 9, 2025
96aa510
Updated backend dependencies (#1225)
kaustubh-darekar Apr 9, 2025
45a76bf
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Apr 9, 2025
2b28d14
Merge branch 'staging' into dev
kartikpersistent Apr 9, 2025
de405c3
Graph schema option (#1230)
prakriti-solankey Apr 10, 2025
da0de9e
Bump json-repair from 0.30.3 to 0.40.0 in /backend (#1203)
dependabot[bot] Apr 11, 2025
5b51058
models change
prakriti-solankey Apr 11, 2025
3aebd90
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Apr 11, 2025
61cb5ba
Update Backend API doc
praveshkumar1988 Apr 11, 2025
c877e15
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
praveshkumar1988 Apr 11, 2025
209ae28
Update README.md
kartikpersistent Apr 12, 2025
db7f229
Added log statement to check which database it creates source node (#…
kaustubh-darekar Apr 15, 2025
da91c06
New models addition (#1233)
kaustubh-darekar Apr 16, 2025
fca8ba6
version conflict of json repair package with langchain_neo4j and neo4…
kaustubh-darekar Apr 16, 2025
04bd47b
Schema render (#1235)
prakriti-solankey Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
316 changes: 175 additions & 141 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,118 +1,206 @@
# Knowledge Graph Builder App

Creating knowledge graphs from unstructured data


# LLM Graph Builder

# Knowledge Graph Builder
![Python](https://img.shields.io/badge/Python-yellow)
![FastAPI](https://img.shields.io/badge/FastAPI-green)
![React](https://img.shields.io/badge/React-blue)

## Overview
This application is designed to turn Unstructured data (pdfs,docs,txt,youtube video,web pages,etc.) into a knowledge graph stored in Neo4j. It utilizes the power of Large language models (OpenAI,Gemini,etc.) to extract nodes, relationships and their properties from the text and create a structured knowledge graph using Langchain framework.
Transform unstructured data (PDFs, DOCs, TXT, YouTube videos, web pages, etc.) into a structured Knowledge Graph stored in Neo4j using the power of Large Language Models (LLMs) and the LangChain framework.

This application allows you to upload files from various sources (local machine, GCS, S3 bucket, or web sources), choose your preferred LLM model, and generate a Knowledge Graph.

Upload your files from local machine, GCS or S3 bucket or from web sources, choose your LLM model and generate knowledge graph.
---

## Key Features
- **Knowledge Graph Creation**: Transform unstructured data into structured knowledge graphs using LLMs.
- **Providing Schema**: Provide your own custom schema or use existing schema in settings to generate graph.
- **View Graph**: View graph for a particular source or multiple sources at a time in Bloom.
- **Chat with Data**: Interact with your data in a Neo4j database through conversational queries, also retrieve metadata about the source of response to your queries.For a dedicated chat interface, access the standalone chat application at: [Chat-Only](https://dev-frontend-dcavk67s4a-uc.a.run.app/chat-only). This link provides a focused chat experience for querying your data.

## Getting started
### **Knowledge Graph Creation**
- Seamlessly transform unstructured data into structured Knowledge Graphs using advanced LLMs.
- Extract nodes, relationships, and their properties to create structured graphs.

:warning: You will need to have a Neo4j Database V5.15 or later with [APOC installed](https://neo4j.com/docs/apoc/current/installation/) to use this Knowledge Graph Builder.
You can use any [Neo4j Aura database](https://neo4j.com/aura/) (including the free database)
If you are using Neo4j Desktop, you will not be able to use the docker-compose but will have to follow the [separate deployment of backend and frontend section](#running-backend-and-frontend-separately-dev-environment). :warning:
### **Schema Support**
- Use a custom schema or existing schemas configured in the settings to generate graphs.

### **Graph Visualization**
- View graphs for specific or multiple data sources simultaneously in **Neo4j Bloom**.

## Deployment
### Local deployment
#### Running through docker-compose
By default only OpenAI and Diffbot are enabled since Gemini requires extra GCP configurations.
According to enviornment we are configuring the models which is indicated by VITE_LLM_MODELS_PROD variable we can configure model based on our need.
### **Chat with Data**
- Interact with your data in the Neo4j database through conversational queries.
- Retrieve metadata about the source of responses to your queries.
- For a dedicated chat interface, use the standalone chat application with **[/chat-only](/chat-only) route.**

EX:
```env
VITE_LLM_MODELS_PROD="openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash"
### **LLMs Supported**
1. OpenAI
2. Gemini
3. Diffbot
4. Azure OpenAI(dev deployed version)
5. Anthropic(dev deployed version)
6. Fireworks(dev deployed version)
7. Groq(dev deployed version)
8. Amazon Bedrock(dev deployed version)
9. Ollama(dev deployed version)
10. Deepseek(dev deployed version)
11. Other OpenAI Compatible baseurl models(dev deployed version)

---

## Getting Started

### **Prerequisites**
- Neo4j Database **5.23 or later** with APOC installed.
- **Neo4j Aura** databases (including the free tier) are supported.
- If using **Neo4j Desktop**, you will need to deploy the backend and frontend separately (docker-compose is not supported).

---

## Deployment Options

### **Local Deployment**

#### Using Docker-Compose
Run the application using the default `docker-compose` configuration.

1. **Supported LLM Models**:
- By default, only OpenAI and Diffbot are enabled. Gemini requires additional GCP configurations.
- Use the `VITE_LLM_MODELS_PROD` variable to configure the models you need. Example:
```bash
VITE_LLM_MODELS_PROD="openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash"
```

2. **Input Sources**:
- By default, the following sources are enabled: `local`, `YouTube`, `Wikipedia`, `AWS S3`, and `web`.
- To add Google Cloud Storage (GCS) integration, include `gcs` and your Google client ID:
```bash
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,gcs,web"
VITE_GOOGLE_CLIENT_ID="your-google-client-id"
```

#### Chat Modes
Configure chat modes using the `VITE_CHAT_MODES` variable:
- By default, all modes are enabled: `vector`, `graph_vector`, `graph`, `fulltext`, `graph_vector_fulltext`, `entity_vector`, and `global_vector`.
- To specify specific modes, update the variable. For example:
```bash
VITE_CHAT_MODES="vector,graph"
```

---

### **Running Backend and Frontend Separately**

For development, you can run the backend and frontend independently.

#### **Frontend Setup**
1. Create the `.env` file in the `frontend` folder by copying `frontend/example.env`.
2. Update environment variables as needed.
3. Run:
```bash
cd frontend
yarn
yarn run dev
```

#### **Backend Setup**
1. Create the `.env` file in the `backend` folder by copying `backend/example.env`.
2. Preconfigure user credentials in the `.env` file to bypass the login dialog:
```bash
NEO4J_URI=<your-neo4j-uri>
NEO4J_USERNAME=<your-username>
NEO4J_PASSWORD=<your-password>
NEO4J_DATABASE=<your-database-name>
```
3. Run:
```bash
cd backend
python -m venv envName
source envName/bin/activate
pip install -r requirements.txt
uvicorn score:app --reload
```

---

### **Cloud Deployment**

Deploy the application on **Google Cloud Platform** using the following commands:

#### **Frontend Deployment**
```bash
gcloud run deploy dev-frontend \
--source . \
--region us-central1 \
--allow-unauthenticated
```

#### Additional configs

By default, the input sources will be: Local files, Youtube, Wikipedia ,AWS S3 and Webpages. As this default config is applied:
```env
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,web"
#### **Backend Deployment**
```bash
gcloud run deploy dev-backend \
--set-env-vars "OPENAI_API_KEY=<your-openai-api-key>" \
--set-env-vars "DIFFBOT_API_KEY=<your-diffbot-api-key>" \
--set-env-vars "NEO4J_URI=<your-neo4j-uri>" \
--set-env-vars "NEO4J_USERNAME=<your-username>" \
--set-env-vars "NEO4J_PASSWORD=<your-password>" \
--source . \
--region us-central1 \
--allow-unauthenticated
```

If however you want the Google GCS integration, add `gcs` and your Google client ID:
```env
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,gcs,web"
VITE_GOOGLE_CLIENT_ID="xxxx"
---
## For local llms (Ollama)
1. Pull the docker imgage of ollama
```bash
docker pull ollama/ollama
```

You can of course combine all (local, youtube, wikipedia, s3 and gcs) or remove any you don't want/need.

### Chat Modes

By default,all of the chat modes will be available: vector, graph_vector, graph, fulltext, graph_vector_fulltext , entity_vector and global_vector.

If none of the mode is mentioned in the chat modes variable all modes will be available:
2. Run the ollama docker image
```bash
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
```
3. Execute any llm model ex llama3
```bash
docker exec -it ollama ollama run llama3
```
4. Configure env variable in docker compose.
```env
VITE_CHAT_MODES=""
LLM_MODEL_CONFIG_ollama_<model_name>
#example
LLM_MODEL_CONFIG_ollama_llama3=${LLM_MODEL_CONFIG_ollama_llama3-llama3,
http://host.docker.internal:11434}
```

If however you want to specify the only vector mode or only graph mode you can do that by specifying the mode in the env:
5. Configure the backend API url
```env
VITE_CHAT_MODES="vector,graph"
VITE_CHAT_MODES="vector,graph"
VITE_BACKEND_API_URL=${VITE_BACKEND_API_URL-backendurl}
```
6. Open the application in browser and select the ollama model for the extraction.
7. Enjoy Graph Building.
---

## Additional Configuration

#### Running Backend and Frontend separately (dev environment)
Alternatively, you can run the backend and frontend separately:

- For the frontend:
1. Create the frontend/.env file by copy/pasting the frontend/example.env.
2. Change values as needed
3.
```bash
cd frontend
yarn
yarn run dev
```

- For the backend:
1. Create the backend/.env file by copy/pasting the backend/example.env. To streamline the initial setup and testing of the application, you can preconfigure user credentials directly within the backend .env file. This bypasses the login dialog and allows you to immediately connect with a predefined user.
- **NEO4J_URI**:
- **NEO4J_USERNAME**:
- **NEO4J_PASSWORD**:
- **NEO4J_DATABASE**:
3. Change values as needed
4.
```bash
cd backend
python -m venv envName
source envName/bin/activate
pip install -r requirements.txt
uvicorn score:app --reload
```
### Deploy in Cloud
To deploy the app and packages on Google Cloud Platform, run the following command on google cloud run:
### **LLM Models**
Configure LLM models using the `VITE_LLM_MODELS_PROD` variable. Example:
```bash
# Frontend deploy
gcloud run deploy dev-frontend
source location current directory > Frontend
region : 32 [us-central 1]
Allow unauthenticated request : Yes
VITE_LLM_MODELS_PROD="openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash"
```

### **Input Sources**
The default input sources are: `local`, `YouTube`, `Wikipedia`, `AWS S3`, and `web`.

To enable GCS integration, include `gcs` and your Google client ID:
```bash
# Backend deploy
gcloud run deploy --set-env-vars "OPENAI_API_KEY = " --set-env-vars "DIFFBOT_API_KEY = " --set-env-vars "NEO4J_URI = " --set-env-vars "NEO4J_PASSWORD = " --set-env-vars "NEO4J_USERNAME = "
source location current directory > Backend
region : 32 [us-central 1]
Allow unauthenticated request : Yes
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,gcs,web"
VITE_GOOGLE_CLIENT_ID="your-google-client-id"
```

## Usage
1. Connect to Neo4j Aura Instance which can be both AURA DS or AURA DB by passing URI and password through Backend env, fill using login dialog or drag and drop the Neo4j credentials file.
2. To differntiate we have added different icons. For AURA DB we have a database icon and for AURA DS we have scientific molecule icon right under Neo4j Connection details label.
3. Choose your source from a list of Unstructured sources to create graph.
4. Change the LLM (if required) from drop down, which will be used to generate graph.
5. Optionally, define schema(nodes and relationship labels) in entity graph extraction settings.
6. Either select multiple files to 'Generate Graph' or all the files in 'New' status will be processed for graph creation.
7. Have a look at the graph for individual files using 'View' in grid or select one or more files and 'Preview Graph'
8. Ask questions related to the processed/completed sources to chat-bot, Also get detailed information about your answers generated by LLM.

---


## ENV
| Env Variable Name | Mandatory/Optional | Default Value | Description |
|-------------------------|--------------------|---------------|--------------------------------------------------------------------------------------------------|
Expand Down Expand Up @@ -166,60 +254,6 @@ Allow unauthenticated request : Yes
| VITE_TOKENS_PER_CHUNK | Optional | 100 | variable to configure tokens count per chunk.This gives flexibility for users who may require different chunk sizes for various tokenization tasks, especially when working with large datasets or specific language models.
| VITE_CHUNK_TO_COMBINE | Optional | 1 | variable to configure number of chunks to combine for parllel processing.

## LLMs Supported
1. OpenAI
2. Gemini
3. Diffbot
4. Azure OpenAI(dev deployed version)
5. Anthropic(dev deployed version)
6. Fireworks(dev deployed version)
7. Groq(dev deployed version)
8. Amazon Bedrock(dev deployed version)
9. Ollama(dev deployed version)
10. Deepseek(dev deployed version)
11. Other OpenAI compabtile baseurl models(dev deployed version)

## For local llms (Ollama)
1. Pull the docker imgage of ollama
```bash
docker pull ollama/ollama
```
2. Run the ollama docker image
```bash
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
```
3. Pull specific ollama model.
```bash
ollama pull llama3
```
4. Execute any llm model ex🦙3
```bash
docker exec -it ollama ollama run llama3
```
5. Configure env variable in docker compose.
```env
LLM_MODEL_CONFIG_ollama_<model_name>
#example
LLM_MODEL_CONFIG_ollama_llama3=${LLM_MODEL_CONFIG_ollama_llama3-llama3,
http://host.docker.internal:11434}
```
6. Configure the backend API url
```env
VITE_BACKEND_API_URL=${VITE_BACKEND_API_URL-backendurl}
```
7. Open the application in browser and select the ollama model for the extraction.
8. Enjoy Graph Building.


## Usage
1. Connect to Neo4j Aura Instance which can be both AURA DS or AURA DB by passing URI and password through Backend env, fill using login dialog or drag and drop the Neo4j credentials file.
2. To differntiate we have added different icons. For AURA DB we have a database icon and for AURA DS we have scientific molecule icon right under Neo4j Connection details label.
3. Choose your source from a list of Unstructured sources to create graph.
4. Change the LLM (if required) from drop down, which will be used to generate graph.
5. Optionally, define schema(nodes and relationship labels) in entity graph extraction settings.
6. Either select multiple files to 'Generate Graph' or all the files in 'New' status will be processed for graph creation.
7. Have a look at the graph for individual files using 'View' in grid or select one or more files and 'Preview Graph'
8. Ask questions related to the processed/completed sources to chat-bot, Also get detailed information about your answers generated by LLM.

## Links

Expand Down
7 changes: 5 additions & 2 deletions backend/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ DEFAULT_DIFFBOT_CHAT_MODEL="openai_gpt_4o" #whichever model specified here , ne
LLM_MODEL_CONFIG_openai_gpt_3.5="gpt-3.5-turbo-0125,openai_api_key"
LLM_MODEL_CONFIG_openai_gpt_4o_mini="gpt-4o-mini-2024-07-18,openai_api_key"
LLM_MODEL_CONFIG_openai_gpt_4o="gpt-4o-2024-11-20,openai_api_key"
LLM_MODEL_CONFIG_openai-gpt-o3-mini="o3-mini-2025-01-31,openai_api_key"
LLM_MODEL_CONFIG_openai_gpt_4.1_mini="gpt-4.1-mini,openai_api_key"
LLM_MODEL_CONFIG_openai_gpt_4.1="gpt-4.1,openai_api_key"
LLM_MODEL_CONFIG_openai_gpt_o3_mini="o3-mini-2025-01-31,openai_api_key"
LLM_MODEL_CONFIG_gemini_1.5_pro="gemini-1.5-pro-002"
LLM_MODEL_CONFIG_gemini_1.5_flash="gemini-1.5-flash-002"
LLM_MODEL_CONFIG_gemini_2.0_flash="gemini-2.0-flash-001"
LLM_MODEL_CONFIG_gemini_2.5_pro="gemini-2.5-pro-exp-03-25"
LLM_MODEL_CONFIG_diffbot="diffbot,diffbot_api_key"
LLM_MODEL_CONFIG_azure_ai_gpt_35="azure_deployment_name,azure_endpoint or base_url,azure_api_key,api_version"
LLM_MODEL_CONFIG_azure_ai_gpt_4o="gpt-4o,https://YOUR-ENDPOINT.openai.azure.com/,azure_api_key,api_version"
LLM_MODEL_CONFIG_groq_llama3_70b="model_name,base_url,groq_api_key"
LLM_MODEL_CONFIG_anthropic_claude_3_5_sonnet="model_name,anthropic_api_key"
LLM_MODEL_CONFIG_fireworks_llama_v3_70b="model_name,fireworks_api_key"
LLM_MODEL_CONFIG_fireworks_llama4_maverick="model_name,fireworks_api_key"
LLM_MODEL_CONFIG_bedrock_claude_3_5_sonnet="model_name,aws_access_key_id,aws_secret__access_key,region_name"
LLM_MODEL_CONFIG_ollama_llama3="model_name,model_local_url"
YOUTUBE_TRANSCRIPT_PROXY="https://user:pass@domain:port"
Expand Down
Loading