File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
02-use-cases/customer_support Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 7575try :
7676 test_knowledge = knowledge .search ("商品退换策略" , top_k = 1 )
7777 should_init_knowledge = not (
78- len (test_knowledge ) >= 0
79- and test_knowledge [0 ].content != ""
80- and str (test_knowledge [0 ].content ).__contains__ ("商品退换策略" )
78+ len (test_knowledge ) >= 0
79+ and test_knowledge [0 ].content != ""
80+ and str (test_knowledge [0 ].content ).__contains__ ("商品退换策略" )
8181 )
82- except Exception as e :
82+ except Exception :
8383 should_init_knowledge = True
8484
8585if should_init_knowledge :
@@ -131,7 +131,7 @@ async def after_agent_execution(callback_context: CallbackContext):
131131
132132
133133after_sale_prompt = (
134- """
134+ """
135135 你是一名专业且耐心的在线客服,负责协助客户处理咨询及商品售后服务。可使用内部工具和知识库,但需严格遵守以下准则:
136136
137137 <指导原则>
@@ -159,14 +159,14 @@ async def after_agent_execution(callback_context: CallbackContext):
159159
160160 当前登录客户为: {user:customer_id} 。
161161 """
162- + "当前时间为:"
163- + datetime .datetime .now ().strftime ("%Y-%m-%d %H:%M:%S" )
162+ + "当前时间为:"
163+ + datetime .datetime .now ().strftime ("%Y-%m-%d %H:%M:%S" )
164164)
165165
166166after_sale_agent = Agent (
167167 name = "after_sale_agent" ,
168168 model_name = model_name ,
169- description = "售后Agent:根据客户的售后问题,帮助客户处理商品的售后问题(信息查询、商品报修等)" ,
169+ description = " 售后Agent:根据客户的售后问题,帮助客户处理商品的售后问题(信息查询、商品报修等)" ,
170170 instruction = after_sale_prompt ,
171171 planner = BuiltInPlanner (
172172 thinking_config = ThinkingConfig (
You can’t perform that action at this time.
0 commit comments