Merge branch 'dev' of github.com:topoteretes/cognee into COG-912-search-by-dataset

This commit is contained in:
Igor Ilic 2024-12-17 13:29:19 +01:00
commit dfcec5f41d
10 changed files with 14 additions and 3 deletions

View file

@ -17,6 +17,7 @@ jobs:
run_deduplication_test: run_deduplication_test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
defaults: defaults:
run: run:
shell: bash shell: bash

View file

@ -18,6 +18,7 @@ jobs:
run_milvus: run_milvus:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
strategy: strategy:
fail-fast: false fail-fast: false
defaults: defaults:

View file

@ -15,6 +15,7 @@ env:
jobs: jobs:
run_neo4j_integration_test: run_neo4j_integration_test:
name: test name: test
if: ${{ github.event.label.name == 'run-checks' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:

View file

@ -18,6 +18,7 @@ jobs:
run_pgvector_integration_test: run_pgvector_integration_test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
defaults: defaults:
run: run:
shell: bash shell: bash

View file

@ -18,6 +18,7 @@ jobs:
run_common: run_common:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
strategy: strategy:
fail-fast: false fail-fast: false
defaults: defaults:

View file

@ -18,6 +18,7 @@ jobs:
run_common: run_common:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
strategy: strategy:
fail-fast: false fail-fast: false
defaults: defaults:

View file

@ -18,6 +18,7 @@ jobs:
run_common: run_common:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
strategy: strategy:
fail-fast: false fail-fast: false
defaults: defaults:

View file

@ -18,6 +18,7 @@ jobs:
run_qdrant_integration_test: run_qdrant_integration_test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
defaults: defaults:
run: run:

View file

@ -18,6 +18,7 @@ jobs:
run_weaviate_integration_test: run_weaviate_integration_test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
defaults: defaults:
run: run:

View file

@ -1,13 +1,15 @@
from fastapi import APIRouter from fastapi import APIRouter
from typing import List from typing import List, Optional
from pydantic import BaseModel from pydantic import BaseModel
from cognee.modules.users.models import User from cognee.modules.users.models import User
from fastapi.responses import JSONResponse from fastapi.responses import JSONResponse
from cognee.modules.users.methods import get_authenticated_user from cognee.modules.users.methods import get_authenticated_user
from fastapi import Depends from fastapi import Depends
class CognifyPayloadDTO(BaseModel): class CognifyPayloadDTO(BaseModel):
datasets: List[str] datasets: List[str]
graph_model: Optional[BaseModel] = None
def get_cognify_router() -> APIRouter: def get_cognify_router() -> APIRouter:
router = APIRouter() router = APIRouter()
@ -17,7 +19,7 @@ def get_cognify_router() -> APIRouter:
""" This endpoint is responsible for the cognitive processing of the content.""" """ This endpoint is responsible for the cognitive processing of the content."""
from cognee.api.v1.cognify.cognify_v2 import cognify as cognee_cognify from cognee.api.v1.cognify.cognify_v2 import cognify as cognee_cognify
try: try:
await cognee_cognify(payload.datasets, user) await cognee_cognify(payload.datasets, user, payload.graph_model)
except Exception as error: except Exception as error:
return JSONResponse( return JSONResponse(
status_code=409, status_code=409,