|
|
@@ -4,6 +4,7 @@ import requests
|
|
|
import json
|
|
|
import os
|
|
|
from .base_tool import html_to_text, get_unique_match_count
|
|
|
+from config.settings import settings
|
|
|
|
|
|
|
|
|
@tool
|
|
|
@@ -17,7 +18,7 @@ def get_knowledge_list(filter_words: List[str], match_limit: int = 3) -> str:
|
|
|
"""
|
|
|
print(f"正在查询知识库列表,筛选关键词:{filter_words} 匹配下限:{match_limit}")
|
|
|
|
|
|
- kms_list_url = os.getenv("KMS_LIST_URL")
|
|
|
+ kms_list_url = settings.KMS_LIST_URL # os.getenv("KMS_LIST_URL")
|
|
|
payload = {
|
|
|
"categorycodeList": [],
|
|
|
"ignoreTypeSub": False,
|
|
|
@@ -79,7 +80,7 @@ def get_knowledge_content(docid: str) -> str:
|
|
|
"""
|
|
|
print(f"正在获取知识库文章内容,DocID: {docid}")
|
|
|
|
|
|
- kms_view_url = os.getenv("KMS_VIEW_URL")
|
|
|
+ kms_view_url = settings.KMS_VIEW_URL # os.getenv("KMS_VIEW_URL")
|
|
|
headers = {
|
|
|
"Accept": "application/json, text/plain, */*",
|
|
|
"Content-Type": "application/json",
|