langroid 0.1.256__tar.gz → 0.1.258__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.1.256 → langroid-0.1.258}/PKG-INFO +46 -40
- {langroid-0.1.256 → langroid-0.1.258}/README.md +19 -6
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/base.py +1 -1
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/chat_agent.py +2 -2
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/task.py +10 -6
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tool_message.py +25 -9
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/segment_extract_tool.py +6 -1
- {langroid-0.1.256 → langroid-0.1.258}/pyproject.toml +32 -17
- {langroid-0.1.256 → langroid-0.1.258}/LICENSE +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/batch.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/callbacks/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/callbacks/chainlit.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/chat_document.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/helpers.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/junk +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/openai_assistant.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/doc_chat_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/lance_doc_chat_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/lance_rag/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/lance_rag/critic_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/lance_rag/lance_rag_task.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/lance_rag/query_planner_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/lance_tools.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/neo4j/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/neo4j/csv_kg_chat.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/neo4j/utils/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/neo4j/utils/system_message.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/relevance_extractor_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/retriever_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/sql/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/sql/sql_chat_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/sql/utils/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/sql/utils/description_extractors.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/sql/utils/populate_metadata.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/sql/utils/system_message.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/sql/utils/tools.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/special/table_chat_agent.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/duckduckgo_search_tool.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/extract_tool.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/generator_tool.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/google_search_tool.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/metaphor_search_tool.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/recipient_tool.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/retrieval_tool.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent/tools/run_python_code.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/agent_config.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/cachedb/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/cachedb/base.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/cachedb/momento_cachedb.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/cachedb/redis_cachedb.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/base.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/clustering.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/models.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/protoc/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/protoc/embeddings.proto +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/protoc/embeddings_pb2.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/remote_embeds.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/exceptions.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/azure_openai.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/base.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/config.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/openai_assistants.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/openai_gpt.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/prompt_formatter/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/prompt_formatter/base.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/prompt_formatter/hf_formatter.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/prompt_formatter/llama2_formatter.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/utils.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/mytypes.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/agent_chats.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/code-parsing.md +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/code_parser.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/config.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/document_parser.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/image_text.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/para_sentence_split.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/parse_json.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/parser.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/parser.pyi +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/repo_loader.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/routing.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/search.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/spider.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/table_loader.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/url_loader.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/url_loader_cookies.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/urls.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/utils.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/parsing/web_search.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/prompts/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/prompts/chat-gpt4-system-prompt.md +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/prompts/dialog.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/prompts/prompts_config.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/prompts/templates.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/prompts/transforms.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/algorithms/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/algorithms/graph.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/configuration.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/constants.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/docker.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/globals.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/llms/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/llms/strings.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/logging.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/output/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/output/citations.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/output/printing.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/output/status.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/pandas_utils.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/pydantic_utils.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/system.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/web/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/utils/web/login.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/__init__.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/base.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/chromadb.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/lancedb.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/meilisearch.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/momento.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/qdrant_cloud.py +0 -0
- {langroid-0.1.256 → langroid-0.1.258}/langroid/vector_store/qdrantdb.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: langroid
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.258
|
4
4
|
Summary: Harness LLMs with Multi-Agent Programming
|
5
5
|
License: MIT
|
6
6
|
Author: Prasad Chalasani
|
@@ -10,13 +10,14 @@ Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
|
+
Provides-Extra: all
|
13
14
|
Provides-Extra: chainlit
|
14
15
|
Provides-Extra: chromadb
|
15
16
|
Provides-Extra: db
|
16
17
|
Provides-Extra: doc-chat
|
17
18
|
Provides-Extra: docx
|
18
|
-
Provides-Extra: embeddings
|
19
19
|
Provides-Extra: hf-embeddings
|
20
|
+
Provides-Extra: hf-transformers
|
20
21
|
Provides-Extra: lancedb
|
21
22
|
Provides-Extra: litellm
|
22
23
|
Provides-Extra: meilisearch
|
@@ -31,11 +32,12 @@ Provides-Extra: scrapy
|
|
31
32
|
Provides-Extra: sql
|
32
33
|
Provides-Extra: transformers
|
33
34
|
Provides-Extra: unstructured
|
35
|
+
Provides-Extra: vecdbs
|
34
36
|
Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
|
35
37
|
Requires-Dist: async-generator (>=1.10,<2.0)
|
36
38
|
Requires-Dist: bs4 (>=0.0.1,<0.0.2)
|
37
|
-
Requires-Dist: chainlit (>=1.0.400,<2.0.0) ; extra == "chainlit"
|
38
|
-
Requires-Dist: chromadb (>=0.4.21,<=0.4.23) ; extra == "chromadb"
|
39
|
+
Requires-Dist: chainlit (>=1.0.400,<2.0.0) ; extra == "all" or extra == "chainlit"
|
40
|
+
Requires-Dist: chromadb (>=0.4.21,<=0.4.23) ; extra == "vecdbs" or extra == "all" or extra == "chromadb"
|
39
41
|
Requires-Dist: colorlog (>=6.7.0,<7.0.0)
|
40
42
|
Requires-Dist: docstring-parser (>=0.15,<0.16)
|
41
43
|
Requires-Dist: duckduckgo-search (>=6.0.0,<7.0.0)
|
@@ -47,47 +49,38 @@ Requires-Dist: google-generativeai (>=0.5.2,<0.6.0)
|
|
47
49
|
Requires-Dist: groq (>=0.5.0,<0.6.0)
|
48
50
|
Requires-Dist: grpcio (>=1.62.1,<2.0.0)
|
49
51
|
Requires-Dist: halo (>=0.0.31,<0.0.32)
|
50
|
-
Requires-Dist: huggingface-hub (>=0.21.2,<0.22.0) ; extra == "
|
52
|
+
Requires-Dist: huggingface-hub (>=0.21.2,<0.22.0) ; extra == "hf-transformers" or extra == "all" or extra == "transformers"
|
51
53
|
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
|
52
|
-
Requires-Dist: lancedb (>=0.6.2,<0.7.0) ; extra == "lancedb"
|
53
|
-
Requires-Dist: litellm (>=1.30.1,<2.0.0) ; extra == "litellm"
|
54
|
+
Requires-Dist: lancedb (>=0.6.2,<0.7.0) ; extra == "vecdbs" or extra == "all" or extra == "lancedb"
|
55
|
+
Requires-Dist: litellm (>=1.30.1,<2.0.0) ; extra == "all" or extra == "litellm"
|
54
56
|
Requires-Dist: lxml (>=4.9.3,<5.0.0)
|
55
57
|
Requires-Dist: meilisearch (>=0.28.3,<0.29.0) ; extra == "meilisearch"
|
56
58
|
Requires-Dist: meilisearch-python-sdk (>=2.2.3,<3.0.0) ; extra == "meilisearch"
|
57
|
-
Requires-Dist: metaphor-python (>=0.1.23,<0.2.0) ; extra == "metaphor"
|
58
|
-
Requires-Dist: mkdocs (>=1.4.2,<2.0.0) ; extra == "mkdocs"
|
59
|
-
Requires-Dist: mkdocs-awesome-pages-plugin (>=2.8.0,<3.0.0) ; extra == "mkdocs"
|
60
|
-
Requires-Dist: mkdocs-gen-files (>=0.4.0,<0.5.0) ; extra == "mkdocs"
|
61
|
-
Requires-Dist: mkdocs-jupyter (>=0.24.1,<0.25.0) ; extra == "mkdocs"
|
62
|
-
Requires-Dist: mkdocs-literate-nav (>=0.6.0,<0.7.0) ; extra == "mkdocs"
|
63
|
-
Requires-Dist: mkdocs-material (>=9.1.5,<10.0.0) ; extra == "mkdocs"
|
64
|
-
Requires-Dist: mkdocs-rss-plugin (>=1.8.0,<2.0.0) ; extra == "mkdocs"
|
65
|
-
Requires-Dist: mkdocs-section-index (>=0.3.5,<0.4.0) ; extra == "mkdocs"
|
66
|
-
Requires-Dist: mkdocstrings[python] (>=0.21.2,<0.22.0) ; extra == "mkdocs"
|
59
|
+
Requires-Dist: metaphor-python (>=0.1.23,<0.2.0) ; extra == "all" or extra == "metaphor"
|
67
60
|
Requires-Dist: momento (>=1.10.2,<2.0.0) ; extra == "momento"
|
68
|
-
Requires-Dist: neo4j (>=5.14.1,<6.0.0) ; extra == "neo4j"
|
61
|
+
Requires-Dist: neo4j (>=5.14.1,<6.0.0) ; extra == "all" or extra == "neo4j"
|
69
62
|
Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
|
70
63
|
Requires-Dist: nltk (>=3.8.1,<4.0.0)
|
71
64
|
Requires-Dist: onnxruntime (>=1.16.1,<2.0.0)
|
72
65
|
Requires-Dist: openai (>=1.14.0,<2.0.0)
|
73
66
|
Requires-Dist: pandas (>=2.0.3,<3.0.0)
|
74
|
-
Requires-Dist: pdf2image (>=1.17.0,<2.0.0) ; extra == "doc-chat" or extra == "pdf-parsers"
|
75
|
-
Requires-Dist: pdfplumber (>=0.10.2,<0.11.0) ; extra == "doc-chat" or extra == "pdf-parsers"
|
67
|
+
Requires-Dist: pdf2image (>=1.17.0,<2.0.0) ; extra == "doc-chat" or extra == "all" or extra == "pdf-parsers"
|
68
|
+
Requires-Dist: pdfplumber (>=0.10.2,<0.11.0) ; extra == "doc-chat" or extra == "all" or extra == "pdf-parsers"
|
76
69
|
Requires-Dist: prettytable (>=3.8.0,<4.0.0)
|
77
|
-
Requires-Dist: psycopg2 (>=2.9.7,<3.0.0) ; extra == "db" or extra == "postgres" or extra == "sql"
|
78
|
-
Requires-Dist: pyarrow (==15.0.0) ; extra == "lancedb"
|
70
|
+
Requires-Dist: psycopg2 (>=2.9.7,<3.0.0) ; extra == "db" or extra == "all" or extra == "postgres" or extra == "sql"
|
71
|
+
Requires-Dist: pyarrow (==15.0.0) ; extra == "vecdbs" or extra == "all" or extra == "lancedb"
|
79
72
|
Requires-Dist: pydantic (==1.10.13)
|
80
73
|
Requires-Dist: pygithub (>=1.58.1,<2.0.0)
|
81
74
|
Requires-Dist: pygments (>=2.15.1,<3.0.0)
|
82
|
-
Requires-Dist: pymupdf (>=1.23.3,<2.0.0) ; extra == "doc-chat" or extra == "pdf-parsers"
|
83
|
-
Requires-Dist: pymysql (>=1.1.0,<2.0.0) ; extra == "db" or extra == "mysql" or extra == "sql"
|
75
|
+
Requires-Dist: pymupdf (>=1.23.3,<2.0.0) ; extra == "doc-chat" or extra == "all" or extra == "pdf-parsers"
|
76
|
+
Requires-Dist: pymysql (>=1.1.0,<2.0.0) ; extra == "db" or extra == "all" or extra == "mysql" or extra == "sql"
|
84
77
|
Requires-Dist: pyparsing (>=3.0.9,<4.0.0)
|
85
|
-
Requires-Dist: pypdf (>=3.12.2,<4.0.0) ; extra == "doc-chat" or extra == "pdf-parsers"
|
86
|
-
Requires-Dist: pytesseract (>=0.3.10,<0.4.0) ; extra == "doc-chat" or extra == "pdf-parsers"
|
87
|
-
Requires-Dist: python-docx (>=1.1.0,<2.0.0) ; extra == "doc-chat" or extra == "docx"
|
78
|
+
Requires-Dist: pypdf (>=3.12.2,<4.0.0) ; extra == "doc-chat" or extra == "all" or extra == "pdf-parsers"
|
79
|
+
Requires-Dist: pytesseract (>=0.3.10,<0.4.0) ; extra == "doc-chat" or extra == "all" or extra == "pdf-parsers"
|
80
|
+
Requires-Dist: python-docx (>=1.1.0,<2.0.0) ; extra == "doc-chat" or extra == "all" or extra == "docx"
|
88
81
|
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
89
82
|
Requires-Dist: python-magic (>=0.4.27,<0.5.0)
|
90
|
-
Requires-Dist: python-socketio (>=5.11.0,<6.0.0) ; extra == "chainlit"
|
83
|
+
Requires-Dist: python-socketio (>=5.11.0,<6.0.0) ; extra == "all" or extra == "chainlit"
|
91
84
|
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
92
85
|
Requires-Dist: qdrant-client (>=1.8.0,<2.0.0)
|
93
86
|
Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0)
|
@@ -96,16 +89,16 @@ Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
96
89
|
Requires-Dist: requests-oauthlib (>=1.3.1,<2.0.0)
|
97
90
|
Requires-Dist: rich (>=13.3.4,<14.0.0)
|
98
91
|
Requires-Dist: scrapy (>=2.11.0,<3.0.0) ; extra == "scrapy"
|
99
|
-
Requires-Dist: sentence-transformers (==2.2.2) ; extra == "
|
100
|
-
Requires-Dist: sqlalchemy (>=2.0.19,<3.0.0) ; extra == "db" or extra == "sql"
|
101
|
-
Requires-Dist: tantivy (>=0.21.0,<0.22.0) ; extra == "lancedb"
|
92
|
+
Requires-Dist: sentence-transformers (==2.2.2) ; extra == "hf-transformers" or extra == "all" or extra == "hf-embeddings"
|
93
|
+
Requires-Dist: sqlalchemy (>=2.0.19,<3.0.0) ; extra == "db" or extra == "all" or extra == "sql"
|
94
|
+
Requires-Dist: tantivy (>=0.21.0,<0.22.0) ; extra == "vecdbs" or extra == "all" or extra == "lancedb"
|
102
95
|
Requires-Dist: thefuzz (>=0.20.0,<0.21.0)
|
103
96
|
Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
|
104
|
-
Requires-Dist: torch (==2.0.0) ; extra == "
|
97
|
+
Requires-Dist: torch (==2.0.0) ; extra == "hf-transformers" or extra == "all" or extra == "hf-embeddings" or extra == "transformers"
|
105
98
|
Requires-Dist: trafilatura (>=1.5.0,<2.0.0)
|
106
|
-
Requires-Dist: transformers (>=4.40.1,<5.0.0) ; extra == "
|
99
|
+
Requires-Dist: transformers (>=4.40.1,<5.0.0) ; extra == "hf-transformers" or extra == "all" or extra == "transformers"
|
107
100
|
Requires-Dist: typer (>=0.9.0,<0.10.0)
|
108
|
-
Requires-Dist: unstructured[docx,pdf,pptx] (>=0.10.16,<0.10.18) ; extra == "doc-chat" or extra == "unstructured"
|
101
|
+
Requires-Dist: unstructured[docx,pdf,pptx] (>=0.10.16,<0.10.18) ; extra == "doc-chat" or extra == "all" or extra == "unstructured"
|
109
102
|
Requires-Dist: wget (>=3.2,<4.0)
|
110
103
|
Description-Content-Type: text/markdown
|
111
104
|
|
@@ -234,12 +227,22 @@ teacher_task.run()
|
|
234
227
|
<summary> <b>Click to expand</b></summary>
|
235
228
|
|
236
229
|
- **May 2024:**
|
230
|
+
- **Slimmer langroid**: All document-parsers (i.e. pdf, doc, docx) and most
|
231
|
+
vector-databases (except qdrant)
|
232
|
+
are now optional/extra dependencies, which helps reduce build size, script
|
233
|
+
start-up time, and install time. For convenience various grouping of "extras" are
|
234
|
+
provided, e.g. `doc-chat`, `db` (for database-related dependencies). See updated
|
235
|
+
install instructions below and in the docs.
|
236
|
+
- **Few-shot examples** for tools: when defining a [ToolMessage](https://langroid.github.io/langroid/quick-start/chat-agent-tool/#example-find-the-smallest-number-in-a-list), previously you were able to include a classmethod named `examples`,
|
237
|
+
and a random example from this list would be used to generate a 1-shot example
|
238
|
+
for the LLM. This has been improved so you can now supply a list of examples
|
239
|
+
where each example is either a tool instance, or a tuple of (description,
|
240
|
+
tool instance), where the description is a "thought" that leads the LLM to use
|
241
|
+
the tool (see example in the [docs](https://langroid.github.io/langroid/quick-start/chat-agent-tool/#example-find-the-smallest-number-in-a-list)). In some scenarios this can improve LLM tool
|
242
|
+
generation accuracy. Also, now instead of a random example, ALL examples are used to generate few-shot
|
243
|
+
examples.
|
237
244
|
- [Infinite loop detection](https://github.com/langroid/langroid/blob/0ed30eb467b00d5eaf2933b577a4b2cc37de1aa1/langroid/agent/task.py#L1121) for task loops of cycle-length <= 10 (configurable
|
238
|
-
in [`TaskConfig`](https://github.
|
239
|
-
com/langroid/langroid/blob/0ed30eb467b00d5eaf2933b577a4b2cc37de1aa1/langroid/agent
|
240
|
-
/task.py#L61). Only detects _exact_ loops, rather than
|
241
|
-
_approximate_ loops where the entities are saying essentially similar (but not
|
242
|
-
exactly the same) things repeatedly.
|
245
|
+
in [`TaskConfig`](https://langroid.github.io/langroid/reference/agent/task/#langroid.agent.task.TaskConfig). Only detects _exact_ loops, rather than _approximate_ loops where the entities are saying essentially similar (but not exactly the same) things repeatedly.
|
243
246
|
- "@"-addressing: any entity can address any other by name, which can be the name
|
244
247
|
of an agent's responder ("llm", "user", "agent") or a sub-task name. This is a
|
245
248
|
simpler alternative to the `RecipientTool` mechanism, with the tradeoff that
|
@@ -489,7 +492,10 @@ For many practical scenarios, you may need additional optional dependencies:
|
|
489
492
|
```bash
|
490
493
|
pip install "langroid[doc-chat,db]"
|
491
494
|
```
|
492
|
-
|
495
|
+
- To simply install _all_ optional dependencies, use the `all` extra (but note that this will result in longer load/startup times and a larger install size):
|
496
|
+
```bash
|
497
|
+
pip install "langroid[all]"
|
498
|
+
```
|
493
499
|
<details>
|
494
500
|
<summary><b>Optional Installs for using SQL Chat with a PostgreSQL DB </b></summary>
|
495
501
|
|
@@ -123,12 +123,22 @@ teacher_task.run()
|
|
123
123
|
<summary> <b>Click to expand</b></summary>
|
124
124
|
|
125
125
|
- **May 2024:**
|
126
|
+
- **Slimmer langroid**: All document-parsers (i.e. pdf, doc, docx) and most
|
127
|
+
vector-databases (except qdrant)
|
128
|
+
are now optional/extra dependencies, which helps reduce build size, script
|
129
|
+
start-up time, and install time. For convenience various grouping of "extras" are
|
130
|
+
provided, e.g. `doc-chat`, `db` (for database-related dependencies). See updated
|
131
|
+
install instructions below and in the docs.
|
132
|
+
- **Few-shot examples** for tools: when defining a [ToolMessage](https://langroid.github.io/langroid/quick-start/chat-agent-tool/#example-find-the-smallest-number-in-a-list), previously you were able to include a classmethod named `examples`,
|
133
|
+
and a random example from this list would be used to generate a 1-shot example
|
134
|
+
for the LLM. This has been improved so you can now supply a list of examples
|
135
|
+
where each example is either a tool instance, or a tuple of (description,
|
136
|
+
tool instance), where the description is a "thought" that leads the LLM to use
|
137
|
+
the tool (see example in the [docs](https://langroid.github.io/langroid/quick-start/chat-agent-tool/#example-find-the-smallest-number-in-a-list)). In some scenarios this can improve LLM tool
|
138
|
+
generation accuracy. Also, now instead of a random example, ALL examples are used to generate few-shot
|
139
|
+
examples.
|
126
140
|
- [Infinite loop detection](https://github.com/langroid/langroid/blob/0ed30eb467b00d5eaf2933b577a4b2cc37de1aa1/langroid/agent/task.py#L1121) for task loops of cycle-length <= 10 (configurable
|
127
|
-
in [`TaskConfig`](https://github.
|
128
|
-
com/langroid/langroid/blob/0ed30eb467b00d5eaf2933b577a4b2cc37de1aa1/langroid/agent
|
129
|
-
/task.py#L61). Only detects _exact_ loops, rather than
|
130
|
-
_approximate_ loops where the entities are saying essentially similar (but not
|
131
|
-
exactly the same) things repeatedly.
|
141
|
+
in [`TaskConfig`](https://langroid.github.io/langroid/reference/agent/task/#langroid.agent.task.TaskConfig). Only detects _exact_ loops, rather than _approximate_ loops where the entities are saying essentially similar (but not exactly the same) things repeatedly.
|
132
142
|
- "@"-addressing: any entity can address any other by name, which can be the name
|
133
143
|
of an agent's responder ("llm", "user", "agent") or a sub-task name. This is a
|
134
144
|
simpler alternative to the `RecipientTool` mechanism, with the tradeoff that
|
@@ -378,7 +388,10 @@ For many practical scenarios, you may need additional optional dependencies:
|
|
378
388
|
```bash
|
379
389
|
pip install "langroid[doc-chat,db]"
|
380
390
|
```
|
381
|
-
|
391
|
+
- To simply install _all_ optional dependencies, use the `all` extra (but note that this will result in longer load/startup times and a larger install size):
|
392
|
+
```bash
|
393
|
+
pip install "langroid[all]"
|
394
|
+
```
|
382
395
|
<details>
|
383
396
|
<summary><b>Optional Installs for using SQL Chat with a PostgreSQL DB </b></summary>
|
384
397
|
|
@@ -284,7 +284,7 @@ class Agent(ABC):
|
|
284
284
|
enabled_classes: List[Type[ToolMessage]] = list(self.llm_tools_map.values())
|
285
285
|
# use at most 2 sample conversations, no need to be exhaustive;
|
286
286
|
sample_convo = [
|
287
|
-
msg_cls().
|
287
|
+
msg_cls().usage_examples(random=True) # type: ignore
|
288
288
|
for i, msg_cls in enumerate(enabled_classes)
|
289
289
|
if i < 2
|
290
290
|
]
|
@@ -270,9 +270,9 @@ class ChatAgent(Agent):
|
|
270
270
|
):
|
271
271
|
# example will be shown in json_format_rules() when using TOOLs,
|
272
272
|
# so we don't need to show it here.
|
273
|
-
example = "" if self.config.use_tools else (msg_cls.
|
273
|
+
example = "" if self.config.use_tools else (msg_cls.usage_examples())
|
274
274
|
if example != "":
|
275
|
-
example = "
|
275
|
+
example = "EXAMPLES:\n" + example
|
276
276
|
class_instructions = msg_cls.instructions()
|
277
277
|
guidance = (
|
278
278
|
""
|
@@ -525,9 +525,11 @@ class Task:
|
|
525
525
|
):
|
526
526
|
raise InfiniteLoopException(
|
527
527
|
"""Possible infinite loop detected!
|
528
|
-
You can adjust infinite loop detection
|
529
|
-
in the TaskConfig passed to the Task
|
530
|
-
|
528
|
+
You can adjust infinite loop detection (or turn it off)
|
529
|
+
by changing the params in the TaskConfig passed to the Task
|
530
|
+
constructor; see here:
|
531
|
+
https://langroid.github.io/langroid/reference/agent/task/#langroid.agent.task.TaskConfig
|
532
|
+
"""
|
531
533
|
)
|
532
534
|
|
533
535
|
final_result = self.result()
|
@@ -620,9 +622,11 @@ class Task:
|
|
620
622
|
):
|
621
623
|
raise InfiniteLoopException(
|
622
624
|
"""Possible infinite loop detected!
|
623
|
-
You can adjust infinite loop detection
|
624
|
-
in the TaskConfig passed to the Task
|
625
|
-
|
625
|
+
You can adjust infinite loop detection (or turn it off)
|
626
|
+
by changing the params in the TaskConfig passed to the Task
|
627
|
+
constructor; see here:
|
628
|
+
https://langroid.github.io/langroid/reference/agent/task/#langroid.agent.task.TaskConfig
|
629
|
+
"""
|
626
630
|
)
|
627
631
|
|
628
632
|
final_result = self.result()
|
@@ -80,21 +80,34 @@ class ToolMessage(ABC, BaseModel):
|
|
80
80
|
return []
|
81
81
|
|
82
82
|
@classmethod
|
83
|
-
def
|
83
|
+
def usage_examples(cls, random: bool = False) -> str:
|
84
84
|
"""
|
85
|
-
Instruction to the LLM showing
|
85
|
+
Instruction to the LLM showing examples of how to use the tool-message.
|
86
|
+
|
87
|
+
Args:
|
88
|
+
random (bool): whether to pick a random example from the list of examples.
|
89
|
+
Set to `true` when using this to illustrate a dialog between LLM and
|
90
|
+
user.
|
91
|
+
(if false, use ALL examples)
|
86
92
|
Returns:
|
87
|
-
str:
|
93
|
+
str: examples of how to use the tool/function-call
|
88
94
|
"""
|
89
95
|
# pick a random example of the fields
|
90
96
|
if len(cls.examples()) == 0:
|
91
97
|
return ""
|
92
|
-
|
93
|
-
|
94
|
-
# (description, example_instance)
|
95
|
-
return f"{ex[0]} => {ex[1].json_example()}"
|
98
|
+
if random:
|
99
|
+
examples = [choice(cls.examples())]
|
96
100
|
else:
|
97
|
-
|
101
|
+
examples = cls.examples()
|
102
|
+
examples_jsons = [
|
103
|
+
(
|
104
|
+
f"EXAMPLE {i}: (THOUGHT: {ex[0]}) => \n{ex[1].json_example()}"
|
105
|
+
if isinstance(ex, tuple)
|
106
|
+
else f"EXAMPLE {i}:\n {ex.json_example()}"
|
107
|
+
)
|
108
|
+
for i, ex in enumerate(examples, 1)
|
109
|
+
]
|
110
|
+
return "\n\n".join(examples_jsons)
|
98
111
|
|
99
112
|
def to_json(self) -> str:
|
100
113
|
return self.json(indent=4, exclude={"result", "purpose"})
|
@@ -139,6 +152,9 @@ class ToolMessage(ABC, BaseModel):
|
|
139
152
|
# cls.simple_schema() if tool else
|
140
153
|
cls.llm_function_schema(request=True).parameters
|
141
154
|
)
|
155
|
+
examples_str = ""
|
156
|
+
if cls.examples():
|
157
|
+
examples_str = "EXAMPLES:\n" + cls.usage_examples()
|
142
158
|
return textwrap.dedent(
|
143
159
|
f"""
|
144
160
|
TOOL: {cls.default_value("request")}
|
@@ -146,7 +162,7 @@ class ToolMessage(ABC, BaseModel):
|
|
146
162
|
JSON FORMAT: {
|
147
163
|
json.dumps(param_dict, indent=4)
|
148
164
|
}
|
149
|
-
{
|
165
|
+
{examples_str}
|
150
166
|
""".lstrip()
|
151
167
|
)
|
152
168
|
|
@@ -26,7 +26,12 @@ class SegmentExtractTool(ToolMessage):
|
|
26
26
|
|
27
27
|
@classmethod
|
28
28
|
def examples(cls) -> List["ToolMessage" | Tuple[str, "ToolMessage"]]:
|
29
|
-
return [
|
29
|
+
return [
|
30
|
+
(
|
31
|
+
"I want to extract segments 1, 3, and 5 thru 7",
|
32
|
+
cls(segment_list="1,3,5-7"),
|
33
|
+
)
|
34
|
+
]
|
30
35
|
|
31
36
|
@classmethod
|
32
37
|
def instructions(cls) -> str:
|
@@ -1,25 +1,18 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "langroid"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.258"
|
4
4
|
description = "Harness LLMs with Multi-Agent Programming"
|
5
5
|
authors = ["Prasad Chalasani <pchalasani@gmail.com>"]
|
6
6
|
readme = "README.md"
|
7
7
|
license = "MIT"
|
8
|
+
include = ["pyproject.toml"]
|
9
|
+
|
8
10
|
|
9
11
|
# =============== MAIN DEPS ==============
|
10
12
|
[tool.poetry.dependencies]
|
11
13
|
python = ">=3.10,<3.12"
|
12
14
|
|
13
|
-
# OPTIONALS
|
14
|
-
mkdocs = {version="^1.4.2", optional=true}
|
15
|
-
mkdocs-material = {version="^9.1.5", optional=true}
|
16
|
-
mkdocstrings = {extras = ["python"], version = "^0.21.2", optional=true}
|
17
|
-
mkdocs-awesome-pages-plugin = {version="^2.8.0", optional=true}
|
18
|
-
mkdocs-rss-plugin = {version="^1.8.0", optional=true}
|
19
|
-
mkdocs-gen-files = {version="^0.4.0", optional=true}
|
20
|
-
mkdocs-literate-nav = {version="^0.6.0", optional=true}
|
21
|
-
mkdocs-section-index = {version="^0.3.5", optional=true}
|
22
|
-
mkdocs-jupyter = {version="^0.24.1", optional=true}
|
15
|
+
# =========== OPTIONALS ==============================
|
23
16
|
chromadb = {version=">=0.4.21, <=0.4.23", optional=true}
|
24
17
|
momento = {version="^1.10.2", optional=true}
|
25
18
|
unstructured = {extras = ["docx", "pptx", "pdf"], version = ">=0.10.16,<0.10.18", optional=true}
|
@@ -96,9 +89,6 @@ async-generator = "^1.10"
|
|
96
89
|
|
97
90
|
python-magic = "^0.4.27"
|
98
91
|
|
99
|
-
|
100
|
-
# ================= EXTRAS =================
|
101
|
-
|
102
92
|
[tool.poetry.extras]
|
103
93
|
# install these using, e.g.,
|
104
94
|
# `poetry install -E [...]` where [...] is one of the extras below
|
@@ -110,8 +100,18 @@ doc-chat = [
|
|
110
100
|
"pymupdf", "pdf2image", "pytesseract"
|
111
101
|
]
|
112
102
|
db = ["postgres", "mysql", "sqlalchemy", "psycopg2", "pymysql"]
|
113
|
-
|
114
|
-
|
103
|
+
hf-transformers = ["sentence-transformers", "torch", "transformers", "huggingface-hub"]
|
104
|
+
vecdbs = ["lancedb", "tantivy", "pyarrow", "chromadb"]
|
105
|
+
all = [
|
106
|
+
"unstructured", "python-docx", "pdfplumber", "pypdf",
|
107
|
+
"pymupdf", "pdf2image", "pytesseract",
|
108
|
+
"postgres", "mysql", "sqlalchemy", "psycopg2", "pymysql",
|
109
|
+
"sentence-transformers", "torch", "transformers", "huggingface-hub",
|
110
|
+
"lancedb", "tantivy", "pyarrow", "chromadb",
|
111
|
+
"metaphor-python", "neo4j",
|
112
|
+
"litellm",
|
113
|
+
"chainlit", "python-socketio",
|
114
|
+
]
|
115
115
|
# more granular groupings
|
116
116
|
lancedb = ["lancedb", "tantivy", "pyarrow"]
|
117
117
|
pdf-parsers = ["pdfplumber", "pypdf", "pymupdf", "pdf2image", "pytesseract"]
|
@@ -156,9 +156,24 @@ pytest-redis = "^3.0.2"
|
|
156
156
|
pytest-asyncio = "^0.21.1"
|
157
157
|
pytest-postgresql = "^5.0.0"
|
158
158
|
pytest-mysql = "^2.4.2"
|
159
|
+
coverage = "^7.2.5"
|
160
|
+
|
161
|
+
[tool.poetry.group.docs]
|
162
|
+
optional = true
|
163
|
+
|
164
|
+
[tool.poetry.group.docs.dependencies]
|
165
|
+
|
166
|
+
mkdocs = "^1.4.2"
|
167
|
+
mkdocs-material = "^9.1.5"
|
168
|
+
mkdocstrings = {extras = ["python"], version = "^0.21.2"}
|
169
|
+
mkdocs-awesome-pages-plugin = "^2.8.0"
|
170
|
+
mkdocs-rss-plugin = "^1.8.0"
|
171
|
+
mkdocs-gen-files = "^0.4.0"
|
172
|
+
mkdocs-literate-nav = "^0.6.0"
|
173
|
+
mkdocs-section-index = "^0.3.5"
|
174
|
+
mkdocs-jupyter = "^0.24.1"
|
159
175
|
|
160
176
|
|
161
|
-
coverage = "^7.2.5"
|
162
177
|
|
163
178
|
# ========================================
|
164
179
|
[build-system]
|
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.1.256 → langroid-0.1.258}/langroid/agent/special/lance_rag/query_planner_agent.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
|
{langroid-0.1.256 → langroid-0.1.258}/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
|
{langroid-0.1.256 → langroid-0.1.258}/langroid/embedding_models/protoc/embeddings_pb2_grpc.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
|
{langroid-0.1.256 → langroid-0.1.258}/langroid/language_models/prompt_formatter/hf_formatter.py
RENAMED
File without changes
|
{langroid-0.1.256 → langroid-0.1.258}/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
|