langroid 0.56.6__py3-none-any.whl → 0.56.8__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/agent/special/doc_chat_agent.py +3 -2
- langroid/agent/tools/task_tool.py +4 -0
- langroid/language_models/base.py +1 -1
- langroid/parsing/parser.py +1 -1
- {langroid-0.56.6.dist-info → langroid-0.56.8.dist-info}/METADATA +1 -1
- {langroid-0.56.6.dist-info → langroid-0.56.8.dist-info}/RECORD +8 -8
- {langroid-0.56.6.dist-info → langroid-0.56.8.dist-info}/WHEEL +0 -0
- {langroid-0.56.6.dist-info → langroid-0.56.8.dist-info}/licenses/LICENSE +0 -0
@@ -1403,8 +1403,9 @@ class DocChatAgent(ChatAgent):
|
|
1403
1403
|
# so we need to take the top n_similar_chunks from the combined list
|
1404
1404
|
passages = [
|
1405
1405
|
id2doc[id]
|
1406
|
-
for
|
1407
|
-
|
1406
|
+
for id, _ in list(id2_reciprocal_score.items())[
|
1407
|
+
: self.config.n_similar_chunks
|
1408
|
+
]
|
1408
1409
|
]
|
1409
1410
|
# passages must have distinct ids
|
1410
1411
|
assert len(passages) == len(set([d.id() for d in passages])), (
|
@@ -24,6 +24,7 @@ class TaskTool(ToolMessage):
|
|
24
24
|
will be generated.
|
25
25
|
"""
|
26
26
|
|
27
|
+
# TODO: setting up termination conditions of sub-task needs to be improved
|
27
28
|
request: str = "task_tool"
|
28
29
|
purpose: str = """
|
29
30
|
<HowToUse>
|
@@ -77,6 +78,7 @@ class TaskTool(ToolMessage):
|
|
77
78
|
To disable all tools, set it to a singleton list containing 'NONE'
|
78
79
|
""",
|
79
80
|
)
|
81
|
+
# TODO: ensure valid model name
|
80
82
|
model: str = Field(
|
81
83
|
default=None,
|
82
84
|
description="""
|
@@ -183,5 +185,7 @@ class TaskTool(ToolMessage):
|
|
183
185
|
"""
|
184
186
|
task = self._set_up_task(agent)
|
185
187
|
# Run the task on the prompt, and return the result
|
188
|
+
# TODO eventually allow the various task setup configs,
|
189
|
+
# including termination conditions
|
186
190
|
result = await task.run_async(self.prompt, turns=self.max_iterations or 10)
|
187
191
|
return result
|
langroid/language_models/base.py
CHANGED
@@ -78,7 +78,7 @@ class LLMConfig(BaseSettings):
|
|
78
78
|
completion_model: str = ""
|
79
79
|
temperature: float = 0.0
|
80
80
|
chat_context_length: int | None = None
|
81
|
-
async_stream_quiet: bool =
|
81
|
+
async_stream_quiet: bool = False # suppress streaming output in async mode?
|
82
82
|
completion_context_length: int | None = None
|
83
83
|
# if input length + max_output_tokens > context length of model,
|
84
84
|
# we will try shortening requested output
|
langroid/parsing/parser.py
CHANGED
@@ -120,7 +120,7 @@ class ParsingConfig(BaseSettings):
|
|
120
120
|
# aim to have at least this many chars per chunk when truncating due to punctuation
|
121
121
|
min_chunk_chars: int = 350
|
122
122
|
discard_chunk_chars: int = 5 # discard chunks with fewer than this many chars
|
123
|
-
n_similar_docs: Optional[int] =
|
123
|
+
n_similar_docs: Optional[int] = None # deprecated
|
124
124
|
n_neighbor_ids: int = 5 # window size to store around each chunk
|
125
125
|
separators: List[str] = ["\n\n", "\n", " ", ""]
|
126
126
|
token_encoding_model: str = "text-embedding-3-small"
|
@@ -15,7 +15,7 @@ langroid/agent/xml_tool_message.py,sha256=oeBKnJNoGaKdtz39XoWGMTNlVyXew2MWH5lgtY
|
|
15
15
|
langroid/agent/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
langroid/agent/callbacks/chainlit.py,sha256=4rJw07NIIVTIVvksVY08h5PdLE_kRoJItjbQM0UjRn0,20962
|
17
17
|
langroid/agent/special/__init__.py,sha256=gik_Xtm_zV7U9s30Mn8UX3Gyuy4jTjQe9zjiE3HWmEo,1273
|
18
|
-
langroid/agent/special/doc_chat_agent.py,sha256=
|
18
|
+
langroid/agent/special/doc_chat_agent.py,sha256=9Evo3d8iniCmU6Liw0lq2HElPcavHA_M9I7_kUMhrRk,68860
|
19
19
|
langroid/agent/special/doc_chat_task.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
langroid/agent/special/lance_doc_chat_agent.py,sha256=6pIqi2DF-MvYYN3-blsdUgulYnOBTl7I21T7wPAt1zM,10413
|
21
21
|
langroid/agent/special/lance_tools.py,sha256=qS8x4wi8mrqfbYV2ztFzrcxyhHQ0ZWOc-zkYiH7awj0,2105
|
@@ -54,7 +54,7 @@ langroid/agent/tools/recipient_tool.py,sha256=dr0yTxgNEIoxUYxH6TtaExC4G_8WdJ0xGo
|
|
54
54
|
langroid/agent/tools/retrieval_tool.py,sha256=zcAV20PP_6VzSd-UE-IJcabaBseFL_QNz59Bnig8-lE,946
|
55
55
|
langroid/agent/tools/rewind_tool.py,sha256=XAXL3BpNhCmBGYq_qi_sZfHJuIw7NY2jp4wnojJ7WRs,5606
|
56
56
|
langroid/agent/tools/segment_extract_tool.py,sha256=__srZ_VGYLVOdPrITUM8S0HpmX4q7r5FHWMDdHdEv8w,1440
|
57
|
-
langroid/agent/tools/task_tool.py,sha256=
|
57
|
+
langroid/agent/tools/task_tool.py,sha256=2qg3oRDYjF93pi7J0gwgBjPL4R9ByKH6yMwD-Cx8voo,7325
|
58
58
|
langroid/agent/tools/tavily_search_tool.py,sha256=soI-j0HdgVQLf09wRQScaEK4b5RpAX9C4cwOivRFWWI,1903
|
59
59
|
langroid/agent/tools/mcp/__init__.py,sha256=DJNM0VeFnFS3pJKCyFGggT8JVjVu0rBzrGzasT1HaSM,387
|
60
60
|
langroid/agent/tools/mcp/decorators.py,sha256=h7dterhsmvWJ8q4mp_OopmuG2DF71ty8cZwOyzdDZuk,1127
|
@@ -73,7 +73,7 @@ langroid/embedding_models/protoc/embeddings_pb2.pyi,sha256=UkNy7BrNsmQm0vLb3NtGX
|
|
73
73
|
langroid/embedding_models/protoc/embeddings_pb2_grpc.py,sha256=9dYQqkW3JPyBpSEjeGXTNpSqAkC-6FPtBHyteVob2Y8,2452
|
74
74
|
langroid/language_models/__init__.py,sha256=3aD2qC1lz8v12HX4B-dilv27gNxYdGdeu1QvDlkqqHs,1095
|
75
75
|
langroid/language_models/azure_openai.py,sha256=SW0Fp_y6HpERr9l6TtF6CYsKgKwjUf_hSL_2mhTV4wI,5034
|
76
|
-
langroid/language_models/base.py,sha256=
|
76
|
+
langroid/language_models/base.py,sha256=OlPgmhQS2o3Y5DLoO1IEBUp0kIOeQdYsZsd25sz7DY8,28485
|
77
77
|
langroid/language_models/config.py,sha256=9Q8wk5a7RQr8LGMT_0WkpjY8S4ywK06SalVRjXlfCiI,378
|
78
78
|
langroid/language_models/mock_lm.py,sha256=tA9JpURznsMZ59iRhFYMmaYQzAc0D0BT-PiJIV58sAk,4079
|
79
79
|
langroid/language_models/model_info.py,sha256=0e011vJZMi7XU9OkKT6doxlybrNJfMlP54klLDDNgFg,14939
|
@@ -94,7 +94,7 @@ langroid/parsing/file_attachment.py,sha256=ryJVhVFOhINrfkf9Z0vWTTwCnm80z2qzXgp20
|
|
94
94
|
langroid/parsing/md_parser.py,sha256=JUgsUpCaeAuBndmtDaJR9HMZaje1gmtXtaLXJHst3i8,21340
|
95
95
|
langroid/parsing/para_sentence_split.py,sha256=AJBzZojP3zpB-_IMiiHismhqcvkrVBQ3ZINoQyx_bE4,2000
|
96
96
|
langroid/parsing/parse_json.py,sha256=aADo38bAHQhC8on4aWZZzVzSDy-dK35vRLZsFI2ewh8,4756
|
97
|
-
langroid/parsing/parser.py,sha256=
|
97
|
+
langroid/parsing/parser.py,sha256=Wp_zVuKhWv42_nB0ZBvGU7PRuuFlk_MGBqnJckXX4BE,15626
|
98
98
|
langroid/parsing/pdf_utils.py,sha256=QogxU_B1N3WSLyZ9PEcJDaJoZShKs7CPQRVyF1V2DiE,3143
|
99
99
|
langroid/parsing/repo_loader.py,sha256=NpysuyzRHvgL3F4BB_wGo5sCUnZ3FOlVCJmZ7CaUdbs,30202
|
100
100
|
langroid/parsing/routing.py,sha256=-FcnlqldzL4ZoxuDwXjQPNHgBe9F9-F4R6q7b_z9CvI,1232
|
@@ -137,7 +137,7 @@ langroid/vector_store/pineconedb.py,sha256=otxXZNaBKb9f_H75HTaU3lMHiaR2NUp5MqwLZ
|
|
137
137
|
langroid/vector_store/postgres.py,sha256=wHPtIi2qM4fhO4pMQr95pz1ZCe7dTb2hxl4VYspGZoA,16104
|
138
138
|
langroid/vector_store/qdrantdb.py,sha256=O6dSBoDZ0jzfeVBd7LLvsXu083xs2fxXtPa9gGX3JX4,18443
|
139
139
|
langroid/vector_store/weaviatedb.py,sha256=Yn8pg139gOy3zkaPfoTbMXEEBCiLiYa1MU5d_3UA1K4,11847
|
140
|
-
langroid-0.56.
|
141
|
-
langroid-0.56.
|
142
|
-
langroid-0.56.
|
143
|
-
langroid-0.56.
|
140
|
+
langroid-0.56.8.dist-info/METADATA,sha256=waeMwWJeG_cwWJo8btFzQDdj1EbhDN2Ww1_YfXvRCBM,65744
|
141
|
+
langroid-0.56.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
142
|
+
langroid-0.56.8.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
|
143
|
+
langroid-0.56.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|