mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-03 21:23:13 +08:00
* 支持了agentlm * 支持了agentlm和相关提示词 * 修改了Agent的一些功能,加入了Embed方面的一个优化 * 修改了部分Agent的工具 * 增加一些Langchain的自带工具 * 修复一些兼容性的bug * 恢复知识库 * 恢复知识库 * 修复Azure问题
20 lines
595 B
Python
20 lines
595 B
Python
import sys
|
|
from pathlib import Path
|
|
root_path = Path(__file__).parent.parent.parent
|
|
sys.path.append(str(root_path))
|
|
|
|
from server.model_workers.qianfan import request_qianfan_api, MODEL_VERSIONS
|
|
from pprint import pprint
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize("version", list(MODEL_VERSIONS.keys())[:2])
|
|
def test_qianfan(version):
|
|
messages = [{"role": "user", "content": "你好"}]
|
|
print("\n" + version + "\n")
|
|
i = 1
|
|
for x in request_qianfan_api(messages, version=version):
|
|
pprint(x)
|
|
assert isinstance(x, dict)
|
|
assert "error_code" not in x
|
|
i += 1 |