fix: add cognee to the local run environment
This commit is contained in:
parent
69c7aa2559
commit
a058250c95
1 changed files with 3 additions and 0 deletions
|
|
@ -2,6 +2,8 @@ import io
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
import cognee
|
||||||
|
|
||||||
|
|
||||||
def wrap_in_async_handler(user_code: str) -> str:
|
def wrap_in_async_handler(user_code: str) -> str:
|
||||||
return (
|
return (
|
||||||
|
|
@ -34,6 +36,7 @@ def run_in_local_sandbox(code, environment=None, loop=None):
|
||||||
|
|
||||||
environment["print"] = customPrintFunction
|
environment["print"] = customPrintFunction
|
||||||
environment["running_loop"] = loop
|
environment["running_loop"] = loop
|
||||||
|
environment["cognee"] = cognee
|
||||||
|
|
||||||
try:
|
try:
|
||||||
exec(code, environment)
|
exec(code, environment)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue