langroid 0.2.11__py3-none-any.whl → 0.2.12__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.
@@ -66,6 +66,17 @@ Start by asking what I would like to know about the data.
66
66
 
67
67
  """
68
68
 
69
+ ADDRESSING_INSTRUCTION = """
70
+ IMPORTANT - Whenever you are NOT writing a SQL query, make sure you address the user
71
+ using {prefix}User. You MUST use the EXACT syntax {prefix} !!!
72
+
73
+ In other words, you ALWAYS write EITHER:
74
+ - a SQL query using the `run_query` tool,
75
+ - OR address the user using {prefix}User.
76
+
77
+ """
78
+
79
+
69
80
  SQL_ERROR_MSG = "There was an error in your SQL Query"
70
81
 
71
82
 
@@ -81,6 +92,7 @@ class SQLChatAgentConfig(ChatAgentConfig):
81
92
  context_descriptions: Dict[str, Dict[str, Union[str, Dict[str, str]]]] = {}
82
93
  use_schema_tools: bool = False
83
94
  multi_schema: bool = False
95
+ addressing_prefix: str = ""
84
96
 
85
97
  """
86
98
  Optional, but strongly recommended, context descriptions for tables, columns,
@@ -206,6 +218,10 @@ class SQLChatAgent(ChatAgent):
206
218
  """Initialize message tools used for chatting."""
207
219
  message = self._format_message()
208
220
  self.config.system_message = self.config.system_message.format(mode=message)
221
+ if self.config.addressing_prefix != "":
222
+ self.config.system_message += ADDRESSING_INSTRUCTION.format(
223
+ prefix=self.config.addressing_prefix
224
+ )
209
225
  super().__init__(self.config)
210
226
  self.enable_message(RunQueryTool)
211
227
  if self.config.use_schema_tools:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langroid
3
- Version: 0.2.11
3
+ Version: 0.2.12
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  License: MIT
6
6
  Author: Prasad Chalasani
@@ -25,7 +25,7 @@ langroid/agent/special/neo4j/utils/system_message.py,sha256=vRpz1P-OYLLiC6OGYYoK
25
25
  langroid/agent/special/relevance_extractor_agent.py,sha256=zIx8GUdVo1aGW6ASla0NPQjYYIpmriK_TYMijqAx3F8,4796
26
26
  langroid/agent/special/retriever_agent.py,sha256=lvMvf-u9rSosg4YASuFdUbGLgkzLPknXAbJZfZ1LZCc,1868
27
27
  langroid/agent/special/sql/__init__.py,sha256=mWfmm1QpXCezpFOS2eI57M0L_Ok3q5_ukG8tXBnBrEA,319
28
- langroid/agent/special/sql/sql_chat_agent.py,sha256=Now37yznNeiCE0ysC5W5BPG41xO69kxrHZWzLqs5dhQ,13903
28
+ langroid/agent/special/sql/sql_chat_agent.py,sha256=8ZCKjN8GE4I4_G_YkMoZExT6StOWcXZYD95DQ2yI1ro,14436
29
29
  langroid/agent/special/sql/utils/__init__.py,sha256=JFif6CRTrN-bc91uuAI4K9fe2ndIWSNMVxJ0WA68--M,446
30
30
  langroid/agent/special/sql/utils/description_extractors.py,sha256=cX8TIpmTPXZXQTMpIi3OUFwFsPywxFFdurpx717Kq0I,6529
31
31
  langroid/agent/special/sql/utils/populate_metadata.py,sha256=1J22UsyEPKzwK0XlJZtYn9r6kYc0FXIr8-lZrndYlhc,3131
@@ -129,8 +129,8 @@ langroid/vector_store/meilisearch.py,sha256=6frB7GFWeWmeKzRfLZIvzRjllniZ1cYj3Hmh
129
129
  langroid/vector_store/momento.py,sha256=QaPzUnTwlswoawGB-paLtUPyLRvckFXLfLDfvbTzjNQ,10505
130
130
  langroid/vector_store/qdrant_cloud.py,sha256=3im4Mip0QXLkR6wiqVsjV1QvhSElfxdFSuDKddBDQ-4,188
131
131
  langroid/vector_store/qdrantdb.py,sha256=wYOuu5c2vIKn9ZgvTXcAiZXMpV8AOXEWFAzI8S8UP-0,16828
132
- pyproject.toml,sha256=vTyG2w_C8LsUu7fM4JDVersSNQk-6JFAeInTQwy7UGk,6960
133
- langroid-0.2.11.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
134
- langroid-0.2.11.dist-info/METADATA,sha256=n1EWXILkYf18eA1H6czmL5fgmZ0-uUzd-6OXZaz1y9Y,54101
135
- langroid-0.2.11.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
136
- langroid-0.2.11.dist-info/RECORD,,
132
+ pyproject.toml,sha256=IQC1A8fpg0cKWje_Gt3YxZpRQw9ie1xlJ8TaiS4Vr3w,6960
133
+ langroid-0.2.12.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
134
+ langroid-0.2.12.dist-info/METADATA,sha256=66JdF6SmaH5yisjOpT6dgYsjXAG7FbnD8OaTAmVnV7I,54101
135
+ langroid-0.2.12.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
136
+ langroid-0.2.12.dist-info/RECORD,,
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langroid"
3
- version = "0.2.11"
3
+ version = "0.2.12"
4
4
  description = "Harness LLMs with Multi-Agent Programming"
5
5
  authors = ["Prasad Chalasani <pchalasani@gmail.com>"]
6
6
  readme = "README.md"