()
| 376 | |
| 377 | |
| 378 | def test_simple_chat(): |
| 379 | client = LightLLMClient() |
| 380 | |
| 381 | try: |
| 382 | result = client.simple_chat("你好,请介绍一下你自己") |
| 383 | print("用户: 你好,请介绍一下你自己") |
| 384 | print("助手:", result["choices"][0]["message"]["content"]) |
| 385 | print() |
| 386 | except Exception as e: |
| 387 | print(f"错误: {e}") |
| 388 | print("请确保 LightLLM 服务已启动,并检查配置") |
| 389 | |
| 390 | |
| 391 | def test_stream_chat(): |
no test coverage detected