|
@@ -176,8 +176,8 @@ class AgentService:
|
|
|
)
|
|
|
|
|
|
def _call_chat_api(self, chat_config: Dict) -> str:
|
|
|
- if global_flags.DISABLE_LLM_API_CALL:
|
|
|
- return 'LLM模拟回复'
|
|
|
+ if configs.get().get('debug_flags', {}).get('disable_llm_api_call', False):
|
|
|
+ return 'LLM模拟回复 {}'.format(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
|
|
if self.chat_service_type == ChatServiceType.OPENAI_COMPATIBLE:
|
|
|
chat_completion = self.llm_client.chat.completions.create(
|
|
|
messages=chat_config['messages'],
|
|
@@ -225,8 +225,6 @@ if __name__ == "__main__":
|
|
|
# 初始化用户管理服务
|
|
|
user_manager = LocalUserManager()
|
|
|
|
|
|
- global_flags.DISABLE_LLM_API_CALL = True
|
|
|
-
|
|
|
# 创建Agent服务
|
|
|
service = AgentService(
|
|
|
receive_backend=receive_queue,
|