langroid 0.2.10__tar.gz → 0.2.12__tar.gz
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-0.2.10 → langroid-0.2.12}/PKG-INFO +3 -3
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/sql_chat_agent.py +16 -0
- {langroid-0.2.10 → langroid-0.2.12}/pyproject.toml +3 -3
- {langroid-0.2.10 → langroid-0.2.12}/LICENSE +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/README.md +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/base.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/batch.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/callbacks/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/callbacks/chainlit.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/chat_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/chat_document.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/helpers.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/junk +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/openai_assistant.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/doc_chat_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/lance_doc_chat_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/lance_rag/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/lance_rag/critic_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/lance_rag/lance_rag_task.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/lance_rag/query_planner_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/lance_tools.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/neo4j/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/neo4j/csv_kg_chat.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/neo4j/utils/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/neo4j/utils/system_message.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/relevance_extractor_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/retriever_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/utils/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/utils/description_extractors.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/utils/populate_metadata.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/utils/system_message.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/utils/tools.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/table_chat_agent.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/task.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tool_message.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/duckduckgo_search_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/extract_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/generator_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/google_search_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/metaphor_search_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/note_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/recipient_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/retrieval_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/rewind_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/run_python_code.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent/tools/segment_extract_tool.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/agent_config.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/cachedb/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/cachedb/base.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/cachedb/momento_cachedb.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/cachedb/redis_cachedb.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/base.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/clustering.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/models.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/protoc/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/protoc/embeddings.proto +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/protoc/embeddings_pb2.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/embedding_models/remote_embeds.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/exceptions.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/azure_openai.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/base.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/config.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/mock_lm.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/openai_gpt.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/prompt_formatter/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/prompt_formatter/base.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/prompt_formatter/hf_formatter.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/prompt_formatter/llama2_formatter.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/utils.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/mytypes.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/agent_chats.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/code-parsing.md +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/code_parser.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/config.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/document_parser.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/image_text.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/para_sentence_split.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/parse_json.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/parser.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/repo_loader.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/routing.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/search.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/spider.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/table_loader.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/url_loader.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/url_loader_cookies.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/urls.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/utils.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/parsing/web_search.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/prompts/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/prompts/chat-gpt4-system-prompt.md +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/prompts/dialog.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/prompts/prompts_config.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/prompts/templates.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/pydantic_v1/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/pydantic_v1/main.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/algorithms/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/algorithms/graph.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/configuration.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/constants.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/docker.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/globals.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/llms/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/llms/strings.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/logging.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/object_registry.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/output/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/output/citations.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/output/printing.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/output/status.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/pandas_utils.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/pydantic_utils.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/system.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/web/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/utils/web/login.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/__init__.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/base.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/chromadb.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/lancedb.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/meilisearch.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/momento.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/qdrant_cloud.py +0 -0
- {langroid-0.2.10 → langroid-0.2.12}/langroid/vector_store/qdrantdb.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: langroid
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.12
|
4
4
|
Summary: Harness LLMs with Multi-Agent Programming
|
5
5
|
License: MIT
|
6
6
|
Author: Prasad Chalasani
|
@@ -89,12 +89,12 @@ Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
89
89
|
Requires-Dist: requests-oauthlib (>=1.3.1,<2.0.0)
|
90
90
|
Requires-Dist: rich (>=13.3.4,<14.0.0)
|
91
91
|
Requires-Dist: scrapy (>=2.11.0,<3.0.0) ; extra == "scrapy"
|
92
|
-
Requires-Dist: sentence-transformers (
|
92
|
+
Requires-Dist: sentence-transformers (>=2.2.2,<3.0.0) ; extra == "hf-transformers" or extra == "all" or extra == "hf-embeddings"
|
93
93
|
Requires-Dist: sqlalchemy (>=2.0.19,<3.0.0) ; extra == "db" or extra == "all" or extra == "sql"
|
94
94
|
Requires-Dist: tantivy (>=0.21.0,<0.22.0) ; extra == "vecdbs" or extra == "lancedb"
|
95
95
|
Requires-Dist: thefuzz (>=0.20.0,<0.21.0)
|
96
96
|
Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
|
97
|
-
Requires-Dist: torch (
|
97
|
+
Requires-Dist: torch (>=2.0.0,<3.0.0) ; extra == "hf-transformers" or extra == "all" or extra == "hf-embeddings" or extra == "transformers"
|
98
98
|
Requires-Dist: trafilatura (>=1.5.0,<2.0.0)
|
99
99
|
Requires-Dist: transformers (>=4.40.1,<5.0.0) ; extra == "hf-transformers" or extra == "all" or extra == "transformers"
|
100
100
|
Requires-Dist: typer (>=0.9.0,<0.10.0)
|
@@ -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
|
[tool.poetry]
|
2
2
|
name = "langroid"
|
3
|
-
version = "0.2.
|
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"
|
@@ -16,8 +16,8 @@ python = "^3.10"
|
|
16
16
|
chromadb = {version=">=0.4.21, <=0.4.23", optional=true}
|
17
17
|
momento = {version="^1.10.2", optional=true}
|
18
18
|
unstructured = {extras = ["docx", "pptx", "pdf"], version = ">=0.10.16,<0.10.18", optional=true}
|
19
|
-
sentence-transformers = {version="2.2.2", optional=true}
|
20
|
-
torch = {version="2.0.0", optional=true}
|
19
|
+
sentence-transformers = {version="^2.2.2", optional=true}
|
20
|
+
torch = {version="^2.0.0", optional=true}
|
21
21
|
psycopg2 = {version="^2.9.7", optional=true}
|
22
22
|
pymysql = {version = "^1.1.0", optional = true}
|
23
23
|
meilisearch-python-sdk = {version="^2.2.3", optional=true}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langroid-0.2.10 → langroid-0.2.12}/langroid/agent/special/sql/utils/description_extractors.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/prompt_formatter/hf_formatter.py
RENAMED
File without changes
|
{langroid-0.2.10 → langroid-0.2.12}/langroid/language_models/prompt_formatter/llama2_formatter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|