fix: temp disable stream tokens (#2189)
This commit is contained in:
@@ -486,6 +486,8 @@ async def send_message_streaming(
|
||||
This endpoint accepts a message from a user and processes it through the agent.
|
||||
It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
||||
"""
|
||||
request.stream_tokens = False
|
||||
|
||||
actor = server.get_user_or_default(user_id=user_id)
|
||||
result = await send_message_to_agent(
|
||||
server=server,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import asyncio
|
||||
import json
|
||||
import traceback
|
||||
import warnings
|
||||
from enum import Enum
|
||||
from typing import AsyncGenerator, Optional, Union
|
||||
@@ -62,6 +61,9 @@ async def sse_async_generator(
|
||||
raise ValueError(f"Expected LettaUsageStatistics, got {type(usage)}")
|
||||
yield sse_formatter({"usage": usage.model_dump()})
|
||||
except Exception as e:
|
||||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
warnings.warn(f"Error getting usage data: {e}")
|
||||
yield sse_formatter({"error": "Failed to get usage data"})
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class SandboxConfigManager:
|
||||
def get_or_create_default_sandbox_config(self, sandbox_type: SandboxType, actor: PydanticUser) -> PydanticSandboxConfig:
|
||||
sandbox_config = self.get_sandbox_config_by_type(sandbox_type, actor=actor)
|
||||
if not sandbox_config:
|
||||
logger.info(f"Creating new sandbox config of type {sandbox_type}, none found for organization {actor.organization_id}.")
|
||||
logger.debug(f"Creating new sandbox config of type {sandbox_type}, none found for organization {actor.organization_id}.")
|
||||
|
||||
# TODO: Add more sandbox types later
|
||||
if sandbox_type == SandboxType.E2B:
|
||||
|
||||
Reference in New Issue
Block a user