diff --git a/.dlt/config.toml b/.dlt/config.toml deleted file mode 100644 index c72c145b5..000000000 --- a/.dlt/config.toml +++ /dev/null @@ -1,6 +0,0 @@ -# put your configuration values here - -[runtime] -log_level = "WARNING" # the system log level of dlt -# use the dlthub_telemetry setting to enable/disable anonymous usage data reporting, see https://dlthub.com/docs/telemetry -dlthub_telemetry = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..8bdf6cf28 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# ignore jupyter notebooks in the language bar on github +notebooks/** linguist-vendored diff --git a/.github/workflows/notebooks_tests.yml b/.github/workflows/notebooks_tests.yml index a6fbae294..f33f90b4a 100644 --- a/.github/workflows/notebooks_tests.yml +++ b/.github/workflows/notebooks_tests.yml @@ -11,30 +11,9 @@ jobs: # notebook-location: notebooks/cognee_demo.ipynb # secrets: inherit - run-llama-index-integration: - name: LlamaIndex Integration Notebook - uses: ./.github/workflows/reusable_notebook.yml - with: - notebook-location: notebooks/llama_index_cognee_integration.ipynb - secrets: inherit - - run-cognee-llama-index: - name: Cognee LlamaIndex Notebook - uses: ./.github/workflows/reusable_notebook.yml - with: - notebook-location: notebooks/cognee_llama_index.ipynb - secrets: inherit - run-cognee-multimedia: name: Cognee Multimedia Notebook uses: ./.github/workflows/reusable_notebook.yml with: notebook-location: notebooks/cognee_multimedia_demo.ipynb secrets: inherit - -# run-graphrag-vs-rag: -# name: Graphrag vs Rag notebook -# uses: ./.github/workflows/reusable_notebook.yml -# with: -# notebook-location: notebooks/graphrag_vs_rag.ipynb -# secrets: inherit diff --git a/README.md b/README.md index 832ffaa3a..1b0e864f4 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ Learn more · Join Discord + · + Join r/AIMemory

@@ -28,7 +30,7 @@ -Build dynamic Agent memory using scalable, modular ECL (Extract, Cognify, Load) pipelines. +Build dynamic memory for Agents and replace RAG using scalable, modular ECL (Extract, Cognify, Load) pipelines. More on [use-cases](https://docs.cognee.ai/use-cases) and [evals](https://github.com/topoteretes/cognee/tree/main/evals) @@ -46,22 +48,20 @@ More on [use-cases](https://docs.cognee.ai/use-cases) and [evals](https://github
Why cognee?
- - - ## Features - Interconnect and retrieve your past conversations, documents, images and audio transcriptions -- Reduce hallucinations, developer effort, and cost. +- Replaces RAG systems and reduces developer effort, and cost. - Load data to graph and vector databases using only Pydantic - Manipulate your data while ingesting from 30+ data sources ## Get Started -Get started quickly with a Google Colab notebook or starter repo +Get started quickly with a Google Colab notebook , Deepnote notebook or starter repo + ## Contributing @@ -141,7 +141,15 @@ Example output: ``` -### cognee UI +## Our paper is out! Read here + +
+ cognee paper +
+ + + +## Cognee UI You can also cognify your files and query using cognee UI. diff --git a/alembic/versions/482cd6517ce4_add_default_user.py b/alembic/versions/482cd6517ce4_add_default_user.py index 92429e1e4..d85f0f146 100644 --- a/alembic/versions/482cd6517ce4_add_default_user.py +++ b/alembic/versions/482cd6517ce4_add_default_user.py @@ -12,6 +12,8 @@ from sqlalchemy.util import await_only from cognee.modules.users.methods import create_default_user, delete_user +from fastapi_users.exceptions import UserAlreadyExists + # revision identifiers, used by Alembic. revision: str = "482cd6517ce4" @@ -21,7 +23,10 @@ depends_on: Union[str, Sequence[str], None] = "8057ae7329c2" def upgrade() -> None: - await_only(create_default_user()) + try: + await_only(create_default_user()) + except UserAlreadyExists: + pass # It's fine if the default user already exists def downgrade() -> None: diff --git a/assets/cognee-paper.png b/assets/cognee-paper.png new file mode 100644 index 000000000..df7113b0e Binary files /dev/null and b/assets/cognee-paper.png differ diff --git a/cognee-frontend/package-lock.json b/cognee-frontend/package-lock.json index 02e5145d7..7ed113b5a 100644 --- a/cognee-frontend/package-lock.json +++ b/cognee-frontend/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "dependencies": { "classnames": "^2.5.1", - "next": "14.2.3", + "next": "^14.2.26", "ohmy-ui": "^0.0.6", "react": "^18", "react-dom": "^18", @@ -199,7 +199,9 @@ } }, "node_modules/@next/env": { - "version": "14.2.3", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.26.tgz", + "integrity": "sha512-vO//GJ/YBco+H7xdQhzJxF7ub3SUwft76jwaeOyVVQFHCi5DCnkP16WHB+JBylo4vOKPoZBlR94Z8xBxNBdNJA==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { @@ -254,7 +256,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.3", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.26.tgz", + "integrity": "sha512-zDJY8gsKEseGAxG+C2hTMT0w9Nk9N1Sk1qV7vXYz9MEiyRoF5ogQX2+vplyUMIfygnjn9/A04I6yrUTRTuRiyQ==", "cpu": [ "arm64" ], @@ -268,12 +272,13 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.3.tgz", - "integrity": "sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.26.tgz", + "integrity": "sha512-U0adH5ryLfmTDkahLwG9sUQG2L0a9rYux8crQeC92rPhi3jGQEY47nByQHrVrt3prZigadwj/2HZ1LUUimuSbg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -283,12 +288,13 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.3.tgz", - "integrity": "sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.26.tgz", + "integrity": "sha512-SINMl1I7UhfHGM7SoRiw0AbwnLEMUnJ/3XXVmhyptzriHbWvPPbbm0OEVG24uUKhuS1t0nvN/DBvm5kz6ZIqpg==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -298,12 +304,13 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.3.tgz", - "integrity": "sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.26.tgz", + "integrity": "sha512-s6JaezoyJK2DxrwHWxLWtJKlqKqTdi/zaYigDXUJ/gmx/72CrzdVZfMvUc6VqnZ7YEvRijvYo+0o4Z9DencduA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -313,12 +320,13 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.3.tgz", - "integrity": "sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.26.tgz", + "integrity": "sha512-FEXeUQi8/pLr/XI0hKbe0tgbLmHFRhgXOUiPScz2hk0hSmbGiU8aUqVslj/6C6KA38RzXnWoJXo4FMo6aBxjzg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -328,12 +336,13 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.3.tgz", - "integrity": "sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.26.tgz", + "integrity": "sha512-BUsomaO4d2DuXhXhgQCVt2jjX4B4/Thts8nDoIruEJkhE5ifeQFtvW5c9JkdOtYvE5p2G0hcwQ0UbRaQmQwaVg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -343,12 +352,13 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.3.tgz", - "integrity": "sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.26.tgz", + "integrity": "sha512-5auwsMVzT7wbB2CZXQxDctpWbdEnEW/e66DyXO1DcgHxIyhP06awu+rHKshZE+lPLIGiwtjo7bsyeuubewwxMw==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -358,12 +368,13 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz", - "integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.26.tgz", + "integrity": "sha512-GQWg/Vbz9zUGi9X80lOeGsz1rMH/MtFO/XqigDznhhhTfDlDoynCM6982mPCbSlxJ/aveZcKtTlwfAjwhyxDpg==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -373,12 +384,13 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.3.tgz", - "integrity": "sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.26.tgz", + "integrity": "sha512-2rdB3T1/Gp7bv1eQTTm9d1Y1sv9UuJ2LAwOE0Pe2prHKe32UNscj7YS13fRB37d0GAiGNR+Y7ZcW8YjDI8Ns0w==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -2728,10 +2740,12 @@ "license": "MIT" }, "node_modules/next": { - "version": "14.2.3", + "version": "14.2.26", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.26.tgz", + "integrity": "sha512-b81XSLihMwCfwiUVRRja3LphLo4uBBMZEzBBWMaISbKTwOmq3wPknIETy/8000tr7Gq4WmbuFYPS7jOYIf+ZJw==", "license": "MIT", "dependencies": { - "@next/env": "14.2.3", + "@next/env": "14.2.26", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -2746,15 +2760,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.3", - "@next/swc-darwin-x64": "14.2.3", - "@next/swc-linux-arm64-gnu": "14.2.3", - "@next/swc-linux-arm64-musl": "14.2.3", - "@next/swc-linux-x64-gnu": "14.2.3", - "@next/swc-linux-x64-musl": "14.2.3", - "@next/swc-win32-arm64-msvc": "14.2.3", - "@next/swc-win32-ia32-msvc": "14.2.3", - "@next/swc-win32-x64-msvc": "14.2.3" + "@next/swc-darwin-arm64": "14.2.26", + "@next/swc-darwin-x64": "14.2.26", + "@next/swc-linux-arm64-gnu": "14.2.26", + "@next/swc-linux-arm64-musl": "14.2.26", + "@next/swc-linux-x64-gnu": "14.2.26", + "@next/swc-linux-x64-musl": "14.2.26", + "@next/swc-win32-arm64-msvc": "14.2.26", + "@next/swc-win32-ia32-msvc": "14.2.26", + "@next/swc-win32-x64-msvc": "14.2.26" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", diff --git a/cognee-frontend/package.json b/cognee-frontend/package.json index 66d88f6c9..d74bb7207 100644 --- a/cognee-frontend/package.json +++ b/cognee-frontend/package.json @@ -10,11 +10,11 @@ }, "dependencies": { "classnames": "^2.5.1", - "next": "14.2.3", "ohmy-ui": "^0.0.6", "react": "^18", "react-dom": "^18", - "uuid": "^9.0.1" + "uuid": "^9.0.1", + "next": "^14.2.26" }, "devDependencies": { "@types/node": "^20", diff --git a/cognee-frontend/src/modules/ingestion/DatasetsView/DatasetsView.tsx b/cognee-frontend/src/modules/ingestion/DatasetsView/DatasetsView.tsx index 13965230b..68a0d606c 100644 --- a/cognee-frontend/src/modules/ingestion/DatasetsView/DatasetsView.tsx +++ b/cognee-frontend/src/modules/ingestion/DatasetsView/DatasetsView.tsx @@ -53,7 +53,7 @@ export default function DatasetsView({ setExplorationDataset(dataset); showExplorationWindow(); } - + return ( <> @@ -95,10 +95,10 @@ export default function DatasetsView({ ))} - + {dataset?.name} - + diff --git a/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx b/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx index 664a46fad..bea5e1277 100644 --- a/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx +++ b/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx @@ -3,7 +3,7 @@ import { v4 } from 'uuid'; import classNames from 'classnames'; import { useCallback, useEffect, useState } from 'react'; -import { CTAButton, Stack, Text, DropdownSelect, TextArea, useBoolean } from 'ohmy-ui'; +import { CTAButton, Stack, Text, DropdownSelect, TextArea, useBoolean, Input } from 'ohmy-ui'; import { fetch } from '@/utils'; import styles from './SearchView.module.css'; import getHistory from '@/modules/chat/getHistory'; @@ -33,8 +33,15 @@ export default function SearchView() { }, { value: 'RAG_COMPLETION', label: 'Completion using RAG', + }, { + value: 'GRAPH_COMPLETION_COT', + label: 'Cognee\'s Chain of Thought search', + }, { + value: 'GRAPH_COMPLETION_CONTEXT_EXTENSION', + label: 'Cognee\'s Multi-Hop search', }]; const [searchType, setSearchType] = useState(searchOptions[0]); + const [rangeValue, setRangeValue] = useState(10); const scrollToBottom = useCallback(() => { setTimeout(() => { @@ -90,6 +97,7 @@ export default function SearchView() { body: JSON.stringify({ query: inputValue.trim(), searchType: searchTypeValue, + topK: rangeValue, }), }) .then((response) => response.json()) @@ -108,7 +116,7 @@ export default function SearchView() { .catch(() => { setInputValue(inputValue); }); - }, [inputValue, scrollToBottom, searchType.value]); + }, [inputValue, rangeValue, scrollToBottom, searchType.value]); const { value: isInputExpanded, @@ -122,6 +130,10 @@ export default function SearchView() { } }; + const handleRangeValueChange = (event: React.ChangeEvent) => { + setRangeValue(parseInt(event.target.value)); + }; + return ( @@ -146,9 +158,15 @@ export default function SearchView() {
- +