MCPcopy
hub / github.com/tinygrad/tinygrad / test_content_is_streamed

Method test_content_is_streamed

test/null/test_llm_server.py:101–113  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99 self.assertEqual(chunks[-1].choices[0].finish_reason, "stop")
100
101 def test_content_is_streamed(self):
102 stream = self.client.chat.completions.create(
103 model="test",
104 messages=[{"role": "user", "content": "Hello"}],
105 stream=True
106 )
107
108 contents = []
109 for chunk in stream:
110 if chunk.choices and chunk.choices[0].delta.content:
111 contents.append(chunk.choices[0].delta.content)
112
113 self.assertGreater(len(contents), 0)
114
115 def test_non_streaming(self):
116 resp = self.client.chat.completions.create(

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected