langroid 0.1.240__py3-none-any.whl → 0.1.241__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.
@@ -670,23 +670,26 @@ class OpenAIGPT(LanguageModel):
670
670
  sys.stdout.write(Colors().GREEN)
671
671
  sys.stdout.flush()
672
672
  has_function = False
673
- for event in response:
674
- (
675
- is_break,
676
- has_function,
677
- function_name,
678
- function_args,
679
- completion,
680
- ) = self._process_stream_event(
681
- event,
682
- chat=chat,
683
- has_function=has_function,
684
- completion=completion,
685
- function_args=function_args,
686
- function_name=function_name,
687
- )
688
- if is_break:
689
- break
673
+ try:
674
+ for event in response:
675
+ (
676
+ is_break,
677
+ has_function,
678
+ function_name,
679
+ function_args,
680
+ completion,
681
+ ) = self._process_stream_event(
682
+ event,
683
+ chat=chat,
684
+ has_function=has_function,
685
+ completion=completion,
686
+ function_args=function_args,
687
+ function_name=function_name,
688
+ )
689
+ if is_break:
690
+ break
691
+ except Exception:
692
+ pass
690
693
 
691
694
  print("")
692
695
  # TODO- get usage info in stream mode (?)
@@ -722,23 +725,26 @@ class OpenAIGPT(LanguageModel):
722
725
  sys.stdout.write(Colors().GREEN)
723
726
  sys.stdout.flush()
724
727
  has_function = False
725
- async for event in response:
726
- (
727
- is_break,
728
- has_function,
729
- function_name,
730
- function_args,
731
- completion,
732
- ) = self._process_stream_event(
733
- event,
734
- chat=chat,
735
- has_function=has_function,
736
- completion=completion,
737
- function_args=function_args,
738
- function_name=function_name,
739
- )
740
- if is_break:
741
- break
728
+ try:
729
+ async for event in response:
730
+ (
731
+ is_break,
732
+ has_function,
733
+ function_name,
734
+ function_args,
735
+ completion,
736
+ ) = self._process_stream_event(
737
+ event,
738
+ chat=chat,
739
+ has_function=has_function,
740
+ completion=completion,
741
+ function_args=function_args,
742
+ function_name=function_name,
743
+ )
744
+ if is_break:
745
+ break
746
+ except Exception:
747
+ pass
742
748
 
743
749
  print("")
744
750
  # TODO- get usage info in stream mode (?)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langroid
3
- Version: 0.1.240
3
+ Version: 0.1.241
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  License: MIT
6
6
  Author: Prasad Chalasani
@@ -36,6 +36,7 @@ Requires-Dist: fakeredis (>=2.12.1,<3.0.0)
36
36
  Requires-Dist: fire (>=0.5.0,<0.6.0)
37
37
  Requires-Dist: flake8 (>=6.0.0,<7.0.0)
38
38
  Requires-Dist: google-api-python-client (>=2.95.0,<3.0.0)
39
+ Requires-Dist: google-generativeai (>=0.5.2,<0.6.0)
39
40
  Requires-Dist: groq (>=0.5.0,<0.6.0)
40
41
  Requires-Dist: grpcio (>=1.62.1,<2.0.0)
41
42
  Requires-Dist: halo (>=0.0.31,<0.0.32)
@@ -63,7 +63,7 @@ langroid/language_models/azure_openai.py,sha256=ncRCbKooqLVOY-PWQUIo9C3yTuKEFbAw
63
63
  langroid/language_models/base.py,sha256=B6dX43ZR65mIvjD95W4RcfpT-WpmiuEcstR3eMrr56Y,21029
64
64
  langroid/language_models/config.py,sha256=5UF3DzO1a-Dfsc3vghE0XGq7g9t_xDsRCsuRiU4dgBg,366
65
65
  langroid/language_models/openai_assistants.py,sha256=9K-DEAL2aSWHeXj2hwCo2RAlK9_1oCPtqX2u1wISCj8,36
66
- langroid/language_models/openai_gpt.py,sha256=BOZt2lOFViN3ct-jvfELRKeUkUaBOGhGxO7F6JQNCNY,50257
66
+ langroid/language_models/openai_gpt.py,sha256=ueB9MJzxGBIjN_i22v2ZqoWo_twnQan_s4p0dzf4zzI,50505
67
67
  langroid/language_models/prompt_formatter/__init__.py,sha256=9JXFF22QNMmbQV1q4nrIeQVTtA3Tx8tEZABLtLBdFyc,352
68
68
  langroid/language_models/prompt_formatter/base.py,sha256=eDS1sgRNZVnoajwV_ZIha6cba5Dt8xjgzdRbPITwx3Q,1221
69
69
  langroid/language_models/prompt_formatter/hf_formatter.py,sha256=TFL6ppmeQWnzr6CKQzRZFYY810zE1mr8DZnhw6i85ok,5217
@@ -121,7 +121,7 @@ langroid/vector_store/meilisearch.py,sha256=d2huA9P-NoYRuAQ9ZeXJmMKr7ry8u90RUSR2
121
121
  langroid/vector_store/momento.py,sha256=9cui31TTrILid2KIzUpBkN2Ey3g_CZWOQVdaFsA4Ors,10045
122
122
  langroid/vector_store/qdrant_cloud.py,sha256=3im4Mip0QXLkR6wiqVsjV1QvhSElfxdFSuDKddBDQ-4,188
123
123
  langroid/vector_store/qdrantdb.py,sha256=sk5Qb2ZNbooi0rorsMuqIMokF7WADw6PJ0D6goM2XBw,16802
124
- langroid-0.1.240.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
125
- langroid-0.1.240.dist-info/METADATA,sha256=TtWgv6ZQ_YhwWV3shb2zLkU_mC3jKVMud6VCFC8hztw,49111
126
- langroid-0.1.240.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
127
- langroid-0.1.240.dist-info/RECORD,,
124
+ langroid-0.1.241.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
125
+ langroid-0.1.241.dist-info/METADATA,sha256=3-gQbFV94rqEec_esydP028p-Ol3w2J9mbrcupeq0Xg,49163
126
+ langroid-0.1.241.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
127
+ langroid-0.1.241.dist-info/RECORD,,