feat: Sandboxing for tool execution (#2040)

Co-authored-by: Caren Thomas <carenthomas@Jeffs-MacBook-Pro-2.local>
Co-authored-by: Caren Thomas <carenthomas@jeffs-mbp-2.lan>
Co-authored-by: Caren Thomas <carenthomas@Jeffs-MBP-2.hsd1.ca.comcast.net>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
This commit is contained in:
Matthew Zhou
2024-11-22 10:34:08 -08:00
committed by GitHub
parent 355fe1b4cf
commit 69730988ce
39 changed files with 2845 additions and 864 deletions

View File

@@ -5,6 +5,7 @@ import warnings
from enum import Enum
from typing import AsyncGenerator, Optional, Union
from fastapi import Header
from pydantic import BaseModel
from letta.schemas.usage import LettaUsageStatistics
@@ -84,5 +85,10 @@ def get_letta_server() -> SyncServer:
return server
# Dependency to get user_id from headers
def get_user_id(user_id: Optional[str] = Header(None, alias="user_id")) -> Optional[str]:
return user_id
def get_current_interface() -> StreamingServerInterface:
return StreamingServerInterface