docs: Standardize Tongyi (#25103)

- **Description:** Standardize Tongyi LLM,include:
  - docs, the issue #24803
  - model init arg names, the issue #20085
This commit is contained in:
maang-h
2024-08-06 23:44:12 +08:00
committed by GitHub
parent 061ed250f6
commit 1028af17e7
2 changed files with 86 additions and 10 deletions

View File

@@ -27,3 +27,10 @@ def test_tongyi_generate_stream() -> None:
print(output) # noqa: T201
assert isinstance(output, LLMResult)
assert isinstance(output.generations, list)
def test_tongyi_with_param_alias() -> None:
"""Test tongyi parameters alias"""
llm = Tongyi(model="qwen-max", api_key="your-api_key") # type: ignore[call-arg]
assert llm.model_name == "qwen-max"
assert llm.dashscope_api_key == "your-api_key"