langroid 0.1.76__py3-none-any.whl → 0.1.77__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.
@@ -0,0 +1,25 @@
1
+ """
2
+ A tool to generate a message from the current pending message.
3
+ The idea is that when an LLM is generating text that is a deterministic transformation
4
+ of known text, then specifying the transformation can be much cheaper than actually
5
+ generating the transformation.
6
+ """
7
+
8
+ from langroid.agent.tool_message import ToolMessage
9
+
10
+ class GeneratorTool(ToolMessage):
11
+ request: str = "generate"
12
+ purpose: str = """
13
+ To generate a message where the parts within curly braces
14
+ are derived from previous previous messages in the conversation,
15
+ using
16
+ message are
17
+ obtained from a previous message numbered <n>,
18
+ using the <rules>.
19
+ """
20
+ rules: str
21
+
22
+
23
+ def handle(self) -> str:
24
+ pass
25
+
@@ -19,7 +19,7 @@ class OpenAIEmbeddingsConfig(EmbeddingModelsConfig):
19
19
  class SentenceTransformerEmbeddingsConfig(EmbeddingModelsConfig):
20
20
  model_type: str = "sentence-transformer"
21
21
  model_name: str = "BAAI/bge-large-en-v1.5"
22
- dims: int = 384
22
+ dims: int = 1024 # should correspond to the model's embedding dims
23
23
 
24
24
 
25
25
  class OpenAIEmbeddings(EmbeddingModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langroid
3
- Version: 0.1.76
3
+ Version: 0.1.77
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  License: MIT
6
6
  Author: Prasad Chalasani
@@ -143,6 +143,7 @@ for ideas on what to contribute.
143
143
  <summary> <b>:fire: Updates/Releases</b></summary>
144
144
 
145
145
  - **Sep 2023:**
146
+ - **0.1.76:** DocChatAgent: support for loading `docx` files (preliminary).
146
147
  - **0.1.72:** Many improvements to DocChatAgent: better embedding model,
147
148
  hybrid search to improve retrieval, better pdf parsing, re-ranking retrieved results with cross-encoders.
148
149
  - **Use with local LLama Models:** see tutorial [here](https://langroid.github.io/langroid/blog/2023/09/14/using-langroid-with-local-llms/)
@@ -241,12 +242,11 @@ Use `pip` to install `langroid` (from PyPi) to your virtual environment:
241
242
  pip install langroid
242
243
  ```
243
244
  The core Langroid package lets you use OpenAI Embeddings models via their API.
244
- If you instead want to use the `all-MiniLM-L6-v2` embeddings model
245
- from from HuggingFace, install Langroid like this:
245
+ If you instead want to use the `sentence-transformers` embedding models from HuggingFace,
246
+ install Langroid like this:
246
247
  ```bash
247
248
  pip install langroid[hf-embeddings]
248
249
  ```
249
- Note that this will install `torch` and `sentence-transformers` libraries.
250
250
 
251
251
  <details>
252
252
  <summary><b>Optional Installs for using SQL Chat with a PostgreSQL DB </b></summary>
@@ -20,6 +20,7 @@ langroid/agent/special/table_chat_agent.py,sha256=2nRGW25WDEbR-ukQjeV3mzsC0qk2gO
20
20
  langroid/agent/task.py,sha256=UqbjZP4hiG3yRrPWf-nqIyLtK8i0c3fWUEYKbcZ3n50,28275
21
21
  langroid/agent/tool_message.py,sha256=8I59BMkqfH_qpWazhv9_rpPjlaG826vVG5dyJGeOn3o,5936
22
22
  langroid/agent/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ langroid/agent/tools/generator_tool.py,sha256=LcLlucujJVGORGLHwIT3tsOzVE1wIhgiDLOcXeeylAI,775
23
24
  langroid/agent/tools/google_search_tool.py,sha256=64F9oMNdS237BBOitrvYXN4Il_ES_fNrHkh35tBEDfA,1160
24
25
  langroid/agent/tools/recipient_tool.py,sha256=-2QWXHhnbTkUsg-jNig6yKt8RnSQ1SLwR6KmBzvYhYk,10217
25
26
  langroid/agent_config.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -30,7 +31,7 @@ langroid/cachedb/redis_cachedb.py,sha256=xuQ96FAqcHTfK8PEt1tjrh1BkMWUjojFHIgjDfF
30
31
  langroid/embedding_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
32
  langroid/embedding_models/base.py,sha256=7QD9IlsiKNmDn8TAu92IVmSWHHlpZcMsSUlsQxUMUZE,1161
32
33
  langroid/embedding_models/clustering.py,sha256=tZWElUqXl9Etqla0FAa7og96iDKgjqWjucZR_Egtp-A,6684
33
- langroid/embedding_models/models.py,sha256=MWKXvSA3TbkSz6qL4-y1_2RkjLlECim7GxnEsID26_E,3093
34
+ langroid/embedding_models/models.py,sha256=0YJPWWqMk17R2WcQWRQEI3S51QergDRb-IWhGQVkPF4,3144
34
35
  langroid/language_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
36
  langroid/language_models/azure_openai.py,sha256=9NLr9s9l7JlCHSuMooxYLLgs1d04IwE_bO7r22bhrg8,3458
36
37
  langroid/language_models/base.py,sha256=zHCZIEmIk-sFMq7GWooZe8qq4GjaJ3YRhTzTC4irgGM,19931
@@ -84,7 +85,7 @@ langroid/vector_store/base.py,sha256=mw36zLzdQeG_c1KIWeRmycXnXIzFvqRW2RG7xf6jTGk
84
85
  langroid/vector_store/chromadb.py,sha256=2a68iLkgBGoGmuJ80ogJ0rRuoh-Wqdj3rlxVGagMxWk,5384
85
86
  langroid/vector_store/qdrant_cloud.py,sha256=3im4Mip0QXLkR6wiqVsjV1QvhSElfxdFSuDKddBDQ-4,188
86
87
  langroid/vector_store/qdrantdb.py,sha256=RxLCLaaampLS-Gi-ccYEydUjzI0qUJC9jEvc8g2OXEE,9857
87
- langroid-0.1.76.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
88
- langroid-0.1.76.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
89
- langroid-0.1.76.dist-info/METADATA,sha256=QPzgocvZ5PQSJYhAA0uVu3RFhw4jHioxlg_cRwVtS0o,36078
90
- langroid-0.1.76.dist-info/RECORD,,
88
+ langroid-0.1.77.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
89
+ langroid-0.1.77.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
90
+ langroid-0.1.77.dist-info/METADATA,sha256=Wh4Sg4QTZjSCK4pU_5S942dJAGZ1ci1dRUQYdxD7rBk,36083
91
+ langroid-0.1.77.dist-info/RECORD,,