diff --git a/api/config.py b/api/config.py new file mode 100644 index 0000000..3218cbf --- /dev/null +++ b/api/config.py @@ -0,0 +1,3 @@ +api_base_url = "http://36.33.26.201:27861/v1" +api_key = 'EMPTY' +model_name = 'qwen2.5-instruct' \ No newline at end of file diff --git a/api/mian.py b/api/mian.py index 8acbf60..9bc99da 100644 --- a/api/mian.py +++ b/api/mian.py @@ -15,6 +15,7 @@ from fuzzywuzzy import process from utils import CheckResult, StandardType, load_standard_name from constants import PROJECT_NAME, PROJECT_DEPARTMENT, SIMILARITY_VALUE +from config import * # 常量 MODEL_ERNIE_PATH = R"../ernie/output/checkpoint-4160" MODEL_UIE_PATH = R"../uie/output/checkpoint-4320" @@ -242,10 +243,6 @@ def agent(): def multi_slot_recognizer(intention_id, messages): from openai import OpenAI - final_slot = {} - api_base_url = "http://36.33.26.201:27861/v1" - api_key = 'EMPTY' - model_name = 'qwen2.5-instruct' client = OpenAI(base_url = api_base_url, api_key = api_key) prompt = f'''