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:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'run-checks' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
|
|
|||
1
.github/workflows/test_milvus.yml
vendored
1
.github/workflows/test_milvus.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
1
.github/workflows/test_neo4j.yml
vendored
1
.github/workflows/test_neo4j.yml
vendored
|
|
@ -15,6 +15,7 @@ env:
|
|||
jobs:
|
||||
run_neo4j_integration_test:
|
||||
name: test
|
||||
if: ${{ github.event.label.name == 'run-checks' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
|
|
|
|||
1
.github/workflows/test_pgvector.yml
vendored
1
.github/workflows/test_pgvector.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
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:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'run-checks' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'run-checks' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'run-checks' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
defaults:
|
||||
|
|
|
|||
1
.github/workflows/test_qdrant.yml
vendored
1
.github/workflows/test_qdrant.yml
vendored
|
|
@ -18,6 +18,7 @@ jobs:
|
|||
run_qdrant_integration_test:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'run-checks' }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
|
|||
1
.github/workflows/test_weaviate.yml
vendored
1
.github/workflows/test_weaviate.yml
vendored
|
|
@ -18,6 +18,7 @@ jobs:
|
|||
run_weaviate_integration_test:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'run-checks' }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue