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:
name: test
runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'run-checks' }}
defaults:
run:
shell: bash

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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