Skip to content

Commit

Permalink
fix: parse UUID when logging search results
Browse files Browse the repository at this point in the history
  • Loading branch information
borisarzentar committed Nov 13, 2024
1 parent 9274faf commit 09f27e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cognee/api/v1/search/search_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from enum import Enum
from typing import Callable, Dict
from cognee.modules.search.operations import log_query, log_result
from cognee.modules.storage.utils import JSONEncoder
from cognee.shared.utils import send_telemetry
from cognee.modules.users.models import User
from cognee.modules.users.methods import get_default_user
Expand Down Expand Up @@ -37,7 +38,7 @@ async def search(query_type: SearchType, query_text: str, user: User = None) ->
if document_id is None or document_id in own_document_ids:
filtered_search_results.append(search_result)

await log_result(query.id, json.dumps(filtered_search_results), user.id)
await log_result(query.id, json.dumps(filtered_search_results, cls = JSONEncoder), user.id)

return filtered_search_results

Expand Down

0 comments on commit 09f27e8

Please sign in to comment.