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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user