fix: Resolve issue with search serialization (#1370)
<!-- .github/pull_request_template.md --> ## Description Resolve issue with search serialization ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
commit
ff8396fd7a
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ from datetime import datetime
|
|||
from pydantic import Field
|
||||
from fastapi import Depends, APIRouter
|
||||
from fastapi.responses import JSONResponse
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
|
||||
from cognee.modules.search.types import SearchType
|
||||
from cognee.api.DTO import InDTO, OutDTO
|
||||
|
|
@ -136,7 +137,7 @@ def get_search_router() -> APIRouter:
|
|||
use_combined_context=payload.use_combined_context,
|
||||
)
|
||||
|
||||
return JSONResponse(content=results)
|
||||
return jsonable_encoder(results)
|
||||
except PermissionDeniedError:
|
||||
return []
|
||||
except Exception as error:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue