langroid 0.1.129__py3-none-any.whl → 0.1.131__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.
langroid/agent/task.py CHANGED
@@ -61,7 +61,7 @@ class Task:
61
61
  single_round: bool = False,
62
62
  system_message: str = "",
63
63
  user_message: str | None = "",
64
- restart: bool = False,
64
+ restart: bool = True,
65
65
  default_human_response: Optional[str] = None,
66
66
  interactive: bool = True,
67
67
  only_user_quits_root: bool = True,
@@ -227,10 +227,18 @@ class OpenAIGPT(LanguageModel):
227
227
 
228
228
  self.cache: MomentoCache | RedisCache
229
229
  if settings.cache_type == "momento":
230
- config.cache_config = MomentoCacheConfig()
230
+ if config.cache_config is None or isinstance(
231
+ config.cache_config, RedisCacheConfig
232
+ ):
233
+ # switch to fresh momento config if needed
234
+ config.cache_config = MomentoCacheConfig()
231
235
  self.cache = MomentoCache(config.cache_config)
232
236
  else:
233
- config.cache_config = RedisCacheConfig()
237
+ if config.cache_config is None or isinstance(
238
+ config.cache_config, MomentoCacheConfig
239
+ ):
240
+ # switch to fresh redis config if needed
241
+ config.cache_config = RedisCacheConfig()
234
242
  self.cache = RedisCache(config.cache_config)
235
243
 
236
244
  self.config._validate_litellm()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langroid
3
- Version: 0.1.129
3
+ Version: 0.1.131
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  License: MIT
6
6
  Author: Prasad Chalasani
@@ -137,6 +137,12 @@ into simplifying the developer experience; it does not use `Langchain`.
137
137
  We welcome contributions -- See the [contributions](./CONTRIBUTING.md) document
138
138
  for ideas on what to contribute.
139
139
 
140
+
141
+ Building LLM Applications? Prasad Chalasani is available for consulting
142
+ (advisory/development): pchalasani at gmail dot com.
143
+
144
+ Sponsorship is also accepted via [GitHub Sponsors](https://github.com/sponsors/langroid)
145
+
140
146
  **Questions, Feedback, Ideas? Join us on [Discord](https://discord.gg/ZU36McDgDs)!**
141
147
 
142
148
  # Quick glimpse of coding with Langroid
@@ -470,14 +476,13 @@ Please follow these steps to setup the container:
470
476
 
471
477
  ```bash
472
478
  # get the .env file template from `langroid` repo
473
- wget https://github.com/langroid/langroid/blob/main/.env-template .env
479
+ wget -O .env https://raw.githubusercontent.com/langroid/langroid/main/.env-template
474
480
 
475
- # Edit the .env file with your favorite editor (here nano),
476
- # and add API keys as explained above
481
+ # Edit the .env file with your favorite editor (here nano), and remove any un-used settings. E.g. there are "dummy" values like "your-redis-port" etc -- if you are not using them, you MUST remove them.
477
482
  nano .env
478
483
 
479
484
  # launch the container
480
- docker run -it -v ./.env:/.env langroid/langroid
485
+ docker run -it --rm -v ./.env:/langroid/.env langroid/langroid
481
486
 
482
487
  # Use this command to run any of the scripts in the `examples` directory
483
488
  python examples/<Path/To/Example.py>
@@ -902,20 +907,8 @@ If you like this project, please give it a star ⭐ and 📢 spread the word in
902
907
  [![Share on Hacker News](https://img.shields.io/badge/-Share%20on%20Hacker%20News-orange)](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fgithub.com%2Flangroid%2Flangroid&t=Harness%20LLMs%20with%20Multi-Agent%20Programming)
903
908
  [![Share on Reddit](https://img.shields.io/badge/-Share%20on%20Reddit-blue)](https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2Flangroid%2Flangroid&title=Harness%20LLMs%20with%20Multi-Agent%20Programming)
904
909
 
905
-
906
-
907
-
908
910
  Your support will help build Langroid's momentum and community.
909
911
 
910
- If you are looking to build LLM applications,
911
- Prasad Chalasani is available for consulting (advisory or development):
912
- pchalasani at gmail dot com.
913
-
914
-
915
- Sponsorship is also accepted via [GitHub Sponsors](https://github.com/sponsors/langroid)
916
-
917
-
918
-
919
912
  # Langroid Co-Founders
920
913
 
921
914
  - [Prasad Chalasani](https://www.linkedin.com/in/pchalasani/) (IIT BTech/CS, CMU PhD/ML; Independent ML Consultant)
@@ -20,7 +20,7 @@ langroid/agent/special/sql/utils/populate_metadata.py,sha256=zRjw31a1ZXvpx9bcmbt
20
20
  langroid/agent/special/sql/utils/system_message.py,sha256=qKLHkvQWRQodTtPLPxr1GSLUYUFASZU8x-ybV67cB68,1885
21
21
  langroid/agent/special/sql/utils/tools.py,sha256=6uB2424SLtmapui9ggcEr0ZTiB6_dL1-JRGgN8RK9Js,1332
22
22
  langroid/agent/special/table_chat_agent.py,sha256=zejrvv6GaspImVJ1oXWUTVN-h-kDjadTdBDkTRqrYKo,7691
23
- langroid/agent/task.py,sha256=rBMMUbFibGs4kMUlMksrE-D1ChYEsBNbKcB5t9Tr3xM,36261
23
+ langroid/agent/task.py,sha256=bllafGA9AbVaeL6qk1a-1Wa2sc6fsuzeNEyhKHav3K8,36260
24
24
  langroid/agent/tool_message.py,sha256=_QS9_JnBdMBmpQw-ocu3PdJz_UzkFCytVky0UdIcMe0,6320
25
25
  langroid/agent/tools/__init__.py,sha256=6le5y_iPEHwh7Tli_0MtwCGOjy3tPQfAdfDC7WBg2e0,172
26
26
  langroid/agent/tools/extract_tool.py,sha256=u5lL9rKBzaLBOrRyLnTAZ97pQ1uxyLP39XsWMnpaZpw,3789
@@ -42,7 +42,7 @@ langroid/language_models/azure_openai.py,sha256=_OOEoZOziI3NDOH_8t3qmh8IDWoHESQe
42
42
  langroid/language_models/base.py,sha256=_EOBLXU6Z3SK7wjWNS4G4rtw6aRJ5ycs9M-Sry-GX5k,20582
43
43
  langroid/language_models/config.py,sha256=PXcmEUq52GCDj2sekt8F9E1flWyyNjP2S0LTRs7T6Kg,269
44
44
  langroid/language_models/openai_assistants.py,sha256=9K-DEAL2aSWHeXj2hwCo2RAlK9_1oCPtqX2u1wISCj8,36
45
- langroid/language_models/openai_gpt.py,sha256=xLoaEG6vNCbCOfxfnT8lr-xwntQ9_D2gOaum6kL8h08,38899
45
+ langroid/language_models/openai_gpt.py,sha256=G0ZQZbajIvyRNo0JdinWp7KFapqOTWAlYsZDCdGz8Tw,39279
46
46
  langroid/language_models/prompt_formatter/__init__.py,sha256=wj2e6j7R9d3m63HCbSDY1vosjFuhHLQVlgBrq8iqF38,197
47
47
  langroid/language_models/prompt_formatter/base.py,sha256=2y_GcwhstvB5ih3haS7l5Fv79jVnFJ_vEw1jqWJzB9k,1247
48
48
  langroid/language_models/prompt_formatter/llama2_formatter.py,sha256=YdcO88qyBeuMENVIVvVqSYuEpvYSTndUe_jd6hVTko4,2899
@@ -96,7 +96,7 @@ langroid/vector_store/meilisearch.py,sha256=h4e1MZJ9J3EnFfcUhLshK1Duwy1dpHWH4Ajt
96
96
  langroid/vector_store/momento.py,sha256=otoUrpgwEduFOCUhbFFSZWKEzWF2di1d4-m3n5PIuHI,9964
97
97
  langroid/vector_store/qdrant_cloud.py,sha256=3im4Mip0QXLkR6wiqVsjV1QvhSElfxdFSuDKddBDQ-4,188
98
98
  langroid/vector_store/qdrantdb.py,sha256=ZEJnlNIJwWIySGhPz3jBc6spcLCPqOcUDBYBisLF90I,11379
99
- langroid-0.1.129.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
100
- langroid-0.1.129.dist-info/METADATA,sha256=0tUteJG7l241tEhRcALjqVeOdU9amqzc784pVP-N5HY,42352
101
- langroid-0.1.129.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
102
- langroid-0.1.129.dist-info/RECORD,,
99
+ langroid-0.1.131.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
100
+ langroid-0.1.131.dist-info/METADATA,sha256=UOhc24CgzKWl-BiuxUVO8HNOx56MhgcIoge9k0C4P24,42453
101
+ langroid-0.1.131.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
102
+ langroid-0.1.131.dist-info/RECORD,,