langroid 0.34.0__tar.gz → 0.34.1__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.34.0 → langroid-0.34.1}/PKG-INFO +5 -1
- {langroid-0.34.0 → langroid-0.34.1}/README.md +4 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/doc_chat_agent.py +4 -6
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/parser.py +8 -7
- {langroid-0.34.0 → langroid-0.34.1}/pyproject.toml +1 -1
- {langroid-0.34.0 → langroid-0.34.1}/.gitignore +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/LICENSE +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/base.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/batch.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/callbacks/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/callbacks/chainlit.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/chat_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/chat_document.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/openai_assistant.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/arangodb/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/arangodb/arangodb_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/arangodb/system_messages.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/arangodb/tools.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/arangodb/utils.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/lance_doc_chat_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/lance_rag/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/lance_rag/critic_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/lance_rag/lance_rag_task.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/lance_rag/query_planner_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/lance_tools.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/neo4j/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/neo4j/csv_kg_chat.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/neo4j/system_messages.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/neo4j/tools.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/relevance_extractor_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/retriever_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/sql/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/sql/sql_chat_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/sql/utils/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/sql/utils/description_extractors.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/sql/utils/populate_metadata.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/sql/utils/system_message.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/sql/utils/tools.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/special/table_chat_agent.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/task.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tool_message.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/duckduckgo_search_tool.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/file_tools.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/google_search_tool.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/metaphor_search_tool.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/orchestration.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/recipient_tool.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/retrieval_tool.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/rewind_tool.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/tools/segment_extract_tool.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/agent/xml_tool_message.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/cachedb/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/cachedb/base.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/cachedb/momento_cachedb.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/cachedb/redis_cachedb.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/base.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/models.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/protoc/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/protoc/embeddings.proto +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/protoc/embeddings_pb2.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/embedding_models/remote_embeds.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/exceptions.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/azure_openai.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/base.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/config.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/mock_lm.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/openai_gpt.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/prompt_formatter/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/prompt_formatter/base.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/prompt_formatter/hf_formatter.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/prompt_formatter/llama2_formatter.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/language_models/utils.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/mytypes.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/agent_chats.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/code_parser.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/document_parser.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/para_sentence_split.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/parse_json.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/repo_loader.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/routing.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/search.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/spider.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/table_loader.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/url_loader.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/urls.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/utils.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/parsing/web_search.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/prompts/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/prompts/dialog.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/prompts/prompts_config.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/prompts/templates.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/py.typed +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/pydantic_v1/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/pydantic_v1/main.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/algorithms/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/algorithms/graph.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/configuration.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/constants.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/git_utils.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/globals.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/logging.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/object_registry.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/output/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/output/citations.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/output/printing.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/output/status.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/pandas_utils.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/pydantic_utils.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/system.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/utils/types.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/vector_store/__init__.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/vector_store/base.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/vector_store/chromadb.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/vector_store/lancedb.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/vector_store/meilisearch.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/vector_store/momento.py +0 -0
- {langroid-0.34.0 → langroid-0.34.1}/langroid/vector_store/qdrantdb.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: langroid
|
3
|
-
Version: 0.34.
|
3
|
+
Version: 0.34.1
|
4
4
|
Summary: Harness LLMs with Multi-Agent Programming
|
5
5
|
Author-email: Prasad Chalasani <pchalasani@gmail.com>
|
6
6
|
License: MIT
|
@@ -287,7 +287,11 @@ teacher_task.run()
|
|
287
287
|
<details>
|
288
288
|
<summary> <b>Click to expand</b></summary>
|
289
289
|
|
290
|
+
- **Jan 2025:**
|
291
|
+
- [0.33.0](https://github.com/langroid/langroid/releases/tag/0.33.3) Move from Poetry to uv!
|
292
|
+
- [0.32.0](https://github.com/langroid/langroid/releases/tag/0.32.0) DeepSeek v3 support.
|
290
293
|
- **Dec 2024:**
|
294
|
+
- [0.31.0](https://github.com/langroid/langroid/releases/tag/0.31.0) Azure OpenAI Embeddings
|
291
295
|
- [0.30.0](https://github.com/langroid/langroid/releases/tag/0.30.0) Llama-cpp embeddings.
|
292
296
|
- [0.29.0](https://github.com/langroid/langroid/releases/tag/0.29.0) Custom Azure OpenAI Client
|
293
297
|
- [0.28.0](https://github.com/langroid/langroid/releases/tag/0.28.0) `ToolMessage`: `_handler` field to override
|
@@ -135,7 +135,11 @@ teacher_task.run()
|
|
135
135
|
<details>
|
136
136
|
<summary> <b>Click to expand</b></summary>
|
137
137
|
|
138
|
+
- **Jan 2025:**
|
139
|
+
- [0.33.0](https://github.com/langroid/langroid/releases/tag/0.33.3) Move from Poetry to uv!
|
140
|
+
- [0.32.0](https://github.com/langroid/langroid/releases/tag/0.32.0) DeepSeek v3 support.
|
138
141
|
- **Dec 2024:**
|
142
|
+
- [0.31.0](https://github.com/langroid/langroid/releases/tag/0.31.0) Azure OpenAI Embeddings
|
139
143
|
- [0.30.0](https://github.com/langroid/langroid/releases/tag/0.30.0) Llama-cpp embeddings.
|
140
144
|
- [0.29.0](https://github.com/langroid/langroid/releases/tag/0.29.0) Custom Azure OpenAI Client
|
141
145
|
- [0.28.0](https://github.com/langroid/langroid/releases/tag/0.28.0) `ToolMessage`: `_handler` field to override
|
@@ -72,14 +72,13 @@ def apply_nest_asyncio() -> None:
|
|
72
72
|
|
73
73
|
logger = logging.getLogger(__name__)
|
74
74
|
|
75
|
-
DEFAULT_DOC_CHAT_INSTRUCTIONS = """
|
76
|
-
Your task is to answer questions about various documents.
|
77
|
-
You will be given various passages from these documents, and asked to answer questions
|
78
|
-
about them, or summarize them into coherent answers.
|
79
|
-
"""
|
80
75
|
|
81
76
|
DEFAULT_DOC_CHAT_SYSTEM_MESSAGE = """
|
82
77
|
You are a helpful assistant, helping me understand a collection of documents.
|
78
|
+
|
79
|
+
Your TASK is to answer questions about various documents.
|
80
|
+
You will be given various passages from these documents, and asked to answer questions
|
81
|
+
about them, or summarize them into coherent answers.
|
83
82
|
"""
|
84
83
|
|
85
84
|
CHUNK_ENRICHMENT_DELIMITER = "<##-##-##>"
|
@@ -113,7 +112,6 @@ class ChunkEnrichmentAgentConfig(ChatAgentConfig):
|
|
113
112
|
|
114
113
|
class DocChatAgentConfig(ChatAgentConfig):
|
115
114
|
system_message: str = DEFAULT_DOC_CHAT_SYSTEM_MESSAGE
|
116
|
-
user_message: str = DEFAULT_DOC_CHAT_INSTRUCTIONS
|
117
115
|
summarize_prompt: str = SUMMARY_ANSWER_PROMPT_GPT4
|
118
116
|
# extra fields to include in content as key=value pairs
|
119
117
|
# (helps retrieval for table-like data)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import logging
|
2
|
+
import re
|
2
3
|
from enum import Enum
|
3
4
|
from typing import Dict, List, Literal
|
4
5
|
|
@@ -250,12 +251,12 @@ class Parser:
|
|
250
251
|
continue
|
251
252
|
|
252
253
|
# Find the last period or punctuation mark in the chunk
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
)
|
254
|
+
punctuation_matches = [
|
255
|
+
(m.start(), m.group())
|
256
|
+
for m in re.finditer(r"(?:[.!?][\s\n]|\n)", chunk_text)
|
257
|
+
]
|
258
|
+
|
259
|
+
last_punctuation = max([pos for pos, _ in punctuation_matches] + [-1])
|
259
260
|
|
260
261
|
# If there is a punctuation mark, and the last punctuation index is
|
261
262
|
# after MIN_CHUNK_SIZE_CHARS
|
@@ -268,7 +269,7 @@ class Parser:
|
|
268
269
|
|
269
270
|
# Remove any newline characters and strip any leading or
|
270
271
|
# trailing whitespace
|
271
|
-
chunk_text_to_append =
|
272
|
+
chunk_text_to_append = re.sub(r"\n{2,}", "\n", chunk_text).strip()
|
272
273
|
|
273
274
|
if len(chunk_text_to_append) > self.config.discard_chunk_chars:
|
274
275
|
# Append the chunk text to the list of chunks
|
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
|
{langroid-0.34.0 → langroid-0.34.1}/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
|
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.34.0 → langroid-0.34.1}/langroid/language_models/prompt_formatter/hf_formatter.py
RENAMED
File without changes
|
{langroid-0.34.0 → langroid-0.34.1}/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
|