fix: add cognee to the local run environment

This commit is contained in:
Boris Arzentar 2025-11-06 13:03:11 +01:00
parent 69c7aa2559
commit a058250c95
No known key found for this signature in database
GPG key ID: D5CC274C784807B7

View file

@ -2,6 +2,8 @@ import io
import sys
import traceback
import cognee
def wrap_in_async_handler(user_code: str) -> str:
return (
@ -34,6 +36,7 @@ def run_in_local_sandbox(code, environment=None, loop=None):
environment["print"] = customPrintFunction
environment["running_loop"] = loop
environment["cognee"] = cognee
try:
exec(code, environment)