langroid 0.33.6__py3-none-any.whl → 0.33.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/__init__.py +106 -0
- langroid/agent/__init__.py +41 -0
- langroid/agent/base.py +1983 -0
- langroid/agent/batch.py +398 -0
- langroid/agent/callbacks/__init__.py +0 -0
- langroid/agent/callbacks/chainlit.py +598 -0
- langroid/agent/chat_agent.py +1899 -0
- langroid/agent/chat_document.py +454 -0
- langroid/agent/openai_assistant.py +882 -0
- langroid/agent/special/__init__.py +59 -0
- langroid/agent/special/arangodb/__init__.py +0 -0
- langroid/agent/special/arangodb/arangodb_agent.py +656 -0
- langroid/agent/special/arangodb/system_messages.py +186 -0
- langroid/agent/special/arangodb/tools.py +107 -0
- langroid/agent/special/arangodb/utils.py +36 -0
- langroid/agent/special/doc_chat_agent.py +1466 -0
- langroid/agent/special/lance_doc_chat_agent.py +262 -0
- langroid/agent/special/lance_rag/__init__.py +9 -0
- langroid/agent/special/lance_rag/critic_agent.py +198 -0
- langroid/agent/special/lance_rag/lance_rag_task.py +82 -0
- langroid/agent/special/lance_rag/query_planner_agent.py +260 -0
- langroid/agent/special/lance_tools.py +61 -0
- langroid/agent/special/neo4j/__init__.py +0 -0
- langroid/agent/special/neo4j/csv_kg_chat.py +174 -0
- langroid/agent/special/neo4j/neo4j_chat_agent.py +433 -0
- langroid/agent/special/neo4j/system_messages.py +120 -0
- langroid/agent/special/neo4j/tools.py +32 -0
- langroid/agent/special/relevance_extractor_agent.py +127 -0
- langroid/agent/special/retriever_agent.py +56 -0
- langroid/agent/special/sql/__init__.py +17 -0
- langroid/agent/special/sql/sql_chat_agent.py +654 -0
- langroid/agent/special/sql/utils/__init__.py +21 -0
- langroid/agent/special/sql/utils/description_extractors.py +190 -0
- langroid/agent/special/sql/utils/populate_metadata.py +85 -0
- langroid/agent/special/sql/utils/system_message.py +35 -0
- langroid/agent/special/sql/utils/tools.py +64 -0
- langroid/agent/special/table_chat_agent.py +263 -0
- langroid/agent/task.py +2099 -0
- langroid/agent/tool_message.py +393 -0
- langroid/agent/tools/__init__.py +38 -0
- langroid/agent/tools/duckduckgo_search_tool.py +50 -0
- langroid/agent/tools/file_tools.py +234 -0
- langroid/agent/tools/google_search_tool.py +39 -0
- langroid/agent/tools/metaphor_search_tool.py +68 -0
- langroid/agent/tools/orchestration.py +303 -0
- langroid/agent/tools/recipient_tool.py +235 -0
- langroid/agent/tools/retrieval_tool.py +32 -0
- langroid/agent/tools/rewind_tool.py +137 -0
- langroid/agent/tools/segment_extract_tool.py +41 -0
- langroid/agent/xml_tool_message.py +382 -0
- langroid/cachedb/__init__.py +17 -0
- langroid/cachedb/base.py +58 -0
- langroid/cachedb/momento_cachedb.py +108 -0
- langroid/cachedb/redis_cachedb.py +153 -0
- langroid/embedding_models/__init__.py +39 -0
- langroid/embedding_models/base.py +74 -0
- langroid/embedding_models/models.py +461 -0
- langroid/embedding_models/protoc/__init__.py +0 -0
- langroid/embedding_models/protoc/embeddings.proto +19 -0
- langroid/embedding_models/protoc/embeddings_pb2.py +33 -0
- langroid/embedding_models/protoc/embeddings_pb2.pyi +50 -0
- langroid/embedding_models/protoc/embeddings_pb2_grpc.py +79 -0
- langroid/embedding_models/remote_embeds.py +153 -0
- langroid/exceptions.py +71 -0
- langroid/language_models/__init__.py +53 -0
- langroid/language_models/azure_openai.py +153 -0
- langroid/language_models/base.py +678 -0
- langroid/language_models/config.py +18 -0
- langroid/language_models/mock_lm.py +124 -0
- langroid/language_models/openai_gpt.py +1964 -0
- langroid/language_models/prompt_formatter/__init__.py +16 -0
- langroid/language_models/prompt_formatter/base.py +40 -0
- langroid/language_models/prompt_formatter/hf_formatter.py +132 -0
- langroid/language_models/prompt_formatter/llama2_formatter.py +75 -0
- langroid/language_models/utils.py +151 -0
- langroid/mytypes.py +84 -0
- langroid/parsing/__init__.py +52 -0
- langroid/parsing/agent_chats.py +38 -0
- langroid/parsing/code_parser.py +121 -0
- langroid/parsing/document_parser.py +718 -0
- langroid/parsing/para_sentence_split.py +62 -0
- langroid/parsing/parse_json.py +155 -0
- langroid/parsing/parser.py +313 -0
- langroid/parsing/repo_loader.py +790 -0
- langroid/parsing/routing.py +36 -0
- langroid/parsing/search.py +275 -0
- langroid/parsing/spider.py +102 -0
- langroid/parsing/table_loader.py +94 -0
- langroid/parsing/url_loader.py +115 -0
- langroid/parsing/urls.py +273 -0
- langroid/parsing/utils.py +373 -0
- langroid/parsing/web_search.py +156 -0
- langroid/prompts/__init__.py +9 -0
- langroid/prompts/dialog.py +17 -0
- langroid/prompts/prompts_config.py +5 -0
- langroid/prompts/templates.py +141 -0
- langroid/pydantic_v1/__init__.py +10 -0
- langroid/pydantic_v1/main.py +4 -0
- langroid/utils/__init__.py +19 -0
- langroid/utils/algorithms/__init__.py +3 -0
- langroid/utils/algorithms/graph.py +103 -0
- langroid/utils/configuration.py +98 -0
- langroid/utils/constants.py +30 -0
- langroid/utils/git_utils.py +252 -0
- langroid/utils/globals.py +49 -0
- langroid/utils/logging.py +135 -0
- langroid/utils/object_registry.py +66 -0
- langroid/utils/output/__init__.py +20 -0
- langroid/utils/output/citations.py +41 -0
- langroid/utils/output/printing.py +99 -0
- langroid/utils/output/status.py +40 -0
- langroid/utils/pandas_utils.py +30 -0
- langroid/utils/pydantic_utils.py +602 -0
- langroid/utils/system.py +286 -0
- langroid/utils/types.py +93 -0
- langroid/vector_store/__init__.py +50 -0
- langroid/vector_store/base.py +359 -0
- langroid/vector_store/chromadb.py +214 -0
- langroid/vector_store/lancedb.py +406 -0
- langroid/vector_store/meilisearch.py +299 -0
- langroid/vector_store/momento.py +278 -0
- langroid/vector_store/qdrantdb.py +468 -0
- {langroid-0.33.6.dist-info → langroid-0.33.8.dist-info}/METADATA +95 -94
- langroid-0.33.8.dist-info/RECORD +127 -0
- {langroid-0.33.6.dist-info → langroid-0.33.8.dist-info}/WHEEL +1 -1
- langroid-0.33.6.dist-info/RECORD +0 -7
- langroid-0.33.6.dist-info/entry_points.txt +0 -4
- pyproject.toml +0 -356
- {langroid-0.33.6.dist-info → langroid-0.33.8.dist-info}/licenses/LICENSE +0 -0
langroid/__init__.py
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
"""
|
2
|
+
Main langroid package
|
3
|
+
"""
|
4
|
+
|
5
|
+
from . import mytypes
|
6
|
+
from . import utils
|
7
|
+
|
8
|
+
from . import parsing
|
9
|
+
from . import prompts
|
10
|
+
from . import cachedb
|
11
|
+
|
12
|
+
from . import language_models
|
13
|
+
from . import embedding_models
|
14
|
+
|
15
|
+
from . import vector_store
|
16
|
+
from . import agent
|
17
|
+
|
18
|
+
from .agent.base import (
|
19
|
+
Agent,
|
20
|
+
AgentConfig,
|
21
|
+
)
|
22
|
+
|
23
|
+
from .agent.batch import (
|
24
|
+
run_batch_tasks,
|
25
|
+
llm_response_batch,
|
26
|
+
agent_response_batch,
|
27
|
+
)
|
28
|
+
|
29
|
+
from .agent.chat_document import (
|
30
|
+
StatusCode,
|
31
|
+
ChatDocument,
|
32
|
+
ChatDocMetaData,
|
33
|
+
)
|
34
|
+
|
35
|
+
from .agent.tool_message import (
|
36
|
+
ToolMessage,
|
37
|
+
)
|
38
|
+
|
39
|
+
from .agent.chat_agent import (
|
40
|
+
ChatAgent,
|
41
|
+
ChatAgentConfig,
|
42
|
+
)
|
43
|
+
|
44
|
+
from .agent.task import Task, TaskConfig
|
45
|
+
|
46
|
+
|
47
|
+
from .mytypes import (
|
48
|
+
DocMetaData,
|
49
|
+
Document,
|
50
|
+
Entity,
|
51
|
+
)
|
52
|
+
|
53
|
+
from .exceptions import InfiniteLoopException
|
54
|
+
from .exceptions import LangroidImportError
|
55
|
+
|
56
|
+
__all__ = [
|
57
|
+
"mytypes",
|
58
|
+
"exceptions",
|
59
|
+
"utils",
|
60
|
+
"parsing",
|
61
|
+
"prompts",
|
62
|
+
"cachedb",
|
63
|
+
"language_models",
|
64
|
+
"embedding_models",
|
65
|
+
"vector_store",
|
66
|
+
"agent",
|
67
|
+
"Agent",
|
68
|
+
"AgentConfig",
|
69
|
+
"ChatAgent",
|
70
|
+
"ChatAgentConfig",
|
71
|
+
"StatusCode",
|
72
|
+
"ChatDocument",
|
73
|
+
"ChatDocMetaData",
|
74
|
+
"Task",
|
75
|
+
"TaskConfig",
|
76
|
+
"DocMetaData",
|
77
|
+
"Document",
|
78
|
+
"Entity",
|
79
|
+
"ToolMessage",
|
80
|
+
"run_batch_tasks",
|
81
|
+
"llm_response_batch",
|
82
|
+
"agent_response_batch",
|
83
|
+
"InfiniteLoopException",
|
84
|
+
"LangroidImportError",
|
85
|
+
]
|
86
|
+
|
87
|
+
|
88
|
+
try:
|
89
|
+
from .agent.callbacks.chainlit import (
|
90
|
+
ChainlitAgentCallbacks,
|
91
|
+
ChainlitTaskCallbacks,
|
92
|
+
ChainlitCallbackConfig,
|
93
|
+
)
|
94
|
+
|
95
|
+
ChainlitAgentCallbacks
|
96
|
+
ChainlitTaskCallbacks
|
97
|
+
ChainlitCallbackConfig
|
98
|
+
__all__.extend(
|
99
|
+
[
|
100
|
+
"ChainlitAgentCallbacks",
|
101
|
+
"ChainlitTaskCallbacks",
|
102
|
+
"ChainlitCallbackConfig",
|
103
|
+
]
|
104
|
+
)
|
105
|
+
except ImportError:
|
106
|
+
pass
|
@@ -0,0 +1,41 @@
|
|
1
|
+
from .base import Agent, AgentConfig
|
2
|
+
from .chat_document import (
|
3
|
+
ChatDocAttachment,
|
4
|
+
ChatDocMetaData,
|
5
|
+
ChatDocLoggerFields,
|
6
|
+
ChatDocument,
|
7
|
+
)
|
8
|
+
from .chat_agent import ChatAgentConfig, ChatAgent
|
9
|
+
from .tool_message import ToolMessage
|
10
|
+
from .task import Task
|
11
|
+
|
12
|
+
from . import base
|
13
|
+
from . import chat_document
|
14
|
+
from . import chat_agent
|
15
|
+
from . import task
|
16
|
+
from . import batch
|
17
|
+
from . import tool_message
|
18
|
+
from . import tools
|
19
|
+
from . import special
|
20
|
+
|
21
|
+
|
22
|
+
__all__ = [
|
23
|
+
"Agent",
|
24
|
+
"AgentConfig",
|
25
|
+
"ChatDocAttachment",
|
26
|
+
"ChatDocMetaData",
|
27
|
+
"ChatDocLoggerFields",
|
28
|
+
"ChatDocument",
|
29
|
+
"ChatAgent",
|
30
|
+
"ChatAgentConfig",
|
31
|
+
"ToolMessage",
|
32
|
+
"Task",
|
33
|
+
"base",
|
34
|
+
"chat_document",
|
35
|
+
"chat_agent",
|
36
|
+
"task",
|
37
|
+
"batch",
|
38
|
+
"tool_message",
|
39
|
+
"tools",
|
40
|
+
"special",
|
41
|
+
]
|