Skip to content

Commit 3bf067a

Browse files
authored
Message management (#553)
* added message masking mask selected content of message or an entire message * fixed citation border * enabled streaming * image gen with streaming * added reasoning support * added reasoning to agents * agent support * fixed key bug * disable group create and fixed model fetch * updated config * fixed support for workspace search for streaming * fix bug with sidebar update * fixed gpt-5 vision processing bug * metadata works with all messages now * fixed debug_print bug * added reasoning effort to agents and fixed agent validation * fixed file metadata loading bug * fixed llm streaming when working with group workspace data * fixed cosmos container config error * added delete message and fixed message threading * retry bug fixes * fixed message threading order * moved message buttons to menu * fixed bug for conversation history that included inactive threads * added css styling for urls for dark mode * fixed bug with newly created messages not showing metadata or deleting * improved search times by 100x * added token collect to messages supports models and agents * added streaming for agents along with token collection * added embedding token tracking * added document creation/deletion and token tracking to activity log * adding conversations to activity logs * added activity log viewer with filters, search, and export * added support for agents in edit and retry messages
1 parent 164459f commit 3bf067a

File tree

71 files changed

+13278
-895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+13278
-895
lines changed

application/single_app/app.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ def before_first_request():
165165
settings = get_settings(use_cosmos=True)
166166
app_settings_cache.configure_app_cache(settings, get_redis_cache_infrastructure_endpoint(settings.get('redis_url', '').strip().split('.')[0]))
167167
app_settings_cache.update_settings_cache(settings)
168-
print(f"DEBUG:Application settings: {settings}")
169-
print(f"DEBUG:App settings cache initialized: {'Using Redis cache:' + str(app_settings_cache.app_cache_is_using_redis)} {app_settings_cache.get_settings_cache()}")
168+
sanitized_settings = sanitize_settings_for_logging(settings)
169+
debug_print(f"DEBUG:Application settings: {sanitized_settings}")
170+
sanitized_settings_cache = sanitize_settings_for_logging(app_settings_cache.get_settings_cache())
171+
debug_print(f"DEBUG:App settings cache initialized: {'Using Redis cache:' + str(app_settings_cache.app_cache_is_using_redis)} {sanitized_settings_cache}")
170172

171173
initialize_clients(settings)
172174
ensure_custom_logo_file_exists(app, settings)
@@ -199,7 +201,7 @@ def check_logging_timers():
199201
turnoff_time = None
200202

201203
if turnoff_time and current_time >= turnoff_time:
202-
debug_print(f"[DEBUG]: logging timer expired at {turnoff_time}. Disabling debug logging.")
204+
debug_print(f"logging timer expired at {turnoff_time}. Disabling debug logging.")
203205
settings['enable_debug_logging'] = False
204206
settings['debug_logging_timer_enabled'] = False
205207
settings['debug_logging_turnoff_time'] = None

application/single_app/config.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
EXECUTOR_TYPE = 'thread'
8989
EXECUTOR_MAX_WORKERS = 30
9090
SESSION_TYPE = 'filesystem'
91-
VERSION = "0.233.179"
91+
VERSION = "0.233.318"
9292

9393

9494
SECRET_KEY = os.getenv('SECRET_KEY', 'dev-secret-key-change-in-production')
@@ -236,6 +236,17 @@ def get_redis_cache_infrastructure_endpoint(redis_hostname: str) -> str:
236236
partition_key=PartitionKey(path="/conversation_id")
237237
)
238238

239+
cosmos_group_conversations_container_name = "group_conversations"
240+
cosmos_group_conversations_container = cosmos_database.create_container_if_not_exists(
241+
id=cosmos_group_conversations_container_name,
242+
partition_key=PartitionKey(path="/id")
243+
)
244+
245+
cosmos_group_messages_container_name = "group_messages"
246+
cosmos_group_messages_container = cosmos_database.create_container_if_not_exists(
247+
id=cosmos_group_messages_container_name,
248+
partition_key=PartitionKey(path="/conversation_id")
249+
)
239250

240251
cosmos_settings_container_name = "settings"
241252
cosmos_settings_container = cosmos_database.create_container_if_not_exists(
@@ -339,18 +350,6 @@ def get_redis_cache_infrastructure_endpoint(redis_hostname: str) -> str:
339350
partition_key=PartitionKey(path="/user_id")
340351
)
341352

342-
cosmos_file_processing_container_name = "group_messages"
343-
cosmos_file_processing_container = cosmos_database.create_container_if_not_exists(
344-
id=cosmos_file_processing_container_name,
345-
partition_key=PartitionKey(path="/conversation_id")
346-
)
347-
348-
cosmos_file_processing_container_name = "group_conversations"
349-
cosmos_file_processing_container = cosmos_database.create_container_if_not_exists(
350-
id=cosmos_file_processing_container_name,
351-
partition_key=PartitionKey(path="/id")
352-
)
353-
354353
cosmos_group_agents_container_name = "group_agents"
355354
cosmos_group_agents_container = cosmos_database.create_container_if_not_exists(
356355
id=cosmos_group_agents_container_name,
@@ -385,7 +384,6 @@ def get_redis_cache_infrastructure_endpoint(redis_hostname: str) -> str:
385384
cosmos_search_cache_container = cosmos_database.create_container_if_not_exists(
386385
id=cosmos_search_cache_container_name,
387386
partition_key=PartitionKey(path="/user_id")
388-
# No default_ttl - TTL controlled by app logic via admin settings for flexibility
389387
)
390388

391389
cosmos_activity_logs_container_name = "activity_logs"
@@ -687,11 +685,11 @@ def initialize_clients(settings):
687685
try:
688686
container_client = blob_service_client.get_container_client(container_name)
689687
if not container_client.exists():
690-
print(f"[DEBUG]: Container '{container_name}' does not exist. Creating...")
688+
print(f"Container '{container_name}' does not exist. Creating...")
691689
container_client.create_container()
692-
print(f"[DEBUG]: Container '{container_name}' created successfully.")
690+
print(f"Container '{container_name}' created successfully.")
693691
else:
694-
print(f"[DEBUG]: Container '{container_name}' already exists.")
692+
print(f"Container '{container_name}' already exists.")
695693
except Exception as container_error:
696694
print(f"Error creating container {container_name}: {str(container_error)}")
697695
except Exception as e:

0 commit comments

Comments
 (0)