feat: 添加清单定额查询API并优化意图识别模块
新增清单定额查询API服务,支持通过名称和编码查询定额及清单信息 在意图识别模块中添加定额清单信息提取功能,并记录各步骤耗时 将SiliconFlowEmbeddings替换为XinferenceEmbeddings并添加sqlite-vss依赖 优化shell脚本的screen会话检测逻辑
This commit is contained in:
@@ -21,7 +21,7 @@ import logging
|
||||
from rag2_0.tool.APIKeyManager import APIKeyManager
|
||||
from urllib.parse import urljoin
|
||||
|
||||
class SiliconFlowEmbeddings(Embeddings):
|
||||
class XinferenceEmbeddings(Embeddings):
|
||||
"""SiliconFlow嵌入模型封装"""
|
||||
def __init__(self, api_key: str, model: str = os.getenv("EMBEDDING_MODEL_NAME", "bge-m3")):
|
||||
self.api_key = api_key
|
||||
@@ -281,7 +281,7 @@ if __name__ == "__main__":
|
||||
async def test_async():
|
||||
# 测试异步嵌入
|
||||
api_key = APIKeyManager.get_api_key()
|
||||
embeddings = SiliconFlowEmbeddings(api_key=api_key)
|
||||
embeddings = XinferenceEmbeddings(api_key=api_key)
|
||||
query_embedding = await embeddings.embed_query_async("测试查询")
|
||||
print(f"异步嵌入向量维度: {len(query_embedding)}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user