Browse Source

feat: 去掉硬编码的地理位置user_location,后续可改成前端传入

zhangwl 3 hours ago
parent
commit
e557f89c91
1 changed files with 0 additions and 12 deletions
  1. 0 12
      app/utils/chat_utils.py

+ 0 - 12
app/utils/chat_utils.py

@@ -25,12 +25,6 @@ def get_web_search_tools() -> list:
         "max_keyword": 20,
         "limit": 20,
         "sources": ["douyin", "toutiao"],# 附加搜索来源(抖音百科、墨迹天气、头条图文等平台)
-        "user_location": {  # 用户地理位置(用于优化搜索结果)
-            "type": "approximate",  # 大致位置
-            "country": "中国",
-            "region": "浙江",
-            "city": "杭州"
-        }
     }]
 # 私域知识库 --- 此处的知识库也需要映射
 def get_knowledge_search_tools(knowledge_resource_id: str) -> list:
@@ -55,11 +49,5 @@ def get_doubao_tools() -> list:
                 "type": "enabled",
                 "role_description": Config.ROLE_DESCRIPTION
             }
-        },
-        "user_location": {
-            "type": "approximate",
-            "country": "中国",
-            "region": "浙江",
-            "city": "杭州"
         }
     }]