mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-07-21 23:14:23 +08:00
fix: autocorrect everything in api (#17859)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
fe19cc7568
commit
f04d52c044
@ -270,7 +270,7 @@ class ApolloClient:
|
|||||||
while not self._stopping:
|
while not self._stopping:
|
||||||
for namespace in self._notification_map:
|
for namespace in self._notification_map:
|
||||||
self._do_heart_beat(namespace)
|
self._do_heart_beat(namespace)
|
||||||
time.sleep(60 * 10) # 10分钟
|
time.sleep(60 * 10) # 10 minutes
|
||||||
|
|
||||||
def _do_heart_beat(self, namespace):
|
def _do_heart_beat(self, namespace):
|
||||||
url = "{}/configs/{}/{}/{}?ip={}".format(self.config_url, self.app_id, self.cluster, namespace, self.ip)
|
url = "{}/configs/{}/{}/{}?ip={}".format(self.config_url, self.app_id, self.cluster, namespace, self.ip)
|
||||||
|
@ -367,7 +367,7 @@ Inherit the `__base.text2speech_model.Text2SpeechModel` base class and implement
|
|||||||
|
|
||||||
- Returns:
|
- Returns:
|
||||||
|
|
||||||
Text converted speech stream。
|
Text converted speech stream.
|
||||||
|
|
||||||
### Moderation
|
### Moderation
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ BAICHUAN_CHAT_APP_COMPLETION_PROMPT_CONFIG = {
|
|||||||
},
|
},
|
||||||
"conversation_histories_role": {"user_prefix": "用户", "assistant_prefix": "助手"},
|
"conversation_histories_role": {"user_prefix": "用户", "assistant_prefix": "助手"},
|
||||||
},
|
},
|
||||||
"stop": ["用户:"],
|
"stop": ["用户:"],
|
||||||
}
|
}
|
||||||
|
|
||||||
BAICHUAN_CHAT_APP_CHAT_PROMPT_CONFIG = {
|
BAICHUAN_CHAT_APP_CHAT_PROMPT_CONFIG = {
|
||||||
@ -41,5 +41,5 @@ BAICHUAN_COMPLETION_APP_CHAT_PROMPT_CONFIG = {
|
|||||||
|
|
||||||
BAICHUAN_COMPLETION_APP_COMPLETION_PROMPT_CONFIG = {
|
BAICHUAN_COMPLETION_APP_COMPLETION_PROMPT_CONFIG = {
|
||||||
"completion_prompt_config": {"prompt": {"text": "{{#pre_prompt#}}"}},
|
"completion_prompt_config": {"prompt": {"text": "{{#pre_prompt#}}"}},
|
||||||
"stop": ["用户:"],
|
"stop": ["用户:"],
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ class OracleVector(BaseVector):
|
|||||||
words = pseg.cut(query)
|
words = pseg.cut(query)
|
||||||
current_entity = ""
|
current_entity = ""
|
||||||
for word, pos in words:
|
for word, pos in words:
|
||||||
if pos in {"nr", "Ng", "eng", "nz", "n", "ORG", "v"}: # nr: 人名, ns: 地名, nt: 机构名
|
if pos in {"nr", "Ng", "eng", "nz", "n", "ORG", "v"}: # nr: 人名,ns: 地名,nt: 机构名
|
||||||
current_entity += word
|
current_entity += word
|
||||||
else:
|
else:
|
||||||
if current_entity:
|
if current_entity:
|
||||||
|
@ -19,7 +19,7 @@ parameters:
|
|||||||
zh_Hans: 本地时间
|
zh_Hans: 本地时间
|
||||||
human_description:
|
human_description:
|
||||||
en_US: localtime, such as 2024-1-1 0:0:0
|
en_US: localtime, such as 2024-1-1 0:0:0
|
||||||
zh_Hans: 本地时间, 比如2024-1-1 0:0:0
|
zh_Hans: 本地时间,比如 2024-1-1 0:0:0
|
||||||
- name: timezone
|
- name: timezone
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
@ -29,5 +29,5 @@ parameters:
|
|||||||
zh_Hans: 时区
|
zh_Hans: 时区
|
||||||
human_description:
|
human_description:
|
||||||
en_US: Timezone, such as Asia/Shanghai
|
en_US: Timezone, such as Asia/Shanghai
|
||||||
zh_Hans: 时区, 比如Asia/Shanghai
|
zh_Hans: 时区,比如 Asia/Shanghai
|
||||||
default: Asia/Shanghai
|
default: Asia/Shanghai
|
||||||
|
@ -29,5 +29,5 @@ parameters:
|
|||||||
zh_Hans: 时区
|
zh_Hans: 时区
|
||||||
human_description:
|
human_description:
|
||||||
en_US: Timezone, such as Asia/Shanghai
|
en_US: Timezone, such as Asia/Shanghai
|
||||||
zh_Hans: 时区, 比如Asia/Shanghai
|
zh_Hans: 时区,比如 Asia/Shanghai
|
||||||
default: Asia/Shanghai
|
default: Asia/Shanghai
|
||||||
|
@ -19,7 +19,7 @@ parameters:
|
|||||||
zh_Hans: 当前时间
|
zh_Hans: 当前时间
|
||||||
human_description:
|
human_description:
|
||||||
en_US: current time, such as 2024-1-1 0:0:0
|
en_US: current time, such as 2024-1-1 0:0:0
|
||||||
zh_Hans: 当前时间, 比如2024-1-1 0:0:0
|
zh_Hans: 当前时间,比如 2024-1-1 0:0:0
|
||||||
- name: current_timezone
|
- name: current_timezone
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
@ -29,7 +29,7 @@ parameters:
|
|||||||
zh_Hans: 当前时区
|
zh_Hans: 当前时区
|
||||||
human_description:
|
human_description:
|
||||||
en_US: Current Timezone, such as Asia/Shanghai
|
en_US: Current Timezone, such as Asia/Shanghai
|
||||||
zh_Hans: 当前时区, 比如Asia/Shanghai
|
zh_Hans: 当前时区,比如 Asia/Shanghai
|
||||||
default: Asia/Shanghai
|
default: Asia/Shanghai
|
||||||
- name: target_timezone
|
- name: target_timezone
|
||||||
type: string
|
type: string
|
||||||
@ -40,5 +40,5 @@ parameters:
|
|||||||
zh_Hans: 目标时区
|
zh_Hans: 目标时区
|
||||||
human_description:
|
human_description:
|
||||||
en_US: Target Timezone, such as Asia/Tokyo
|
en_US: Target Timezone, such as Asia/Tokyo
|
||||||
zh_Hans: 目标时区, 比如Asia/Tokyo
|
zh_Hans: 目标时区,比如 Asia/Tokyo
|
||||||
default: Asia/Tokyo
|
default: Asia/Tokyo
|
||||||
|
@ -45,7 +45,7 @@ def main():
|
|||||||
if is_tiflash_ready:
|
if is_tiflash_ready:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print(f"Attempt {attempt + 1} failed,retry in {retry_interval_seconds} seconds...")
|
print(f"Attempt {attempt + 1} failed, retry in {retry_interval_seconds} seconds...")
|
||||||
time.sleep(retry_interval_seconds)
|
time.sleep(retry_interval_seconds)
|
||||||
|
|
||||||
if is_tiflash_ready:
|
if is_tiflash_ready:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user