langroid 0.47.0__py3-none-any.whl → 0.47.2__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 +4 -5
- langroid/agent/special/retriever_agent.py +6 -4
- langroid/language_models/openai_gpt.py +2 -5
- {langroid-0.47.0.dist-info → langroid-0.47.2.dist-info}/METADATA +1 -1
- {langroid-0.47.0.dist-info → langroid-0.47.2.dist-info}/RECORD +7 -7
- {langroid-0.47.0.dist-info → langroid-0.47.2.dist-info}/WHEEL +0 -0
- {langroid-0.47.0.dist-info → langroid-0.47.2.dist-info}/licenses/LICENSE +0 -0
@@ -237,9 +237,7 @@ class DocChatAgent(ChatAgent):
|
|
237
237
|
self.chunked_docs: List[Document] = []
|
238
238
|
self.chunked_docs_clean: List[Document] = []
|
239
239
|
self.response: None | Document = None
|
240
|
-
|
241
|
-
if len(config.doc_paths) > 0:
|
242
|
-
self.ingest()
|
240
|
+
self.ingest()
|
243
241
|
|
244
242
|
def clear(self) -> None:
|
245
243
|
"""Clear the document collection and the specific collection in vecdb"""
|
@@ -275,8 +273,9 @@ class DocChatAgent(ChatAgent):
|
|
275
273
|
# But let's get all the chunked docs so we can
|
276
274
|
# do keyword and other non-vector searches
|
277
275
|
if self.vecdb is None:
|
278
|
-
|
279
|
-
|
276
|
+
logger.warning("VecDB not set: cannot ingest docs.")
|
277
|
+
else:
|
278
|
+
self.setup_documents(filter=self.config.filter)
|
280
279
|
return
|
281
280
|
self.ingest_doc_paths(self.config.doc_paths) # type: ignore
|
282
281
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"""
|
2
|
-
|
2
|
+
DEPRECATED: use DocChatAgent instead, with DocChatAgentConfig.retrieve_only=True,
|
3
3
|
and if you want to retrieve FULL relevant doc-contents rather than just extracts,
|
4
4
|
then set DocChatAgentConfig.extraction_granularity=-1
|
5
5
|
|
@@ -47,10 +47,12 @@ class RetrieverAgent(DocChatAgent):
|
|
47
47
|
)
|
48
48
|
|
49
49
|
def get_records(self) -> Sequence[Document]:
|
50
|
-
|
50
|
+
# subclasses should override
|
51
|
+
return []
|
51
52
|
|
52
53
|
def ingest(self) -> None:
|
53
54
|
records = self.get_records()
|
54
55
|
if self.vecdb is None:
|
55
|
-
|
56
|
-
|
56
|
+
logger.warning("Vector store not configured. Cannot ingest records.")
|
57
|
+
else:
|
58
|
+
self.vecdb.add_documents(records)
|
@@ -48,7 +48,6 @@ from langroid.language_models.base import (
|
|
48
48
|
from langroid.language_models.config import HFPromptFormatterConfig
|
49
49
|
from langroid.language_models.model_info import (
|
50
50
|
DeepSeekModel,
|
51
|
-
GeminiModel,
|
52
51
|
OpenAI_API_ParamInfo,
|
53
52
|
)
|
54
53
|
from langroid.language_models.model_info import (
|
@@ -672,10 +671,8 @@ class OpenAIGPT(LanguageModel):
|
|
672
671
|
return self.config.completion_model in openai_completion_models
|
673
672
|
|
674
673
|
def is_gemini_model(self) -> bool:
|
675
|
-
|
676
|
-
return self.chat_model_orig
|
677
|
-
"gemini/"
|
678
|
-
)
|
674
|
+
"""Are we using the gemini OpenAI-compatible API?"""
|
675
|
+
return self.chat_model_orig.startswith("gemini/")
|
679
676
|
|
680
677
|
def is_deepseek_model(self) -> bool:
|
681
678
|
deepseek_models = [e.value for e in DeepSeekModel]
|
@@ -14,11 +14,11 @@ langroid/agent/xml_tool_message.py,sha256=6SshYZJKIfi4mkE-gIoSwjkEYekQ8GwcSiCv7a
|
|
14
14
|
langroid/agent/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
15
|
langroid/agent/callbacks/chainlit.py,sha256=UHB6P_J40vsVnssosqkpkOVWRf9NK4TOY0_G2g_Arsg,20900
|
16
16
|
langroid/agent/special/__init__.py,sha256=gik_Xtm_zV7U9s30Mn8UX3Gyuy4jTjQe9zjiE3HWmEo,1273
|
17
|
-
langroid/agent/special/doc_chat_agent.py,sha256=
|
17
|
+
langroid/agent/special/doc_chat_agent.py,sha256=SrotZ0qw51fKDXlDP2lwTho0PPTuqUogFAT4jjq0ne0,65231
|
18
18
|
langroid/agent/special/lance_doc_chat_agent.py,sha256=s8xoRs0gGaFtDYFUSIRchsgDVbS5Q3C2b2mr3V1Fd-Q,10419
|
19
19
|
langroid/agent/special/lance_tools.py,sha256=qS8x4wi8mrqfbYV2ztFzrcxyhHQ0ZWOc-zkYiH7awj0,2105
|
20
20
|
langroid/agent/special/relevance_extractor_agent.py,sha256=zIx8GUdVo1aGW6ASla0NPQjYYIpmriK_TYMijqAx3F8,4796
|
21
|
-
langroid/agent/special/retriever_agent.py,sha256=
|
21
|
+
langroid/agent/special/retriever_agent.py,sha256=o2UfqiCGME0t85SZ6qjK041_WZYqXSuV1SeH_3KtVuc,1931
|
22
22
|
langroid/agent/special/table_chat_agent.py,sha256=d9v2wsblaRx7oMnKhLV7uO_ujvk9gh59pSGvBXyeyNc,9659
|
23
23
|
langroid/agent/special/arangodb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
24
|
langroid/agent/special/arangodb/arangodb_agent.py,sha256=12Y54c84c9qXV-YXRBcI5HaqyiY75JR4TmqlURYKJAM,25851
|
@@ -72,7 +72,7 @@ langroid/language_models/base.py,sha256=mDYmFCBCLdq8_Uvws4MiewwEgcOCP8Qb0e5yUXr3
|
|
72
72
|
langroid/language_models/config.py,sha256=9Q8wk5a7RQr8LGMT_0WkpjY8S4ywK06SalVRjXlfCiI,378
|
73
73
|
langroid/language_models/mock_lm.py,sha256=5BgHKDVRWFbUwDT_PFgTZXz9-k8wJSA2e3PZmyDgQ1k,4022
|
74
74
|
langroid/language_models/model_info.py,sha256=tfBBxL0iUf2mVN6CjcvqflzFUVg2oZqOJZexZ8jHTYA,12216
|
75
|
-
langroid/language_models/openai_gpt.py,sha256=
|
75
|
+
langroid/language_models/openai_gpt.py,sha256=JJXLw7iuQFbW0CkcKiYjX4agRllRhDaGT9Q8OCdEK-8,79559
|
76
76
|
langroid/language_models/utils.py,sha256=L4_CbihDMTGcsg0TOG1Yd5JFEto46--h7CX_14m89sQ,5016
|
77
77
|
langroid/language_models/prompt_formatter/__init__.py,sha256=2-5cdE24XoFDhifOLl8yiscohil1ogbP1ECkYdBlBsk,372
|
78
78
|
langroid/language_models/prompt_formatter/base.py,sha256=eDS1sgRNZVnoajwV_ZIha6cba5Dt8xjgzdRbPITwx3Q,1221
|
@@ -127,7 +127,7 @@ langroid/vector_store/pineconedb.py,sha256=otxXZNaBKb9f_H75HTaU3lMHiaR2NUp5MqwLZ
|
|
127
127
|
langroid/vector_store/postgres.py,sha256=wHPtIi2qM4fhO4pMQr95pz1ZCe7dTb2hxl4VYspGZoA,16104
|
128
128
|
langroid/vector_store/qdrantdb.py,sha256=O6dSBoDZ0jzfeVBd7LLvsXu083xs2fxXtPa9gGX3JX4,18443
|
129
129
|
langroid/vector_store/weaviatedb.py,sha256=Yn8pg139gOy3zkaPfoTbMXEEBCiLiYa1MU5d_3UA1K4,11847
|
130
|
-
langroid-0.47.
|
131
|
-
langroid-0.47.
|
132
|
-
langroid-0.47.
|
133
|
-
langroid-0.47.
|
130
|
+
langroid-0.47.2.dist-info/METADATA,sha256=1CsoTeRCHzsHCxHGocZ44e21J0anN0xNUtEamlfh85s,63473
|
131
|
+
langroid-0.47.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
132
|
+
langroid-0.47.2.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
|
133
|
+
langroid-0.47.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|