langroid 0.31.2__py3-none-any.whl → 0.33.3__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.
- {langroid-0.31.2.dist-info → langroid-0.33.3.dist-info}/METADATA +150 -124
- langroid-0.33.3.dist-info/RECORD +7 -0
- {langroid-0.31.2.dist-info → langroid-0.33.3.dist-info}/WHEEL +1 -1
- langroid-0.33.3.dist-info/entry_points.txt +4 -0
- pyproject.toml +317 -212
- langroid/__init__.py +0 -106
- langroid/agent/.chainlit/config.toml +0 -121
- langroid/agent/.chainlit/translations/bn.json +0 -231
- langroid/agent/.chainlit/translations/en-US.json +0 -229
- langroid/agent/.chainlit/translations/gu.json +0 -231
- langroid/agent/.chainlit/translations/he-IL.json +0 -231
- langroid/agent/.chainlit/translations/hi.json +0 -231
- langroid/agent/.chainlit/translations/kn.json +0 -231
- langroid/agent/.chainlit/translations/ml.json +0 -231
- langroid/agent/.chainlit/translations/mr.json +0 -231
- langroid/agent/.chainlit/translations/ta.json +0 -231
- langroid/agent/.chainlit/translations/te.json +0 -231
- langroid/agent/.chainlit/translations/zh-CN.json +0 -229
- langroid/agent/__init__.py +0 -41
- langroid/agent/base.py +0 -1981
- langroid/agent/batch.py +0 -398
- langroid/agent/callbacks/__init__.py +0 -0
- langroid/agent/callbacks/chainlit.py +0 -598
- langroid/agent/chat_agent.py +0 -1899
- langroid/agent/chat_document.py +0 -454
- langroid/agent/helpers.py +0 -0
- langroid/agent/junk +0 -13
- langroid/agent/openai_assistant.py +0 -882
- langroid/agent/special/__init__.py +0 -59
- langroid/agent/special/arangodb/__init__.py +0 -0
- langroid/agent/special/arangodb/arangodb_agent.py +0 -656
- langroid/agent/special/arangodb/system_messages.py +0 -186
- langroid/agent/special/arangodb/tools.py +0 -107
- langroid/agent/special/arangodb/utils.py +0 -36
- langroid/agent/special/doc_chat_agent.py +0 -1466
- langroid/agent/special/lance_doc_chat_agent.py +0 -262
- langroid/agent/special/lance_rag/__init__.py +0 -9
- langroid/agent/special/lance_rag/critic_agent.py +0 -198
- langroid/agent/special/lance_rag/lance_rag_task.py +0 -82
- langroid/agent/special/lance_rag/query_planner_agent.py +0 -260
- langroid/agent/special/lance_tools.py +0 -61
- langroid/agent/special/neo4j/__init__.py +0 -0
- langroid/agent/special/neo4j/csv_kg_chat.py +0 -174
- langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -433
- langroid/agent/special/neo4j/system_messages.py +0 -120
- langroid/agent/special/neo4j/tools.py +0 -32
- langroid/agent/special/relevance_extractor_agent.py +0 -127
- langroid/agent/special/retriever_agent.py +0 -56
- langroid/agent/special/sql/__init__.py +0 -17
- langroid/agent/special/sql/sql_chat_agent.py +0 -654
- langroid/agent/special/sql/utils/__init__.py +0 -21
- langroid/agent/special/sql/utils/description_extractors.py +0 -190
- langroid/agent/special/sql/utils/populate_metadata.py +0 -85
- langroid/agent/special/sql/utils/system_message.py +0 -35
- langroid/agent/special/sql/utils/tools.py +0 -64
- langroid/agent/special/table_chat_agent.py +0 -263
- langroid/agent/structured_message.py +0 -9
- langroid/agent/task.py +0 -2093
- langroid/agent/tool_message.py +0 -393
- langroid/agent/tools/__init__.py +0 -38
- langroid/agent/tools/duckduckgo_search_tool.py +0 -50
- langroid/agent/tools/file_tools.py +0 -234
- langroid/agent/tools/google_search_tool.py +0 -39
- langroid/agent/tools/metaphor_search_tool.py +0 -67
- langroid/agent/tools/orchestration.py +0 -303
- langroid/agent/tools/recipient_tool.py +0 -235
- langroid/agent/tools/retrieval_tool.py +0 -32
- langroid/agent/tools/rewind_tool.py +0 -137
- langroid/agent/tools/segment_extract_tool.py +0 -41
- langroid/agent/typed_task.py +0 -19
- langroid/agent/xml_tool_message.py +0 -382
- langroid/agent_config.py +0 -0
- langroid/cachedb/__init__.py +0 -17
- langroid/cachedb/base.py +0 -58
- langroid/cachedb/momento_cachedb.py +0 -108
- langroid/cachedb/redis_cachedb.py +0 -153
- langroid/embedding_models/__init__.py +0 -39
- langroid/embedding_models/base.py +0 -74
- langroid/embedding_models/clustering.py +0 -189
- langroid/embedding_models/models.py +0 -461
- langroid/embedding_models/protoc/__init__.py +0 -0
- langroid/embedding_models/protoc/embeddings.proto +0 -19
- langroid/embedding_models/protoc/embeddings_pb2.py +0 -33
- langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -50
- langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -79
- langroid/embedding_models/remote_embeds.py +0 -153
- langroid/exceptions.py +0 -65
- langroid/experimental/team-save.py +0 -391
- langroid/language_models/.chainlit/config.toml +0 -121
- langroid/language_models/.chainlit/translations/en-US.json +0 -231
- langroid/language_models/__init__.py +0 -53
- langroid/language_models/azure_openai.py +0 -153
- langroid/language_models/base.py +0 -678
- langroid/language_models/config.py +0 -18
- langroid/language_models/mock_lm.py +0 -124
- langroid/language_models/openai_gpt.py +0 -1923
- langroid/language_models/prompt_formatter/__init__.py +0 -16
- langroid/language_models/prompt_formatter/base.py +0 -40
- langroid/language_models/prompt_formatter/hf_formatter.py +0 -132
- langroid/language_models/prompt_formatter/llama2_formatter.py +0 -75
- langroid/language_models/utils.py +0 -147
- langroid/mytypes.py +0 -84
- langroid/parsing/__init__.py +0 -52
- langroid/parsing/agent_chats.py +0 -38
- langroid/parsing/code-parsing.md +0 -86
- langroid/parsing/code_parser.py +0 -121
- langroid/parsing/config.py +0 -0
- langroid/parsing/document_parser.py +0 -718
- langroid/parsing/image_text.py +0 -32
- langroid/parsing/para_sentence_split.py +0 -62
- langroid/parsing/parse_json.py +0 -155
- langroid/parsing/parser.py +0 -313
- langroid/parsing/repo_loader.py +0 -790
- langroid/parsing/routing.py +0 -36
- langroid/parsing/search.py +0 -275
- langroid/parsing/spider.py +0 -102
- langroid/parsing/table_loader.py +0 -94
- langroid/parsing/url_loader.py +0 -111
- langroid/parsing/url_loader_cookies.py +0 -73
- langroid/parsing/urls.py +0 -273
- langroid/parsing/utils.py +0 -373
- langroid/parsing/web_search.py +0 -155
- langroid/prompts/__init__.py +0 -9
- langroid/prompts/chat-gpt4-system-prompt.md +0 -68
- langroid/prompts/dialog.py +0 -17
- langroid/prompts/prompts_config.py +0 -5
- langroid/prompts/templates.py +0 -141
- langroid/pydantic_v1/__init__.py +0 -10
- langroid/pydantic_v1/main.py +0 -4
- langroid/utils/.chainlit/config.toml +0 -121
- langroid/utils/.chainlit/translations/en-US.json +0 -231
- langroid/utils/__init__.py +0 -19
- langroid/utils/algorithms/__init__.py +0 -3
- langroid/utils/algorithms/graph.py +0 -103
- langroid/utils/configuration.py +0 -98
- langroid/utils/constants.py +0 -30
- langroid/utils/docker.py +0 -37
- langroid/utils/git_utils.py +0 -252
- langroid/utils/globals.py +0 -49
- langroid/utils/llms/__init__.py +0 -0
- langroid/utils/llms/strings.py +0 -8
- langroid/utils/logging.py +0 -135
- langroid/utils/object_registry.py +0 -66
- langroid/utils/output/__init__.py +0 -20
- langroid/utils/output/citations.py +0 -41
- langroid/utils/output/printing.py +0 -99
- langroid/utils/output/status.py +0 -40
- langroid/utils/pandas_utils.py +0 -30
- langroid/utils/pydantic_utils.py +0 -602
- langroid/utils/system.py +0 -286
- langroid/utils/types.py +0 -93
- langroid/utils/web/__init__.py +0 -0
- langroid/utils/web/login.py +0 -83
- langroid/vector_store/__init__.py +0 -50
- langroid/vector_store/base.py +0 -357
- langroid/vector_store/chromadb.py +0 -214
- langroid/vector_store/lancedb.py +0 -401
- langroid/vector_store/meilisearch.py +0 -299
- langroid/vector_store/momento.py +0 -278
- langroid/vector_store/qdrant_cloud.py +0 -6
- langroid/vector_store/qdrantdb.py +0 -468
- langroid-0.31.2.dist-info/RECORD +0 -162
- {langroid-0.31.2.dist-info → langroid-0.33.3.dist-info/licenses}/LICENSE +0 -0
pyproject.toml
CHANGED
@@ -1,251 +1,356 @@
|
|
1
|
-
[
|
1
|
+
[project]
|
2
2
|
name = "langroid"
|
3
|
-
version = "0.
|
3
|
+
version = "0.33.3"
|
4
|
+
authors = [
|
5
|
+
{ name = "Prasad Chalasani", email = "pchalasani@gmail.com" },
|
6
|
+
]
|
4
7
|
description = "Harness LLMs with Multi-Agent Programming"
|
5
|
-
authors = ["Prasad Chalasani <pchalasani@gmail.com>"]
|
6
8
|
readme = "README.md"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
python-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
typer = "^0.9.0"
|
56
|
-
colorlog = "^6.7.0"
|
57
|
-
openai = "^1.45.0"
|
58
|
-
tiktoken = "^0.7.0"
|
59
|
-
pygithub = "^1.58.1"
|
60
|
-
pygments = "^2.15.1"
|
61
|
-
redis = "^5.0.1"
|
62
|
-
fakeredis = "^2.12.1"
|
63
|
-
faker = "^18.9.0"
|
64
|
-
requests = "^2.31.0"
|
65
|
-
pyparsing = "^3.0.9"
|
66
|
-
nltk = "^3.8.2"
|
67
|
-
qdrant-client = "^1.8.0"
|
68
|
-
pydantic = ">=1,<2.10.2"
|
69
|
-
pandas = "^2.0.3"
|
70
|
-
prettytable = "^3.8.0"
|
71
|
-
|
72
|
-
google-api-python-client = "^2.95.0"
|
73
|
-
lxml = "^4.9.3"
|
74
|
-
|
75
|
-
rank-bm25 = "^0.2.2"
|
76
|
-
thefuzz = "^0.20.0"
|
77
|
-
|
78
|
-
jinja2 = "^3.1.2"
|
79
|
-
docstring-parser = "^0.16"
|
80
|
-
|
81
|
-
aiohttp = "^3.9.1"
|
82
|
-
grpcio = "^1.62.1"
|
83
|
-
duckduckgo-search = "^6.0.0"
|
84
|
-
|
85
|
-
google-generativeai = "^0.5.2"
|
86
|
-
groq = "^0.13.0"
|
87
|
-
nest-asyncio = "^1.6.0"
|
88
|
-
async-generator = "^1.10"
|
89
|
-
|
90
|
-
python-magic = "^0.4.27"
|
91
|
-
json-repair = "^0.29.9"
|
92
|
-
cerebras-cloud-sdk = "^1.1.0"
|
93
|
-
gitpython = "^3.1.43"
|
94
|
-
python-arango = {version="^8.1.2", optional=true}
|
95
|
-
arango-datasets = {version="^1.2.2", optional=true}
|
96
|
-
adb-cloud-connector = "^1.0.2"
|
97
|
-
pytest-rerunfailures = "^15.0"
|
98
|
-
|
9
|
+
requires-python = "<3.13,>=3.10"
|
10
|
+
dependencies = [
|
11
|
+
"adb-cloud-connector<2.0.0,>=1.0.2",
|
12
|
+
"aiohttp<4.0.0,>=3.9.1",
|
13
|
+
"async-generator<2.0,>=1.10",
|
14
|
+
"bs4<1.0.0,>=0.0.1",
|
15
|
+
"cerebras-cloud-sdk<2.0.0,>=1.1.0",
|
16
|
+
"colorlog<7.0.0,>=6.7.0",
|
17
|
+
"docstring-parser<1.0,>=0.16",
|
18
|
+
"duckduckgo-search<7.0.0,>=6.0.0",
|
19
|
+
"faker<19.0.0,>=18.9.0",
|
20
|
+
"fakeredis<3.0.0,>=2.12.1",
|
21
|
+
"fire<1.0.0,>=0.5.0",
|
22
|
+
"gitpython<4.0.0,>=3.1.43",
|
23
|
+
"google-api-python-client<3.0.0,>=2.95.0",
|
24
|
+
"google-generativeai<1.0.0,>=0.5.2",
|
25
|
+
"groq<1.0.0,>=0.13.0",
|
26
|
+
"grpcio<2.0.0,>=1.62.1",
|
27
|
+
"halo<1.0.0,>=0.0.31",
|
28
|
+
"jinja2<4.0.0,>=3.1.2",
|
29
|
+
"json-repair<1.0.0,>=0.29.9",
|
30
|
+
"lxml<5.0.0,>=4.9.3",
|
31
|
+
"nest-asyncio<2.0.0,>=1.6.0",
|
32
|
+
"nltk<4.0.0,>=3.8.2",
|
33
|
+
"onnxruntime<2.0.0,>=1.16.1",
|
34
|
+
"openai<2.0.0,>=1.45.0",
|
35
|
+
"pandas<3.0.0,>=2.0.3",
|
36
|
+
"prettytable<4.0.0,>=3.8.0",
|
37
|
+
"pydantic<2.10.2,>=1",
|
38
|
+
"pygithub<2.0.0,>=1.58.1",
|
39
|
+
"pygments<3.0.0,>=2.15.1",
|
40
|
+
"pyparsing<4.0.0,>=3.0.9",
|
41
|
+
"pytest-rerunfailures<16.0,>=15.0",
|
42
|
+
"python-dotenv<2.0.0,>=1.0.0",
|
43
|
+
"python-magic<1.0.0,>=0.4.27",
|
44
|
+
"pyyaml<7.0.0,>=6.0.1",
|
45
|
+
"qdrant-client<2.0.0,>=1.8.0",
|
46
|
+
"rank-bm25<1.0.0,>=0.2.2",
|
47
|
+
"redis<6.0.0,>=5.0.1",
|
48
|
+
"requests<3.0.0,>=2.31.0",
|
49
|
+
"requests-oauthlib<2.0.0,>=1.3.1",
|
50
|
+
"rich<14.0.0,>=13.3.4",
|
51
|
+
"thefuzz<1.0.0,>=0.20.0",
|
52
|
+
"tiktoken<1.0.0,>=0.7.0",
|
53
|
+
"trafilatura<2.0.0,>=1.5.0",
|
54
|
+
"typer<1.0.0,>=0.9.0",
|
55
|
+
"wget<4.0,>=3.2",
|
56
|
+
]
|
99
57
|
|
100
|
-
[
|
101
|
-
|
102
|
-
# `poetry install -E [...]` where [...] is one of the extras below
|
103
|
-
# or install multiple extras using, e.g., `poetry install -E "litellm mysql"
|
58
|
+
[project.license]
|
59
|
+
text = "MIT"
|
104
60
|
|
105
|
-
|
61
|
+
[project.optional-dependencies]
|
106
62
|
doc-chat = [
|
107
|
-
"
|
108
|
-
"
|
63
|
+
"pdf2image<2.0.0,>=1.17.0",
|
64
|
+
"pdfplumber<0.11.0,>=0.10.2",
|
65
|
+
"pymupdf<2.0.0,>=1.23.3",
|
66
|
+
"pypdf>=5.1.0",
|
67
|
+
"pytesseract<0.4.0,>=0.3.10",
|
68
|
+
"python-docx<2.0.0,>=1.1.0",
|
69
|
+
"unstructured[docx,pdf,pptx]<0.10.18,>=0.10.16",
|
70
|
+
]
|
71
|
+
hf-transformers = [
|
72
|
+
"sentence-transformers<3.0.0,>=2.2.2",
|
73
|
+
"torch<3.0.0,>=2.0.0",
|
74
|
+
"transformers<5.0.0,>=4.40.1",
|
75
|
+
"huggingface-hub<0.22.0,>=0.21.2",
|
76
|
+
]
|
77
|
+
vecdbs = [
|
78
|
+
"lancedb<0.9.0,>=0.8.2",
|
79
|
+
"tantivy<0.22.0,>=0.21.0",
|
80
|
+
"pyarrow<16.0.0,>=15.0.0",
|
81
|
+
"chromadb<=0.4.23,>=0.4.21",
|
82
|
+
]
|
83
|
+
db = [
|
84
|
+
"sqlalchemy<3.0.0,>=2.0.19",
|
85
|
+
"psycopg2<3.0.0,>=2.9.7",
|
86
|
+
"pymysql<2.0.0,>=1.1.0",
|
109
87
|
]
|
110
|
-
db = ["postgres", "mysql", "sqlalchemy", "psycopg2", "pymysql"]
|
111
|
-
hf-transformers = ["sentence-transformers", "torch", "transformers", "huggingface-hub"]
|
112
|
-
vecdbs = ["lancedb", "tantivy", "pyarrow", "chromadb"]
|
113
88
|
all = [
|
114
|
-
"
|
115
|
-
"
|
116
|
-
"
|
117
|
-
"
|
118
|
-
|
119
|
-
"
|
120
|
-
"
|
121
|
-
"
|
122
|
-
"
|
123
|
-
"
|
124
|
-
"
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
"
|
145
|
-
"
|
146
|
-
"
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
89
|
+
"pdf2image<2.0.0,>=1.17.0",
|
90
|
+
"pdfplumber<0.11.0,>=0.10.2",
|
91
|
+
"pymupdf<2.0.0,>=1.23.3",
|
92
|
+
"pypdf>=5.1.0",
|
93
|
+
"pytesseract<0.4.0,>=0.3.10",
|
94
|
+
"python-docx<2.0.0,>=1.1.0",
|
95
|
+
"unstructured[docx,pdf,pptx]<0.10.18,>=0.10.16",
|
96
|
+
"sqlalchemy<3.0.0,>=2.0.19",
|
97
|
+
"psycopg2<3.0.0,>=2.9.7",
|
98
|
+
"pymysql<2.0.0,>=1.1.0",
|
99
|
+
"sentence-transformers<3.0.0,>=2.2.2",
|
100
|
+
"torch<3.0.0,>=2.0.0",
|
101
|
+
"transformers<5.0.0,>=4.40.1",
|
102
|
+
"huggingface-hub<0.22.0,>=0.21.2",
|
103
|
+
"chromadb<=0.4.23,>=0.4.21",
|
104
|
+
"metaphor-python<0.2.0,>=0.1.23",
|
105
|
+
"neo4j<6.0.0,>=5.14.1",
|
106
|
+
"python-arango<9.0.0,>=8.1.2",
|
107
|
+
"arango-datasets<2.0.0,>=1.2.2",
|
108
|
+
"litellm<2.0.0,>=1.30.1",
|
109
|
+
"chainlit<2.0.0,>=1.3.2",
|
110
|
+
"python-socketio<6.0.0,>=5.11.0",
|
111
|
+
"fastembed<0.4.0,>=0.3.1",
|
112
|
+
]
|
113
|
+
lancedb = [
|
114
|
+
"lancedb<0.9.0,>=0.8.2",
|
115
|
+
"tantivy<0.22.0,>=0.21.0",
|
116
|
+
"pyarrow<16.0.0,>=15.0.0",
|
117
|
+
]
|
118
|
+
pdf-parsers = [
|
119
|
+
"pdfplumber<0.11.0,>=0.10.2",
|
120
|
+
"pypdf>=5.1.0",
|
121
|
+
"pymupdf<2.0.0,>=1.23.3",
|
122
|
+
"pdf2image<2.0.0,>=1.17.0",
|
123
|
+
"pytesseract<0.4.0,>=0.3.10",
|
124
|
+
]
|
125
|
+
docx = [
|
126
|
+
"python-docx<2.0.0,>=1.1.0",
|
127
|
+
]
|
128
|
+
scrapy = [
|
129
|
+
"scrapy<3.0.0,>=2.11.0",
|
130
|
+
]
|
131
|
+
hf-embeddings = [
|
132
|
+
"sentence-transformers<3.0.0,>=2.2.2",
|
133
|
+
"torch<3.0.0,>=2.0.0",
|
134
|
+
]
|
135
|
+
transformers = [
|
136
|
+
"transformers<5.0.0,>=4.40.1",
|
137
|
+
"huggingface-hub<0.22.0,>=0.21.2",
|
138
|
+
"torch<3.0.0,>=2.0.0",
|
139
|
+
]
|
140
|
+
unstructured = [
|
141
|
+
"unstructured[docx,pdf,pptx]<0.10.18,>=0.10.16",
|
142
|
+
]
|
143
|
+
postgres = [
|
144
|
+
"psycopg2<3.0.0,>=2.9.7",
|
145
|
+
]
|
146
|
+
mysql = [
|
147
|
+
"pymysql<2.0.0,>=1.1.0",
|
148
|
+
]
|
149
|
+
sql = [
|
150
|
+
"sqlalchemy<3.0.0,>=2.0.19",
|
151
|
+
"pymysql<2.0.0,>=1.1.0",
|
152
|
+
"psycopg2<3.0.0,>=2.9.7",
|
153
|
+
]
|
154
|
+
litellm = [
|
155
|
+
"litellm<2.0.0,>=1.30.1",
|
156
|
+
]
|
157
|
+
neo4j = [
|
158
|
+
"neo4j<6.0.0,>=5.14.1",
|
159
|
+
]
|
160
|
+
arango = [
|
161
|
+
"python-arango<9.0.0,>=8.1.2",
|
162
|
+
"arango-datasets<2.0.0,>=1.2.2",
|
163
|
+
]
|
164
|
+
metaphor = [
|
165
|
+
"metaphor-python<0.2.0,>=0.1.23",
|
166
|
+
]
|
167
|
+
chainlit = [
|
168
|
+
"chainlit<2.0.0,>=1.3.2",
|
169
|
+
"python-socketio<6.0.0,>=5.11.0",
|
170
|
+
]
|
171
|
+
chromadb = [
|
172
|
+
"chromadb<=0.4.23,>=0.4.21",
|
173
|
+
]
|
174
|
+
meilisearch = [
|
175
|
+
"meilisearch-python-sdk<3.0.0,>=2.2.3",
|
176
|
+
]
|
177
|
+
momento = [
|
178
|
+
"momento<1.21.0,>=1.10.2",
|
179
|
+
]
|
180
|
+
fastembed = [
|
181
|
+
"fastembed<0.4.0,>=0.3.1",
|
182
|
+
]
|
193
183
|
|
184
|
+
[dependency-groups]
|
185
|
+
dev = [
|
186
|
+
"black[jupyter]<25.0.0,>=24.3.0",
|
187
|
+
"flake8<7.0.0,>=6.0.0",
|
188
|
+
"mypy<2.0.0,>=1.11.2",
|
189
|
+
"ruff<1.0.0,>=0.8.4",
|
190
|
+
"pre-commit<4.0.0,>=3.3.2",
|
191
|
+
"autopep8<3.0.0,>=2.0.2",
|
192
|
+
"types-redis<5.0.0.0,>=4.5.5.2",
|
193
|
+
"types-requests<3.0.0.0,>=2.31.0.1",
|
194
|
+
"types-pyyaml<7.0.0.0,>=6.0.12.20240311",
|
195
|
+
"types-pillow<11.0.0.0,>=10.2.0.20240406",
|
196
|
+
"pytest<8.0.0,>=7.3.1",
|
197
|
+
"pytest-redis<4.0.0,>=3.0.2",
|
198
|
+
"pytest-asyncio<1.0.0,>=0.21.1",
|
199
|
+
"pytest-postgresql<6.0.0,>=5.0.0",
|
200
|
+
"pytest-mysql<3.0.0,>=2.4.2",
|
201
|
+
"coverage<8.0.0,>=7.2.5",
|
202
|
+
"pytest-xdist<4.0.0,>=3.6.1",
|
203
|
+
"pytest-timeout<3.0.0,>=2.3.1",
|
204
|
+
"pytest-cov<6.0.0,>=5.0.0",
|
205
|
+
"docker<8.0.0,>=7.1.0",
|
206
|
+
"commitizen>=4.1.0",
|
207
|
+
]
|
208
|
+
docs = [
|
209
|
+
"mkdocs<2.0.0,>=1.4.2",
|
210
|
+
"mkdocs-material<10.0.0,>=9.1.5",
|
211
|
+
"mkdocstrings[python]<1.0.0,>=0.25.2",
|
212
|
+
"mkdocs-awesome-pages-plugin<3.0.0,>=2.8.0",
|
213
|
+
"mkdocs-rss-plugin<2.0.0,>=1.8.0",
|
214
|
+
"mkdocs-gen-files<1.0.0,>=0.4.0",
|
215
|
+
"mkdocs-literate-nav<1.0.0,>=0.6.0",
|
216
|
+
"mkdocs-section-index<1.0.0,>=0.3.5",
|
217
|
+
"mkdocs-jupyter<1.0.0,>=0.24.1",
|
218
|
+
"griffe<1.0.0",
|
219
|
+
]
|
194
220
|
|
195
|
-
# ========================================
|
196
221
|
[build-system]
|
197
|
-
requires = [
|
198
|
-
|
222
|
+
requires = [
|
223
|
+
"pdm-backend",
|
224
|
+
]
|
225
|
+
build-backend = "pdm.backend"
|
226
|
+
|
227
|
+
[tool.pdm.build]
|
228
|
+
includes = [
|
229
|
+
"pyproject.toml",
|
230
|
+
"langroid/py.typed",
|
231
|
+
]
|
232
|
+
excludes = [
|
233
|
+
"tests/",
|
234
|
+
]
|
199
235
|
|
200
236
|
[tool.black]
|
201
237
|
line-length = 88
|
202
|
-
include =
|
203
|
-
# extend-exclude = '.*pyi$'
|
204
|
-
# exclude = '^stubs/'
|
238
|
+
include = "\\.pyi?$"
|
205
239
|
|
206
240
|
[tool.pytype]
|
207
|
-
inputs = [
|
241
|
+
inputs = [
|
242
|
+
"langroid",
|
243
|
+
]
|
208
244
|
|
209
245
|
[tool.mypy]
|
210
246
|
python_version = "3.11"
|
211
|
-
#mypy_path = ["stubs"]
|
212
|
-
|
213
|
-
#follow_imports = "skip"
|
214
|
-
#check_untyped_defs = true
|
215
247
|
disallow_untyped_defs = true
|
216
248
|
ignore_missing_imports = true
|
217
249
|
warn_unused_ignores = false
|
218
250
|
strict = true
|
219
251
|
exclude = [
|
220
|
-
"docs",
|
252
|
+
"docs",
|
253
|
+
".venv",
|
254
|
+
"venv",
|
255
|
+
"examples",
|
256
|
+
"examples_dev",
|
257
|
+
"langroid/utils/web",
|
221
258
|
"notebooks",
|
222
259
|
"langroid/parsing/repo_loader.py",
|
223
260
|
"langroid/embedding_models/clustering.py",
|
224
261
|
"langroid/agent/callbacks/chainlit.py",
|
225
262
|
"langroid/vector_store/chromadb.py",
|
226
|
-
"langroid/embedding_models/protoc"
|
263
|
+
"langroid/embedding_models/protoc",
|
264
|
+
]
|
265
|
+
files = [
|
266
|
+
"langroid/*",
|
227
267
|
]
|
228
|
-
files=["langroid/*"]
|
229
268
|
plugins = [
|
230
|
-
"pydantic.mypy"
|
269
|
+
"pydantic.mypy",
|
231
270
|
]
|
232
271
|
|
233
272
|
[tool.ruff]
|
234
273
|
line-length = 88
|
235
|
-
# Allow unused variables when underscore-prefixed.
|
236
|
-
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
237
|
-
# Assume Python 3.11.
|
238
274
|
target-version = "py311"
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
275
|
+
|
276
|
+
[tool.ruff.lint]
|
277
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
278
|
+
select = [
|
279
|
+
"E",
|
280
|
+
"F",
|
281
|
+
"I",
|
282
|
+
]
|
283
|
+
exclude = [
|
284
|
+
"docs/**",
|
285
|
+
".venv",
|
286
|
+
"venv",
|
287
|
+
"examples/**",
|
288
|
+
"examples_dev",
|
289
|
+
"langroid/utils/web",
|
290
|
+
"notebooks",
|
291
|
+
"__init__.py",
|
292
|
+
"langroid/embedding_models/protoc/*",
|
293
|
+
]
|
294
|
+
fixable = [
|
295
|
+
"A",
|
296
|
+
"B",
|
297
|
+
"C",
|
298
|
+
"D",
|
299
|
+
"E",
|
300
|
+
"F",
|
301
|
+
"G",
|
302
|
+
"I",
|
303
|
+
"N",
|
304
|
+
"Q",
|
305
|
+
"S",
|
306
|
+
"T",
|
307
|
+
"W",
|
308
|
+
"ANN",
|
309
|
+
"ARG",
|
310
|
+
"BLE",
|
311
|
+
"COM",
|
312
|
+
"DJ",
|
313
|
+
"DTZ",
|
314
|
+
"EM",
|
315
|
+
"ERA",
|
316
|
+
"EXE",
|
317
|
+
"FBT",
|
318
|
+
"ICN",
|
319
|
+
"INP",
|
320
|
+
"ISC",
|
321
|
+
"NPY",
|
322
|
+
"PD",
|
323
|
+
"PGH",
|
324
|
+
"PIE",
|
325
|
+
"PL",
|
326
|
+
"PT",
|
327
|
+
"PTH",
|
328
|
+
"PYI",
|
329
|
+
"RET",
|
330
|
+
"RSE",
|
331
|
+
"RUF",
|
332
|
+
"SIM",
|
333
|
+
"SLF",
|
334
|
+
"TCH",
|
335
|
+
"TID",
|
336
|
+
"TRY",
|
337
|
+
"UP",
|
338
|
+
"YTT",
|
339
|
+
]
|
340
|
+
unfixable = []
|
341
|
+
extend-ignore = [
|
342
|
+
"F821",
|
343
|
+
"F401",
|
344
|
+
]
|
248
345
|
|
249
346
|
[tool.pytest.ini_options]
|
250
|
-
filterwarnings = [
|
347
|
+
filterwarnings = [
|
348
|
+
"ignore::DeprecationWarning",
|
349
|
+
]
|
251
350
|
|
351
|
+
[tool.commitizen]
|
352
|
+
name = "cz_conventional_commits"
|
353
|
+
tag_format = "$version"
|
354
|
+
version_scheme = "semver"
|
355
|
+
version_provider = "pep621"
|
356
|
+
major_version_zero = true
|
langroid/__init__.py
DELETED
@@ -1,106 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Main langroid package
|
3
|
-
"""
|
4
|
-
|
5
|
-
from . import mytypes
|
6
|
-
from . import utils
|
7
|
-
|
8
|
-
from . import parsing
|
9
|
-
from . import prompts
|
10
|
-
from . import cachedb
|
11
|
-
|
12
|
-
from . import language_models
|
13
|
-
from . import embedding_models
|
14
|
-
|
15
|
-
from . import vector_store
|
16
|
-
from . import agent
|
17
|
-
|
18
|
-
from .agent.base import (
|
19
|
-
Agent,
|
20
|
-
AgentConfig,
|
21
|
-
)
|
22
|
-
|
23
|
-
from .agent.batch import (
|
24
|
-
run_batch_tasks,
|
25
|
-
llm_response_batch,
|
26
|
-
agent_response_batch,
|
27
|
-
)
|
28
|
-
|
29
|
-
from .agent.chat_document import (
|
30
|
-
StatusCode,
|
31
|
-
ChatDocument,
|
32
|
-
ChatDocMetaData,
|
33
|
-
)
|
34
|
-
|
35
|
-
from .agent.tool_message import (
|
36
|
-
ToolMessage,
|
37
|
-
)
|
38
|
-
|
39
|
-
from .agent.chat_agent import (
|
40
|
-
ChatAgent,
|
41
|
-
ChatAgentConfig,
|
42
|
-
)
|
43
|
-
|
44
|
-
from .agent.task import Task, TaskConfig
|
45
|
-
|
46
|
-
|
47
|
-
from .mytypes import (
|
48
|
-
DocMetaData,
|
49
|
-
Document,
|
50
|
-
Entity,
|
51
|
-
)
|
52
|
-
|
53
|
-
from .exceptions import InfiniteLoopException
|
54
|
-
from .exceptions import LangroidImportError
|
55
|
-
|
56
|
-
__all__ = [
|
57
|
-
"mytypes",
|
58
|
-
"exceptions",
|
59
|
-
"utils",
|
60
|
-
"parsing",
|
61
|
-
"prompts",
|
62
|
-
"cachedb",
|
63
|
-
"language_models",
|
64
|
-
"embedding_models",
|
65
|
-
"vector_store",
|
66
|
-
"agent",
|
67
|
-
"Agent",
|
68
|
-
"AgentConfig",
|
69
|
-
"ChatAgent",
|
70
|
-
"ChatAgentConfig",
|
71
|
-
"StatusCode",
|
72
|
-
"ChatDocument",
|
73
|
-
"ChatDocMetaData",
|
74
|
-
"Task",
|
75
|
-
"TaskConfig",
|
76
|
-
"DocMetaData",
|
77
|
-
"Document",
|
78
|
-
"Entity",
|
79
|
-
"ToolMessage",
|
80
|
-
"run_batch_tasks",
|
81
|
-
"llm_response_batch",
|
82
|
-
"agent_response_batch",
|
83
|
-
"InfiniteLoopException",
|
84
|
-
"LangroidImportError",
|
85
|
-
]
|
86
|
-
|
87
|
-
|
88
|
-
try:
|
89
|
-
from .agent.callbacks.chainlit import (
|
90
|
-
ChainlitAgentCallbacks,
|
91
|
-
ChainlitTaskCallbacks,
|
92
|
-
ChainlitCallbackConfig,
|
93
|
-
)
|
94
|
-
|
95
|
-
ChainlitAgentCallbacks
|
96
|
-
ChainlitTaskCallbacks
|
97
|
-
ChainlitCallbackConfig
|
98
|
-
__all__.extend(
|
99
|
-
[
|
100
|
-
"ChainlitAgentCallbacks",
|
101
|
-
"ChainlitTaskCallbacks",
|
102
|
-
"ChainlitCallbackConfig",
|
103
|
-
]
|
104
|
-
)
|
105
|
-
except ImportError:
|
106
|
-
pass
|