MCPcopy
hub / github.com/LazyAGI/LazyLLM / test_chat

Method test_chat

tests/advanced_tests/test_example.py:62–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 return web, client
61
62 def test_chat(self):
63 from examples.chatbot import chat
64 chat.start()
65 query = '请原样英文输出:Hello world.'
66 res = chat(query)
67 assert res == 'Hello world.'
68
69 # test chat warpped in web
70 _, client = self.warp_into_web(chat)
71 chat_history = [[query, None]]
72 ans = client.predict(self.use_context,
73 chat_history,
74 self.stream_output,
75 self.append_text,
76 api_name='/_respond_stream')
77 assert ans[0][-1][-1] == 'Hello world.'
78
79 def test_story(self):
80 from examples.story import ppl

Callers

nothing calls this directly

Calls 2

warp_into_webMethod · 0.95
startMethod · 0.45

Tested by

no test coverage detected