gperdrizet commited on
Commit
16f3f6f
·
unverified ·
2 Parent(s): cbd458d 877edd4

Merge pull request #7 from gperdrizet/dev

Browse files
Files changed (2) hide show
  1. client/gradio_functions.py +0 -26
  2. client/interface.py +2 -2
client/gradio_functions.py CHANGED
@@ -3,32 +3,6 @@
3
  import os
4
  import re
5
 
6
- import logging
7
- from pathlib import Path
8
- from logging.handlers import RotatingFileHandler
9
-
10
-
11
- def configure_root_logger() -> None:
12
- '''Configures root logger for project wide logging.'''
13
-
14
- # Make sure log directory exists
15
- Path('logs').mkdir(parents=True, exist_ok=True)
16
-
17
- # Clear old logs if present
18
- delete_old_logs('logs', 'rss_client')
19
-
20
- # Set up the root logger so we catch logs from
21
- logging.basicConfig(
22
- handlers=[RotatingFileHandler(
23
- 'logs/rss_client.log',
24
- maxBytes=100000,
25
- backupCount=10,
26
- mode='w'
27
- )],
28
- level=logging.INFO,
29
- format='%(levelname)s - %(name)s - %(message)s'
30
- )
31
-
32
 
33
  def get_dialog_logger(name: str = 'dialog', clear: bool = True) -> logging.Logger:
34
  '''Sets up logger for model's internal dialog.'''
 
3
  import os
4
  import re
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  def get_dialog_logger(name: str = 'dialog', clear: bool = True) -> logging.Logger:
8
  '''Sets up logger for model's internal dialog.'''
client/interface.py CHANGED
@@ -67,7 +67,7 @@ async def agent_input(
67
  }]
68
 
69
  dialog.info('System: re-prompting LLM with return from %s call', tool_name)
70
- dialog.info('New prompt: %s ...', prompt[:150])
71
 
72
  logger.info('Re-prompting input %s', input_message)
73
  result = await bridge.process_query(
@@ -93,7 +93,7 @@ async def agent_input(
93
 
94
  logger.info('Direct, no-tool reply: %s', reply)
95
 
96
- dialog.info('LLM: %s ...', reply[:100])
97
  output_queue.put(reply)
98
  output_queue.put('bot-finished')
99
 
 
67
  }]
68
 
69
  dialog.info('System: re-prompting LLM with return from %s call', tool_name)
70
+ dialog.info('New prompt: %s ...', prompt[:75])
71
 
72
  logger.info('Re-prompting input %s', input_message)
73
  result = await bridge.process_query(
 
93
 
94
  logger.info('Direct, no-tool reply: %s', reply)
95
 
96
+ dialog.info('LLM: %s ...', reply[:175])
97
  output_queue.put(reply)
98
  output_queue.put('bot-finished')
99