pycoze 0.1.294__py3-none-any.whl → 0.1.295__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pycoze/ai/llm/chat.py CHANGED
@@ -184,8 +184,26 @@ The output should be a complete and usable {language} code snippet, including th
184
184
 
185
185
 
186
186
  if __name__ == "__main__":
187
- print(chat([{"role": "user", "content": "你好"}]))
188
- for chunk in chat_stream([{"role": "user", "content": "你好"}]):
189
- print(chunk)
190
- print(extract({"name": "lowercase"}, "hello XiaoMing"))
191
- print(extract_code("sum 1~100"))
187
+
188
+ def main():
189
+ print(chat([{"role": "user", "content": "你好"}]))
190
+ for chunk in chat_stream([{"role": "user", "content": "你好"}]):
191
+ print(chunk)
192
+ print(extract({"name": "lowercase"}, "hello XiaoMing"))
193
+ print(extract_code("sum 1~100"))
194
+
195
+ async def async_main():
196
+ messages = [{"role": "user", "content": "Hello, how are you?"}]
197
+
198
+ # Using chat_async
199
+ response = await chat_async(messages)
200
+ print(response)
201
+
202
+ # Using chat_stream_async
203
+ async for chunk in chat_stream_async(messages):
204
+ print(chunk, end="")
205
+
206
+ import asyncio
207
+
208
+ main()
209
+ asyncio.run(async_main())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycoze
3
- Version: 0.1.294
3
+ Version: 0.1.295
4
4
  Summary: Package for pycoze only!
5
5
  Home-page: UNKNOWN
6
6
  Author: Yuan Jie Xiong
@@ -2,7 +2,7 @@ pycoze/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  pycoze/ai/__init__.py,sha256=amfVImcuiRRnGbmOjIqjXKiuH1H3zZPHOrJue2dEB8U,355
3
3
  pycoze/ai/vram_reserve.py,sha256=DRxKzqf89fLAts0DzU8e19z9kecIF8OdMkQnJlCKZV0,4244
4
4
  pycoze/ai/llm/__init__.py,sha256=5_AnOrzXI2V6ZZsLUWW1v5ATRWmJy53JLN9jfSZQXCg,249
5
- pycoze/ai/llm/chat.py,sha256=s3DvixWuInAXvHXDAlCL9lg2C_o2dj-BvoO8f-qXHp8,5951
5
+ pycoze/ai/llm/chat.py,sha256=sQZT0ImvRW81fXdlKG0ZrHdDB8g5M4iudaWdG4Kpd6Q,6373
6
6
  pycoze/ai/llm/text_to_image_prompt.py,sha256=0bx2C_YRvjAo7iphHGp1-pmGKsKqwur7dM0t3SiA8kA,3398
7
7
  pycoze/ai/llm/think.py,sha256=sUgTBdGzcZtL3r-Wx8M3lDuVUmDVz8g3qC0VU8uiKAI,5143
8
8
  pycoze/api/__init__.py,sha256=GGRRRPop0ZxdXe5JRhg2XvHITGIWfNcHA25opJZ0f1w,313
@@ -35,8 +35,8 @@ pycoze/utils/arg.py,sha256=jop1tBfe5hYkHW1NSpCeaZBEznkgguBscj_7M2dWfrs,503
35
35
  pycoze/utils/env.py,sha256=5pWlXfM1F5ZU9hhv1rHlDEanjEW5wf0nbyez9bNRqqA,559
36
36
  pycoze/utils/socket.py,sha256=bZbFFRH4mfThzRqt55BAAGQ6eICx_ja4x8UGGrUdAm8,2428
37
37
  pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
38
- pycoze-0.1.294.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
39
- pycoze-0.1.294.dist-info/METADATA,sha256=f9DZP6A0W-6w46Me-UupfpaHE3ffQUh_Ge3TSB2G80o,755
40
- pycoze-0.1.294.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
41
- pycoze-0.1.294.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
42
- pycoze-0.1.294.dist-info/RECORD,,
38
+ pycoze-0.1.295.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
39
+ pycoze-0.1.295.dist-info/METADATA,sha256=r1Q0l4o1E3YGIIMzX0Z6Np2beRkIULEr_8a68TY08RI,755
40
+ pycoze-0.1.295.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
41
+ pycoze-0.1.295.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
42
+ pycoze-0.1.295.dist-info/RECORD,,