langroid 0.1.130__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.
@@ -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.130
3
+ Version: 0.1.131
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  License: MIT
6
6
  Author: Prasad Chalasani
@@ -476,14 +476,13 @@ Please follow these steps to setup the container:
476
476
 
477
477
  ```bash
478
478
  # get the .env file template from `langroid` repo
479
- wget https://github.com/langroid/langroid/blob/main/.env-template .env
479
+ wget -O .env https://raw.githubusercontent.com/langroid/langroid/main/.env-template
480
480
 
481
- # Edit the .env file with your favorite editor (here nano),
482
- # 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.
483
482
  nano .env
484
483
 
485
484
  # launch the container
486
- docker run -it -v ./.env:/.env langroid/langroid
485
+ docker run -it --rm -v ./.env:/langroid/.env langroid/langroid
487
486
 
488
487
  # Use this command to run any of the scripts in the `examples` directory
489
488
  python examples/<Path/To/Example.py>
@@ -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.130.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
100
- langroid-0.1.130.dist-info/METADATA,sha256=RN5edXTTDbJHRjAcEFrUjC57TG5ysl_YnDe_8J7o32c,42323
101
- langroid-0.1.130.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
102
- langroid-0.1.130.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,,