fix: add missing _context method to RemoteSharedAIPlatformClient
This commit is contained in:
@@ -97,6 +97,13 @@ class RemoteSharedAIPlatformClient:
|
||||
api_prefix=settings.shared_ai_platform_api_prefix,
|
||||
)
|
||||
|
||||
def _context(self, current_user: Dict[str, Any]) -> SharedAIRequestContext:
|
||||
return SharedAIRequestContext(
|
||||
tenant_id=current_user.get("tenant_id", ""),
|
||||
user_id=current_user.get("id", ""),
|
||||
user_role=current_user.get("role", "admin"),
|
||||
)
|
||||
|
||||
def stream_answer(
|
||||
self,
|
||||
current_user: Dict[str, Any],
|
||||
|
||||
Reference in New Issue
Block a user