MCPcopy
hub / github.com/ModelTC/LightLLM / test_simple_chat

Function test_simple_chat

test/test_api/test_openai_api.py:378–388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

376
377
378def 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
391def test_stream_chat():

Callers 1

mainFunction · 0.85

Calls 2

simple_chatMethod · 0.95
LightLLMClientClass · 0.85

Tested by

no test coverage detected