mirror of https://github.com/Mai-with-u/MaiBot.git
commit
004b0cc13d
|
|
@ -530,6 +530,9 @@ class LLM_request:
|
||||||
list: embedding向量,如果失败则返回None
|
list: embedding向量,如果失败则返回None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if(len(text) < 1):
|
||||||
|
logger.debug("该消息没有长度,不再发送获取embedding向量的请求")
|
||||||
|
return None
|
||||||
def embedding_handler(result):
|
def embedding_handler(result):
|
||||||
"""处理响应"""
|
"""处理响应"""
|
||||||
if "data" in result and len(result["data"]) > 0:
|
if "data" in result and len(result["data"]) > 0:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue