Merge branch 'dev' of github.com:topoteretes/cognee into COG-912-search-by-dataset
This commit is contained in:
commit
dfcec5f41d
10 changed files with 14 additions and 3 deletions
1
.github/workflows/test_deduplication.yml
vendored
1
.github/workflows/test_deduplication.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
1
.github/workflows/test_milvus.yml
vendored
1
.github/workflows/test_milvus.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
1
.github/workflows/test_neo4j.yml
vendored
1
.github/workflows/test_neo4j.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
1
.github/workflows/test_pgvector.yml
vendored
1
.github/workflows/test_pgvector.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
1
.github/workflows/test_python_3_10.yml
vendored
1
.github/workflows/test_python_3_10.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
1
.github/workflows/test_python_3_11.yml
vendored
1
.github/workflows/test_python_3_11.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
1
.github/workflows/test_python_3_9.yml
vendored
1
.github/workflows/test_python_3_9.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
1
.github/workflows/test_qdrant.yml
vendored
1
.github/workflows/test_qdrant.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
1
.github/workflows/test_weaviate.yml
vendored
1
.github/workflows/test_weaviate.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue