|
@@ -15,6 +15,7 @@ import base64
|
|
|
from database import *
|
|
|
from util import timetic, norm_community
|
|
|
import uuid
|
|
|
+SERVE_HOST = os.environ.get("SERVE_HOST", "192.168.100.159")
|
|
|
|
|
|
logger = get_logger()
|
|
|
|
|
@@ -123,9 +124,8 @@ def intent_service(node_name, asr, bid, code, uid, sessionid):
|
|
|
nodeName = node_name
|
|
|
), ensure_ascii=False)
|
|
|
try:
|
|
|
- ip = "192.168.100.159"
|
|
|
#ip= "10.0.0.24"
|
|
|
- res = requests.post(f"http://{ip}:50072/intention",
|
|
|
+ res = requests.post(f"http://{SERVE_HOST}:50072/intention",
|
|
|
param.encode("UTF-8"),
|
|
|
headers={'Content-Type': 'application/json;charset=utf-8'},
|
|
|
timeout=8)
|
|
@@ -182,7 +182,7 @@ def business_service(session_id, uid, code, tools, asr):
|
|
|
), ensure_ascii=False)
|
|
|
try:
|
|
|
# 192.168.40.21
|
|
|
- res = requests.post("http://192.168.100.159:8001/bigModel/queryBusinessInfo",
|
|
|
+ res = requests.post(f"http://{SERVE_HOST}:8001/bigModel/queryBusinessInfo",
|
|
|
param.encode("UTF-8"),
|
|
|
headers={'Content-Type': 'application/json;charset=utf-8'},
|
|
|
timeout=30)
|