Skip to content

Dev #1095

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 38 commits into from
Feb 17, 2025
Merged

Dev #1095

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 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
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
65 changes: 40 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,34 @@ Allow unauthenticated request : Yes
|-------------------------|--------------------|---------------|--------------------------------------------------------------------------------------------------|
| |
| **BACKEND ENV**
| EMBEDDING_MODEL | Optional | all-MiniLM-L6-v2 | Model for generating the text embedding (all-MiniLM-L6-v2 , openai , vertexai) |
| IS_EMBEDDING | Optional | true | Flag to enable text embedding |
| KNN_MIN_SCORE | Optional | 0.94 | Minimum score for KNN algorithm |
| GEMINI_ENABLED | Optional | False | Flag to enable Gemini |
| GCP_LOG_METRICS_ENABLED | Optional | False | Flag to enable Google Cloud logs |
| NUMBER_OF_CHUNKS_TO_COMBINE | Optional | 5 | Number of chunks to combine when processing embeddings |
| UPDATE_GRAPH_CHUNKS_PROCESSED | Optional | 20 | Number of chunks processed before updating progress |
| NEO4J_URI | Optional | neo4j://database:7687 | URI for Neo4j database |
| NEO4J_USERNAME | Optional | neo4j | Username for Neo4j database |
| NEO4J_PASSWORD | Optional | password | Password for Neo4j database |
| LANGCHAIN_API_KEY | Optional | | API key for Langchain |
| LANGCHAIN_PROJECT | Optional | | Project for Langchain |
| LANGCHAIN_TRACING_V2 | Optional | true | Flag to enable Langchain tracing |
| GCS_FILE_CACHE | Optional | False | If set to True, will save the files to process into GCS. If set to False, will save the files locally |
| LANGCHAIN_ENDPOINT | Optional | https://api.smith.langchain.com | Endpoint for Langchain API |
| ENTITY_EMBEDDING | Optional | False | If set to True, It will add embeddings for each entity in database |
| LLM_MODEL_CONFIG_ollama_<model_name> | Optional | | Set ollama config as - model_name,model_local_url for local deployments |
| OPENAI_API_KEY | Mandatory | |An OpenAPI Key is required to use open LLM model to authenticate andn track requests |
| DIFFBOT_API_KEY | Mandatory | |API key is required to use Diffbot's NLP service to extraction entities and relatioship from unstructured data|
| BUCKET | Mandatory | |bucket name to store uploaded file on GCS |
| NEO4J_USER_AGENT | Optional | llm-graph-builder | Name of the user agent to track neo4j database activity |
| ENABLE_USER_AGENT | Optional | true | Boolean value to enable/disable neo4j user agent |
| DUPLICATE_TEXT_DISTANCE | Mandatory | 5 | This value used to find distance for all node pairs in the graph and calculated based on node properties |
| DUPLICATE_SCORE_VALUE | Mandatory | 0.97 | Node score value to match duplicate node |
| EFFECTIVE_SEARCH_RATIO | Mandatory | 1 | |
| GRAPH_CLEANUP_MODEL | Optional | 0.97 | Model name to clean-up graph in post processing |
| MAX_TOKEN_CHUNK_SIZE | Optional | 10000 | Maximum token size to process file content |
| YOUTUBE_TRANSCRIPT_PROXY| Optional | | Proxy key to process youtube video for getting transcript |
| EMBEDDING_MODEL | Optional | all-MiniLM-L6-v2 | Model for generating the text embedding (all-MiniLM-L6-v2 , openai , vertexai) |
| IS_EMBEDDING | Optional | true | Flag to enable text embedding |
| KNN_MIN_SCORE | Optional | 0.94 | Minimum score for KNN algorithm |
| GEMINI_ENABLED | Optional | False | Flag to enable Gemini |
| GCP_LOG_METRICS_ENABLED | Optional | False | Flag to enable Google Cloud logs |
| NUMBER_OF_CHUNKS_TO_COMBINE | Optional | 5 | Number of chunks to combine when processing embeddings |
| UPDATE_GRAPH_CHUNKS_PROCESSED | Optional | 20 | Number of chunks processed before updating progress |
| NEO4J_URI | Optional | neo4j://database:7687 | URI for Neo4j database |
| NEO4J_USERNAME | Optional | neo4j | Username for Neo4j database |
| NEO4J_PASSWORD | Optional | password | Password for Neo4j database |
| LANGCHAIN_API_KEY | Optional | | API key for Langchain |
| LANGCHAIN_PROJECT | Optional | | Project for Langchain |
| LANGCHAIN_TRACING_V2 | Optional | true | Flag to enable Langchain tracing |
| GCS_FILE_CACHE | Optional | False | If set to True, will save the files to process into GCS. If set to False, will save the files locally |
| LANGCHAIN_ENDPOINT | Optional | https://api.smith.langchain.com | Endpoint for Langchain API |
| ENTITY_EMBEDDING | Optional | False | If set to True, It will add embeddings for each entity in database |
| LLM_MODEL_CONFIG_ollama_<model_name> | Optional | | Set ollama config as - model_name,model_local_url for local deployments |
| RAGAS_EMBEDDING_MODEL | Optional | openai | embedding model used by ragas evaluation framework |
| |
| **FRONTEND ENV**
Expand All @@ -151,18 +162,22 @@ Allow unauthenticated request : Yes
| VITE_AUTH0_CLIENT_ID | Mandatory if you are enabling Authentication otherwise it is optional | |Okta Oauth Client ID for authentication
| VITE_AUTH0_DOMAIN | Mandatory if you are enabling Authentication otherwise it is optional | | Okta Oauth Cliend Domain
| VITE_SKIP_AUTH | Optional | true | Flag to skip the authentication
| VITE_CHUNK_OVERLAP | Optional | 20 | variable to configure chunk overlap
| 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. Azure OpenAI(dev deployed version)
4. Anthropic(dev deployed version)
5. Fireworks(dev deployed version)
6. Groq(dev deployed version)
7. Amazon Bedrock(dev deployed version)
8. Ollama(dev deployed version)
9. Diffbot
10. Other OpenAI compabtile baseurl models(dev deployed version)
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
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ services:
- VITE_AUTH0_DOMAIN=${VITE_AUTH0_DOMAIN-}
- VITE_AUTH0_CLIENT_ID=${VITE_AUTH0_CLIENT_ID-}
- VITE_SKIP_AUTH=${VITE_SKIP_AUTH-true}
- VITE_CHUNK_OVERLAP=${VITE_CHUNK_OVERLAP-}
- VITE_TOKENS_PER_CHUNK=${VITE_TOKENS_PER_CHUNK-}
- VITE_CHUNK_TO_COMBINE=${VITE_CHUNK_TO_COMBINE-}
- DEPLOYMENT_ENV=local
volumes:
- ./frontend:/app
Expand Down
4 changes: 4 additions & 0 deletions docs/frontend/frontend_docs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ image::images/Schema.jpg[PredefinedSchema, 600]

image::images/UserDefinedSchema.jpg[UserDefinedSchema, 600]

* ***Additional Instructions:***

image::images/AddtionalInstructions.jpg[AddtionalInstructions, 600]

* ***/delete_unconnected_nodes:***
** to remove the lonely entities.

Expand Down
Binary file added docs/frontend/images/AddtionalInstructions.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"postcss": "^8.4.33",
"prettier": "^2.7.1",
"react-dropzone": "^14.2.3",
"tailwindcss": "^3.4.1",
"tailwindcss": "^4.0.6",
"typescript": "^5.0.2",
"vite": "^4.5.3"
}
Expand Down
22 changes: 11 additions & 11 deletions frontend/src/components/ChatBot/ChatInfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ const ChatInfoModal: React.FC<chatInfoMessage> = ({
error?.length
? 10
: mode === chatModeLables['global search+vector+fulltext']
? 7
: mode === chatModeLables.graph
? 4
: 3
? 7
: mode === chatModeLables.graph
? 4
: 3
);
const [, copy] = useCopyToClipboard();
const [copiedText, setcopiedText] = useState<boolean>(false);
Expand All @@ -97,15 +97,15 @@ const ChatInfoModal: React.FC<chatInfoMessage> = ({
multiModelMetrics.length > 0 && Object.keys(multiModelMetrics[0]).length > 4
? true
: multiModelMetrics.length > 0 && Object.keys(multiModelMetrics[0]).length <= 4
? false
: null
? false
: null
);
const [isAdditionalMetricsWithSingleMode, setIsAdditionalMetricsWithSingleMode] = useState<boolean | null>(
metricDetails != undefined && Object.keys(metricDetails).length > 3
? true
: metricDetails != undefined && Object.keys(metricDetails).length <= 3
? false
: null
? false
: null
);
const actions: React.ComponentProps<typeof IconButton<'button'>>[] = useMemo(
() => [
Expand Down Expand Up @@ -349,9 +349,9 @@ const ChatInfoModal: React.FC<chatInfoMessage> = ({
{mode != chatModeLables.graph ? <Tabs.Tab tabId={3}>Sources used</Tabs.Tab> : <></>}
{mode != chatModeLables.graph ? <Tabs.Tab tabId={5}>Chunks</Tabs.Tab> : <></>}
{mode === chatModeLables['graph+vector'] ||
mode === chatModeLables.graph ||
mode === chatModeLables['graph+vector+fulltext'] ||
mode === chatModeLables['entity search+vector'] ? (
mode === chatModeLables.graph ||
mode === chatModeLables['graph+vector+fulltext'] ||
mode === chatModeLables['entity search+vector'] ? (
<Tabs.Tab tabId={4}>Top Entities used</Tabs.Tab>
) : (
<></>
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ const Content: React.FC<ContentProps> = ({
? postProcessingTasks.filter((task) => task !== 'graph_schema_consolidation')
: postProcessingTasks
: hasSelections
? postProcessingTasks.filter(
? postProcessingTasks.filter(
(task) => task !== 'graph_schema_consolidation' && task !== 'enable_communities'
)
: postProcessingTasks.filter((task) => task !== 'enable_communities');
: postProcessingTasks.filter((task) => task !== 'enable_communities');
if (payload.length) {
const response = await postProcessing(payload);
if (response.data.status === 'Success') {
Expand Down Expand Up @@ -611,12 +611,12 @@ const Content: React.FC<ContentProps> = ({
return prev.map((f) => {
return f.name === filename
? {
...f,
status: 'Ready to Reprocess',
processingProgress: isStartFromBegining ? 0 : f.processingProgress,
nodesCount: isStartFromBegining ? 0 : f.nodesCount,
relationshipsCount: isStartFromBegining ? 0 : f.relationshipsCount,
}
...f,
status: 'Ready to Reprocess',
processingProgress: isStartFromBegining ? 0 : f.processingProgress,
nodesCount: isStartFromBegining ? 0 : f.nodesCount,
relationshipsCount: isStartFromBegining ? 0 : f.relationshipsCount,
}
: f;
});
});
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/Graph/GraphViewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
<Dialog.Header htmlAttributes={{ id: 'graph-title' }}>
{headerTitle}
{viewPoint !== graphLabels.chatInfoView && (
<div style={{ display: 'flex', alignItems: 'center' }}>
<span>
<InformationCircleIconOutline className='n-size-token-6' />
</span>
<span className='n-body-small ml-1'>{graphLabels.chunksInfo}</span>
</div>
)}
<div style={{ display: 'flex', alignItems: 'center' }}>
<span>
<InformationCircleIconOutline className='n-size-token-6' />
</span>
<span className='n-body-small ml-1'>{graphLabels.chunksInfo}</span>
</div>
)}
<Flex className='w-full' alignItems='center' flexDirection='row'>
{checkBoxView && (
<CheckboxSelection
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Layout/DrawerDropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const DrawerDropzone: React.FC<DrawerProps> = ({
) : (
<Drawer.Body className='!overflow-hidden !w-[294px]'>
<Typography variant='subheading-medium'>
You are not logged in. Please Login to access the content.
You are not logged in. Please Connect to a database to access the content.
</Typography>
</Drawer.Body>
)}
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/Layout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ const PageLayout: React.FC = () => {
></SchemaFromTextDialog>
{isLargeDesktop ? (
<div
className={`layout-wrapper ${!isLeftExpanded ? 'drawerdropzoneclosed' : ''} ${!isRightExpanded ? 'drawerchatbotclosed' : ''
} ${!isRightExpanded && !isLeftExpanded ? 'drawerclosed' : ''}`}
className={`layout-wrapper ${!isLeftExpanded ? 'drawerdropzoneclosed' : ''} ${
!isRightExpanded ? 'drawerchatbotclosed' : ''
} ${!isRightExpanded && !isLeftExpanded ? 'drawerclosed' : ''}`}
>
<SideNav
toggles3Modal={toggleS3Modal}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function AdditionalInstructionsText({
<h5>{appLabels.chunkingConfiguration}</h5>
</div>
<Select
label='Chunk Size'
label='Token Count Per Chunk'
size={!tablet ? 'large' : 'medium'}
selectProps={{
options: defaultTokenChunkSizeOptions.map((value) => ({
Expand All @@ -134,6 +134,7 @@ export default function AdditionalInstructionsText({
`,
}}
type='creatable'
helpText='The maximum token limit is 10,000 for LLM processing. The total number of chunks will be calculated as 10,000 divided by the tokens per chunk you select. For example, selecting 500 tokens per chunk results in 20 chunks (10,000 / 500).'
/>
<Select
label='Chunk Overlap'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/GetFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export const getSourceNodes = async (userCredentials: UserCredentials) => {
console.log(error);
throw error;
}
};
};
2 changes: 1 addition & 1 deletion frontend/src/services/PollingAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ export default async function subscribe(
}
}
throw new Error(`Polling for ${fileName} timed out after ${MAX_POLLING_ATTEMPTS} attempts.`);
}
}
2 changes: 1 addition & 1 deletion frontend/src/services/ServerSideStatusUpdateAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ export function triggerStatusUpdateAPI(
datahandler(eventResponse);
}
};
}
}
30 changes: 15 additions & 15 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export type ChatbotProps = {
isChatOnly?: boolean;
isDeleteChatLoading: boolean;
};
export interface WikipediaModalTypes extends Omit<S3ModalProps, ''> { }
export interface WikipediaModalTypes extends Omit<S3ModalProps, ''> {}

export interface GraphViewModalProps {
open: boolean;
Expand Down Expand Up @@ -396,12 +396,12 @@ export interface commonserverresponse {
message?: string | orphanTotalNodes;
file_name?: string;
data?:
| labelsAndTypes
| labelsAndTypes[]
| uploadData
| orphanNodeProps[]
| dupNodes[]
| { pageitems: chunkdata[]; total_pages: number };
| labelsAndTypes
| labelsAndTypes[]
| uploadData
| orphanNodeProps[]
| dupNodes[]
| { pageitems: chunkdata[]; total_pages: number };
}
export interface dupNodeProps {
id: string;
Expand Down Expand Up @@ -486,20 +486,20 @@ export interface chatInfoMessage extends Partial<Messages> {
relationships: ExtendedRelationship[];
chunks: Chunk[];
metricDetails:
| {
[key: string]: number | string;
}
| undefined;
| {
[key: string]: number | string;
}
| undefined;
metricError: string;
infoEntities: Entity[];
communities: Community[];
infoLoading: boolean;
metricsLoading: boolean;
activeChatmodes:
| {
[key: string]: ResponseMode;
}
| undefined;
| {
[key: string]: ResponseMode;
}
| undefined;
multiModelMetrics: multimodelmetric[];
saveInfoEntitites: (entities: Entity[]) => void;
saveNodes: (chatNodes: ExtendedNode[]) => void;
Expand Down
Loading
Loading