langroid 0.31.0__tar.gz → 0.31.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.31.0 → langroid-0.31.1}/PKG-INFO +1 -1
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/chat_agent.py +12 -6
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tool_message.py +12 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/models.py +1 -1
- {langroid-0.31.0 → langroid-0.31.1}/pyproject.toml +2 -2
- {langroid-0.31.0 → langroid-0.31.1}/LICENSE +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/README.md +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/config.toml +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/bn.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/en-US.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/gu.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/he-IL.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/hi.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/kn.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/ml.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/mr.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/ta.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/te.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/.chainlit/translations/zh-CN.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/base.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/batch.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/callbacks/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/callbacks/chainlit.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/chat_document.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/helpers.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/junk +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/openai_assistant.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/arangodb/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/arangodb/arangodb_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/arangodb/system_messages.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/arangodb/tools.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/arangodb/utils.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/doc_chat_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/lance_doc_chat_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/lance_rag/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/lance_rag/critic_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/lance_rag/lance_rag_task.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/lance_rag/query_planner_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/lance_tools.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/neo4j/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/neo4j/csv_kg_chat.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/neo4j/system_messages.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/neo4j/tools.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/relevance_extractor_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/retriever_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/sql/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/sql/sql_chat_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/sql/utils/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/sql/utils/description_extractors.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/sql/utils/populate_metadata.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/sql/utils/system_message.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/sql/utils/tools.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/special/table_chat_agent.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/structured_message.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/task.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/duckduckgo_search_tool.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/file_tools.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/google_search_tool.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/metaphor_search_tool.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/orchestration.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/recipient_tool.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/retrieval_tool.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/rewind_tool.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/tools/segment_extract_tool.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/typed_task.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent/xml_tool_message.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/agent_config.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/cachedb/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/cachedb/base.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/cachedb/momento_cachedb.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/cachedb/redis_cachedb.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/base.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/clustering.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/protoc/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/protoc/embeddings.proto +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/protoc/embeddings_pb2.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/embedding_models/remote_embeds.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/exceptions.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/experimental/team-save.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/.chainlit/config.toml +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/.chainlit/translations/en-US.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/azure_openai.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/base.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/config.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/mock_lm.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/openai_gpt.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/prompt_formatter/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/prompt_formatter/base.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/prompt_formatter/hf_formatter.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/prompt_formatter/llama2_formatter.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/utils.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/mytypes.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/agent_chats.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/code-parsing.md +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/code_parser.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/config.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/document_parser.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/image_text.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/para_sentence_split.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/parse_json.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/parser.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/repo_loader.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/routing.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/search.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/spider.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/table_loader.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/url_loader.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/url_loader_cookies.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/urls.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/utils.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/parsing/web_search.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/prompts/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/prompts/chat-gpt4-system-prompt.md +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/prompts/dialog.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/prompts/prompts_config.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/prompts/templates.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/py.typed +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/pydantic_v1/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/pydantic_v1/main.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/.chainlit/config.toml +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/.chainlit/translations/en-US.json +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/algorithms/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/algorithms/graph.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/configuration.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/constants.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/docker.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/git_utils.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/globals.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/llms/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/llms/strings.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/logging.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/object_registry.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/output/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/output/citations.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/output/printing.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/output/status.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/pandas_utils.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/pydantic_utils.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/system.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/types.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/web/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/utils/web/login.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/__init__.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/base.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/chromadb.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/lancedb.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/meilisearch.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/momento.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/qdrant_cloud.py +0 -0
- {langroid-0.31.0 → langroid-0.31.1}/langroid/vector_store/qdrantdb.py +0 -0
@@ -450,17 +450,23 @@ class ChatAgent(Agent):
|
|
450
450
|
return ""
|
451
451
|
instructions = []
|
452
452
|
for msg_cls in enabled_classes:
|
453
|
-
if (
|
454
|
-
|
455
|
-
and inspect.ismethod(
|
456
|
-
|
457
|
-
|
453
|
+
if msg_cls.default_value("request") in self.llm_tools_usable:
|
454
|
+
class_instructions = ""
|
455
|
+
if hasattr(msg_cls, "instructions") and inspect.ismethod(
|
456
|
+
msg_cls.instructions
|
457
|
+
):
|
458
|
+
class_instructions = msg_cls.instructions()
|
459
|
+
if (
|
460
|
+
self.config.use_tools
|
461
|
+
and hasattr(msg_cls, "langroid_tools_instructions")
|
462
|
+
and inspect.ismethod(msg_cls.langroid_tools_instructions)
|
463
|
+
):
|
464
|
+
class_instructions += msg_cls.langroid_tools_instructions()
|
458
465
|
# example will be shown in tool_format_rules() when using TOOLs,
|
459
466
|
# so we don't need to show it here.
|
460
467
|
example = "" if self.config.use_tools else (msg_cls.usage_examples())
|
461
468
|
if example != "":
|
462
469
|
example = "EXAMPLES:\n" + example
|
463
|
-
class_instructions = msg_cls.instructions()
|
464
470
|
guidance = (
|
465
471
|
""
|
466
472
|
if class_instructions == ""
|
@@ -126,6 +126,18 @@ class ToolMessage(ABC, BaseModel):
|
|
126
126
|
|
127
127
|
@classmethod
|
128
128
|
def instructions(cls) -> str:
|
129
|
+
"""
|
130
|
+
Instructions on tool usage.
|
131
|
+
"""
|
132
|
+
return ""
|
133
|
+
|
134
|
+
@classmethod
|
135
|
+
def langroid_tools_instructions(cls) -> str:
|
136
|
+
"""
|
137
|
+
Instructions on tool usage when `use_tools == True`, i.e.
|
138
|
+
when using langroid built-in tools
|
139
|
+
(as opposed to OpenAI-like function calls/tools).
|
140
|
+
"""
|
129
141
|
return """
|
130
142
|
IMPORTANT: When using this or any other tool/function, you MUST include a
|
131
143
|
`request` field and set it equal to the FUNCTION/TOOL NAME you intend to use.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "langroid"
|
3
|
-
version = "0.31.
|
3
|
+
version = "0.31.1"
|
4
4
|
description = "Harness LLMs with Multi-Agent Programming"
|
5
5
|
authors = ["Prasad Chalasani <pchalasani@gmail.com>"]
|
6
6
|
readme = "README.md"
|
@@ -155,7 +155,7 @@ fastembed = ["fastembed"]
|
|
155
155
|
black = {extras = ["jupyter"], version = "^24.3.0"}
|
156
156
|
flake8 = "^6.0.0"
|
157
157
|
mypy = "^1.11.2"
|
158
|
-
ruff = "^0.
|
158
|
+
ruff = "^0.8.4"
|
159
159
|
pre-commit = "^3.3.2"
|
160
160
|
autopep8 = "^2.0.2"
|
161
161
|
|
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
|
{langroid-0.31.0 → langroid-0.31.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
|
{langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/.chainlit/translations/en-US.json
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
|
{langroid-0.31.0 → langroid-0.31.1}/langroid/language_models/prompt_formatter/hf_formatter.py
RENAMED
File without changes
|
{langroid-0.31.0 → langroid-0.31.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
|
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
|