langroid 0.45.7__tar.gz → 0.45.10__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.45.7 → langroid-0.45.10}/PKG-INFO +2 -1
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/web_search.py +29 -16
- {langroid-0.45.7 → langroid-0.45.10}/pyproject.toml +2 -1
- {langroid-0.45.7 → langroid-0.45.10}/.gitignore +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/LICENSE +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/README.md +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/base.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/batch.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/callbacks/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/callbacks/chainlit.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/chat_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/chat_document.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/openai_assistant.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/arangodb/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/arangodb/arangodb_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/arangodb/system_messages.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/arangodb/tools.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/arangodb/utils.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/doc_chat_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/lance_doc_chat_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/lance_rag/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/lance_rag/critic_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/lance_rag/lance_rag_task.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/lance_rag/query_planner_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/lance_tools.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/neo4j/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/neo4j/csv_kg_chat.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/neo4j/system_messages.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/neo4j/tools.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/relevance_extractor_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/retriever_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/sql/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/sql/sql_chat_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/sql/utils/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/sql/utils/description_extractors.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/sql/utils/populate_metadata.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/sql/utils/system_message.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/sql/utils/tools.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/special/table_chat_agent.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/task.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tool_message.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/duckduckgo_search_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/exa_search_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/file_tools.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/google_search_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/metaphor_search_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/orchestration.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/recipient_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/retrieval_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/rewind_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/segment_extract_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/tools/tavily_search_tool.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/agent/xml_tool_message.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/cachedb/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/cachedb/base.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/cachedb/momento_cachedb.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/cachedb/redis_cachedb.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/base.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/models.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/protoc/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/protoc/embeddings.proto +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/protoc/embeddings_pb2.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/embedding_models/remote_embeds.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/exceptions.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/azure_openai.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/base.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/config.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/mock_lm.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/model_info.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/openai_gpt.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/prompt_formatter/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/prompt_formatter/base.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/prompt_formatter/hf_formatter.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/prompt_formatter/llama2_formatter.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/utils.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/mytypes.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/agent_chats.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/code_parser.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/document_parser.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/para_sentence_split.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/parse_json.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/parser.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/pdf_utils.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/repo_loader.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/routing.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/search.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/spider.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/table_loader.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/url_loader.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/urls.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/parsing/utils.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/prompts/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/prompts/dialog.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/prompts/prompts_config.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/prompts/templates.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/py.typed +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/pydantic_v1/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/pydantic_v1/main.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/algorithms/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/algorithms/graph.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/configuration.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/constants.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/git_utils.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/globals.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/logging.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/object_registry.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/output/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/output/citations.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/output/printing.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/output/status.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/pandas_utils.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/pydantic_utils.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/system.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/utils/types.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/__init__.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/base.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/chromadb.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/lancedb.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/meilisearch.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/pineconedb.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/postgres.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/qdrantdb.py +0 -0
- {langroid-0.45.7 → langroid-0.45.10}/langroid/vector_store/weaviatedb.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: langroid
|
3
|
-
Version: 0.45.
|
3
|
+
Version: 0.45.10
|
4
4
|
Summary: Harness LLMs with Multi-Agent Programming
|
5
5
|
Author-email: Prasad Chalasani <pchalasani@gmail.com>
|
6
6
|
License: MIT
|
@@ -93,6 +93,7 @@ Requires-Dist: python-socketio<6.0.0,>=5.11.0; extra == 'chainlit'
|
|
93
93
|
Provides-Extra: chromadb
|
94
94
|
Requires-Dist: chromadb<=0.4.23,>=0.4.21; extra == 'chromadb'
|
95
95
|
Provides-Extra: db
|
96
|
+
Requires-Dist: psycopg2-binary>=2.9.10; extra == 'db'
|
96
97
|
Requires-Dist: psycopg2<3.0.0,>=2.9.7; extra == 'db'
|
97
98
|
Requires-Dist: pymysql<2.0.0,>=1.1.0; extra == 'db'
|
98
99
|
Requires-Dist: sqlalchemy<3.0.0,>=2.0.19; extra == 'db'
|
@@ -28,7 +28,7 @@ class WebSearchResult:
|
|
28
28
|
def __init__(
|
29
29
|
self,
|
30
30
|
title: str,
|
31
|
-
link: str,
|
31
|
+
link: str | None,
|
32
32
|
max_content_length: int = 3500,
|
33
33
|
max_summary_length: int = 300,
|
34
34
|
):
|
@@ -50,6 +50,8 @@ class WebSearchResult:
|
|
50
50
|
return self.full_content[: self.max_summary_length]
|
51
51
|
|
52
52
|
def get_full_content(self) -> str:
|
53
|
+
if self.link is None:
|
54
|
+
return "Error: No Search Result"
|
53
55
|
try:
|
54
56
|
# First check headers only to get content length and type
|
55
57
|
head_response: Response = requests.head(self.link, timeout=5)
|
@@ -83,7 +85,7 @@ class WebSearchResult:
|
|
83
85
|
def to_dict(self) -> Dict[str, str]:
|
84
86
|
return {
|
85
87
|
"title": self.title,
|
86
|
-
"link": self.link,
|
88
|
+
"link": self.link or "",
|
87
89
|
"summary": self.summary,
|
88
90
|
"full_content": self.full_content,
|
89
91
|
}
|
@@ -175,21 +177,32 @@ def exa_search(query: str, num_results: int = 5) -> List[WebSearchResult]:
|
|
175
177
|
|
176
178
|
client = Exa(api_key=api_key)
|
177
179
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
raw_results = response.results
|
183
|
-
|
184
|
-
return [
|
185
|
-
WebSearchResult(
|
186
|
-
title=result.title or "",
|
187
|
-
link=result.url,
|
188
|
-
max_content_length=3500,
|
189
|
-
max_summary_length=300,
|
180
|
+
try:
|
181
|
+
response = client.search(
|
182
|
+
query=query,
|
183
|
+
num_results=num_results,
|
190
184
|
)
|
191
|
-
|
192
|
-
|
185
|
+
raw_results = response.results
|
186
|
+
|
187
|
+
return [
|
188
|
+
WebSearchResult(
|
189
|
+
title=result.title or "",
|
190
|
+
link=result.url,
|
191
|
+
max_content_length=3500,
|
192
|
+
max_summary_length=300,
|
193
|
+
)
|
194
|
+
for result in raw_results
|
195
|
+
if result.url is not None
|
196
|
+
]
|
197
|
+
except Exception:
|
198
|
+
return [
|
199
|
+
WebSearchResult(
|
200
|
+
title="Error",
|
201
|
+
link=None,
|
202
|
+
max_content_length=3500,
|
203
|
+
max_summary_length=300,
|
204
|
+
)
|
205
|
+
]
|
193
206
|
|
194
207
|
|
195
208
|
def duckduckgo_search(query: str, num_results: int = 5) -> List[WebSearchResult]:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "langroid"
|
3
|
-
version = "0.45.
|
3
|
+
version = "0.45.10"
|
4
4
|
authors = [
|
5
5
|
{name = "Prasad Chalasani", email = "pchalasani@gmail.com"},
|
6
6
|
]
|
@@ -90,6 +90,7 @@ vecdbs = [
|
|
90
90
|
db = [
|
91
91
|
"sqlalchemy<3.0.0,>=2.0.19",
|
92
92
|
"psycopg2<3.0.0,>=2.9.7",
|
93
|
+
"psycopg2-binary>=2.9.10",
|
93
94
|
"pymysql<2.0.0,>=1.1.0",
|
94
95
|
]
|
95
96
|
|
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.45.7 → langroid-0.45.10}/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.45.7 → langroid-0.45.10}/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
|
{langroid-0.45.7 → langroid-0.45.10}/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
|
File without changes
|
{langroid-0.45.7 → langroid-0.45.10}/langroid/language_models/prompt_formatter/hf_formatter.py
RENAMED
File without changes
|
{langroid-0.45.7 → langroid-0.45.10}/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
|