swarmauri-core 0.5.0.dev1__tar.gz → 0.5.0.dev5__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.
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/PKG-INFO +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/ComponentBase.py +86 -70
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/__init__.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentConversation.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentParser.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChain.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainDependencyResolver.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainFactory.py +2 -2
- swarmauri_core-0.5.0.dev5/swarmauri_core/chains/__init__.py +1 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/conversations/IConversation.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/distances/IDistanceSimilarity.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/document_stores/IDocumentRetrieve.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/document_stores/IDocumentStore.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/documents/IExperimentDocument.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/embeddings/IVectorize.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/experiment_stores/IExperimentStore.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/experiment_stores/__init__.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/parsers/IParser.py +7 -2
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/schema_converters/ISchemaConvert.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarm_apis/IAgentRegistrationAPI.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarm.py +2 -2
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmAgentRegistration.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmFactory.py +3 -3
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/toolkits/IToolkit.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tracing/ITracer.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IDecompose.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/ISimilarity.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorStore.py +2 -2
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorStoreRetrieve.py +1 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/PKG-INFO +1 -1
- swarmauri_core-0.5.0.dev1/swarmauri_core/chains/__init__.py +0 -1
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/setup.cfg +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/setup.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_apis/IAgentCommands.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_apis/IAgentRouterCRUD.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_apis/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_factories/IAgentFactory.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_factories/IExportConf.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_factories/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgent.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentRetrieve.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentSystemContext.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentToolkit.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentVectorStore.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/ICallableChain.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainContext.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainContextLoader.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainStep.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chunkers/IChunker.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chunkers/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/conversations/IMaxSize.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/conversations/ISystemContext.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/conversations/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/distances/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/document_stores/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/documents/IDocument.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/documents/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/embeddings/IFeature.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/embeddings/ISaveModel.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/embeddings/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/llms/IFit.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/llms/IPredict.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/llms/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/messages/IMessage.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/messages/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/IMetric.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/IMetricAggregate.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/IMetricCalculate.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/IThreshold.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/parsers/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/prompts/IPrompt.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/prompts/IPromptMatrix.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/prompts/ITemplate.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/prompts/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/schema_converters/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarm_apis/ISwarmAPI.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarm_apis/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmChainCRUD.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmComponent.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmConfigurationExporter.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/toolkits/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tools/IParameter.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tools/ITool.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tools/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tracing/IChainTracer.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tracing/ITraceContext.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tracing/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/typing.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/utils/ITransactional.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/utils/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IAngleBetweenVectors.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/ICloudVectorStore.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IDivergence.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IGradient.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IOrthogonalProject.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IPersistentVectorStore.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IProject.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IReflect.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/ISimiliarityQuery.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorArithmetic.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorBasisCheck.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorLinearCombination.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorNorm.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorRotate.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorSpan.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorStoreSaveLoad.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/IVector.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/IVectorMeta.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/IVectorProduct.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/IVectorTransform.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/__init__.py +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/SOURCES.txt +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/dependency_links.txt +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/requires.txt +0 -0
- {swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: swarmauri_core
|
|
3
|
-
Version: 0.5.0.
|
|
3
|
+
Version: 0.5.0.dev5
|
|
4
4
|
Summary: This repository includes core interfaces, standard ABCs and concrete references, third party plugins, and experimental modules for the swarmaURI framework.
|
|
5
5
|
Home-page: http://github.com/swarmauri/swarmauri-sdk
|
|
6
6
|
Author: Jacob Stewart
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
from typing import (
|
|
2
|
-
Optional,
|
|
2
|
+
Optional,
|
|
3
3
|
List,
|
|
4
|
-
Literal,
|
|
5
|
-
TypeVar,
|
|
6
|
-
Type,
|
|
7
|
-
Union,
|
|
8
|
-
Annotated,
|
|
9
|
-
Generic,
|
|
10
|
-
ClassVar,
|
|
4
|
+
Literal,
|
|
5
|
+
TypeVar,
|
|
6
|
+
Type,
|
|
7
|
+
Union,
|
|
8
|
+
Annotated,
|
|
9
|
+
Generic,
|
|
10
|
+
ClassVar,
|
|
11
11
|
Set,
|
|
12
|
-
get_args
|
|
12
|
+
get_args,
|
|
13
|
+
)
|
|
13
14
|
|
|
14
15
|
from uuid import uuid4
|
|
15
16
|
from enum import Enum
|
|
@@ -17,41 +18,44 @@ import inspect
|
|
|
17
18
|
import hashlib
|
|
18
19
|
from pydantic import BaseModel, Field, field_validator
|
|
19
20
|
import logging
|
|
20
|
-
from
|
|
21
|
+
from swarmauri_core.typing import SubclassUnion
|
|
22
|
+
|
|
21
23
|
|
|
22
24
|
class ResourceTypes(Enum):
|
|
23
|
-
UNIVERSAL_BASE =
|
|
24
|
-
AGENT =
|
|
25
|
-
AGENT_FACTORY =
|
|
26
|
-
CHAIN =
|
|
27
|
-
CHAIN_METHOD =
|
|
28
|
-
CHUNKER =
|
|
29
|
-
CONVERSATION =
|
|
30
|
-
DISTANCE =
|
|
31
|
-
DOCUMENT_STORE =
|
|
32
|
-
DOCUMENT =
|
|
33
|
-
EMBEDDING =
|
|
34
|
-
EXCEPTION =
|
|
35
|
-
LLM =
|
|
36
|
-
MESSAGE =
|
|
37
|
-
METRIC =
|
|
38
|
-
PARSER =
|
|
39
|
-
PROMPT =
|
|
40
|
-
STATE =
|
|
41
|
-
CHAINSTEP =
|
|
42
|
-
SCHEMA_CONVERTER =
|
|
43
|
-
SWARM =
|
|
44
|
-
TOOLKIT =
|
|
45
|
-
TOOL =
|
|
46
|
-
PARAMETER =
|
|
47
|
-
TRACE =
|
|
48
|
-
UTIL =
|
|
49
|
-
VECTOR_STORE =
|
|
50
|
-
VECTOR =
|
|
25
|
+
UNIVERSAL_BASE = "ComponentBase"
|
|
26
|
+
AGENT = "Agent"
|
|
27
|
+
AGENT_FACTORY = "AgentFactory"
|
|
28
|
+
CHAIN = "Chain"
|
|
29
|
+
CHAIN_METHOD = "ChainMethod"
|
|
30
|
+
CHUNKER = "Chunker"
|
|
31
|
+
CONVERSATION = "Conversation"
|
|
32
|
+
DISTANCE = "Distance"
|
|
33
|
+
DOCUMENT_STORE = "DocumentStore"
|
|
34
|
+
DOCUMENT = "Document"
|
|
35
|
+
EMBEDDING = "Embedding"
|
|
36
|
+
EXCEPTION = "Exception"
|
|
37
|
+
LLM = "LLM"
|
|
38
|
+
MESSAGE = "Message"
|
|
39
|
+
METRIC = "Metric"
|
|
40
|
+
PARSER = "Parser"
|
|
41
|
+
PROMPT = "Prompt"
|
|
42
|
+
STATE = "State"
|
|
43
|
+
CHAINSTEP = "ChainStep"
|
|
44
|
+
SCHEMA_CONVERTER = "SchemaConverter"
|
|
45
|
+
SWARM = "Swarm"
|
|
46
|
+
TOOLKIT = "Toolkit"
|
|
47
|
+
TOOL = "Tool"
|
|
48
|
+
PARAMETER = "Parameter"
|
|
49
|
+
TRACE = "Trace"
|
|
50
|
+
UTIL = "Util"
|
|
51
|
+
VECTOR_STORE = "VectorStore"
|
|
52
|
+
VECTOR = "Vector"
|
|
53
|
+
|
|
51
54
|
|
|
52
55
|
def generate_id() -> str:
|
|
53
56
|
return str(uuid4())
|
|
54
57
|
|
|
58
|
+
|
|
55
59
|
class ComponentBase(BaseModel):
|
|
56
60
|
name: Optional[str] = None
|
|
57
61
|
id: str = Field(default_factory=generate_id)
|
|
@@ -60,61 +64,71 @@ class ComponentBase(BaseModel):
|
|
|
60
64
|
host: Optional[str] = None
|
|
61
65
|
resource: str = Field(default="ComponentBase")
|
|
62
66
|
version: str = "0.1.0"
|
|
63
|
-
__swm_subclasses__: ClassVar[Set[Type[
|
|
64
|
-
type: Literal[
|
|
65
|
-
|
|
67
|
+
__swm_subclasses__: ClassVar[Set[Type["ComponentBase"]]] = set()
|
|
68
|
+
type: Literal["ComponentBase"] = "ComponentBase"
|
|
66
69
|
|
|
67
70
|
def __init_subclass__(cls, **kwargs):
|
|
68
71
|
super().__init_subclass__(**kwargs)
|
|
69
72
|
ComponentBase.__swm_register_subclass__(cls)
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
|
|
72
74
|
@classmethod
|
|
73
75
|
def __swm_register_subclass__(cls, subclass) -> None:
|
|
74
|
-
logging.debug(
|
|
75
|
-
|
|
76
|
-
if
|
|
77
|
-
sub_type = subclass.__annotations__[
|
|
78
|
-
if sub_type not in [
|
|
76
|
+
logging.debug("__swm_register_subclass__ executed\n")
|
|
77
|
+
|
|
78
|
+
if "type" in subclass.__annotations__:
|
|
79
|
+
sub_type = subclass.__annotations__["type"]
|
|
80
|
+
if sub_type not in [
|
|
81
|
+
subclass.__annotations__["type"] for subclass in cls.__swm_subclasses__
|
|
82
|
+
]:
|
|
79
83
|
cls.__swm_subclasses__.add(subclass)
|
|
80
84
|
else:
|
|
81
|
-
logging.warning(
|
|
85
|
+
logging.warning(
|
|
86
|
+
f"Subclass {subclass.__name__} does not have a type annotation"
|
|
87
|
+
)
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
# [subclass.__swm_reset_class__() for subclass in cls.__swm_subclasses__
|
|
89
|
+
# [subclass.__swm_reset_class__() for subclass in cls.__swm_subclasses__
|
|
85
90
|
# if hasattr(subclass, '__swm_reset_class__')]
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
|
|
88
92
|
@classmethod
|
|
89
93
|
def __swm_reset_class__(cls):
|
|
90
|
-
logging.debug(
|
|
94
|
+
logging.debug("__swm_reset_class__ executed\n")
|
|
91
95
|
for each in cls.__fields__:
|
|
92
96
|
logging.debug(each, cls.__fields__[each].discriminator)
|
|
93
|
-
if
|
|
94
|
-
):
|
|
97
|
+
if cls.__fields__[each].discriminator and each in cls.__annotations__:
|
|
95
98
|
if len(get_args(cls.__fields__[each].annotation)) > 0:
|
|
96
99
|
for x in range(0, len(get_args(cls.__fields__[each].annotation))):
|
|
97
|
-
if hasattr(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
if hasattr(
|
|
101
|
+
get_args(cls.__fields__[each].annotation)[x], "__base__"
|
|
102
|
+
):
|
|
103
|
+
if (
|
|
104
|
+
hasattr(
|
|
105
|
+
get_args(cls.__fields__[each].annotation)[
|
|
106
|
+
x
|
|
107
|
+
].__base__,
|
|
108
|
+
"__swm_subclasses__",
|
|
109
|
+
)
|
|
110
|
+
and not get_args(cls.__fields__[each].annotation)[
|
|
111
|
+
x
|
|
112
|
+
].__base__.__name__
|
|
113
|
+
== "ComponentBase"
|
|
114
|
+
):
|
|
115
|
+
baseclass = get_args(cls.__fields__[each].annotation)[
|
|
116
|
+
x
|
|
117
|
+
].__base__
|
|
100
118
|
|
|
101
|
-
baseclass = get_args(cls.__fields__[each].annotation)[x].__base__
|
|
102
|
-
|
|
103
119
|
sc = SubclassUnion[baseclass]
|
|
104
|
-
|
|
120
|
+
|
|
105
121
|
cls.__annotations__[each] = sc
|
|
106
122
|
cls.__fields__[each].annotation = sc
|
|
107
123
|
|
|
108
|
-
|
|
109
|
-
# This is not necessary as the model_rebuild address forward_refs
|
|
124
|
+
# This is not necessary as the model_rebuild address forward_refs
|
|
110
125
|
# https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_post_init
|
|
111
|
-
# cls.update_forward_refs()
|
|
126
|
+
# cls.update_forward_refs()
|
|
112
127
|
cls.model_rebuild(force=True)
|
|
113
128
|
|
|
114
|
-
|
|
115
|
-
@field_validator('type')
|
|
129
|
+
@field_validator("type")
|
|
116
130
|
def set_type(cls, v, values):
|
|
117
|
-
if v ==
|
|
131
|
+
if v == "ComponentBase" and cls.__name__ != "ComponentBase":
|
|
118
132
|
return cls.__name__
|
|
119
133
|
return v
|
|
120
134
|
|
|
@@ -132,7 +146,9 @@ class ComponentBase(BaseModel):
|
|
|
132
146
|
methods = []
|
|
133
147
|
for attr_name in dir(cls):
|
|
134
148
|
attr_value = getattr(cls, attr_name)
|
|
135
|
-
if (callable(attr_value) and not attr_name.startswith("_")) or isinstance(
|
|
149
|
+
if (callable(attr_value) and not attr_name.startswith("_")) or isinstance(
|
|
150
|
+
attr_value, property
|
|
151
|
+
):
|
|
136
152
|
methods.append(attr_name)
|
|
137
153
|
return methods
|
|
138
154
|
|
|
@@ -160,4 +176,4 @@ class ComponentBase(BaseModel):
|
|
|
160
176
|
|
|
161
177
|
@property
|
|
162
178
|
def swm_isremote(self):
|
|
163
|
-
return bool(self.host)
|
|
179
|
+
return bool(self.host)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import Tuple, Dict, List, Optional
|
|
3
|
-
from swarmauri.
|
|
3
|
+
from swarmauri.chains.concrete.ChainStep import ChainStep
|
|
4
4
|
|
|
5
5
|
class IChainDependencyResolver(ABC):
|
|
6
6
|
@abstractmethod
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainFactory.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import List, Any, Dict
|
|
3
|
-
from
|
|
4
|
-
from
|
|
3
|
+
from swarmauri_core.chains.IChain import IChain
|
|
4
|
+
from swarmauri_core.chains.IChainStep import IChainStep
|
|
5
5
|
|
|
6
6
|
class IChainFactory(ABC):
|
|
7
7
|
"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from swarmauri_core.chains.ICallableChain import ICallableChain
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import Dict, Any, List, Optional
|
|
3
3
|
from datetime import datetime
|
|
4
|
-
from
|
|
4
|
+
from swarmauri_core.documents.IDocument import IDocument
|
|
5
5
|
|
|
6
6
|
class IExperimentDocument(IDocument, ABC):
|
|
7
7
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import List, Dict, Any, Union
|
|
3
|
-
from
|
|
3
|
+
from swarmauri_core.documents.IExperimentDocument import IExperimentDocument
|
|
4
4
|
|
|
5
5
|
class IExperimentStore(ABC):
|
|
6
6
|
"""
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/experiment_stores/__init__.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# core/experiment_stores/IExperimentStore.py
|
|
2
2
|
from abc import ABC, abstractmethod
|
|
3
3
|
from typing import List, Dict, Any, Union
|
|
4
|
-
from
|
|
4
|
+
from swarmauri_core.documents.IExperimentDocument import IExperimentDocument
|
|
5
5
|
|
|
6
6
|
class IExperimentStore(ABC):
|
|
7
7
|
"""
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import List, Union, Any
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
from swarmauri_core.documents.IDocument import IDocument
|
|
5
|
+
from typing_extensions import Annotated
|
|
6
|
+
|
|
7
|
+
FilePath = Annotated[str, "FilePath"]
|
|
8
|
+
|
|
4
9
|
|
|
5
10
|
class IParser(ABC):
|
|
6
11
|
"""
|
|
@@ -9,7 +14,7 @@ class IParser(ABC):
|
|
|
9
14
|
"""
|
|
10
15
|
|
|
11
16
|
@abstractmethod
|
|
12
|
-
def parse(self, data: Union[str,
|
|
17
|
+
def parse(self, data: Union[str, bytes, FilePath]) -> List[IDocument]:
|
|
13
18
|
"""
|
|
14
19
|
Public method to parse input data (either a str or a Message) into a list of Document instances.
|
|
15
20
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import Any, List, Dict
|
|
3
3
|
from datetime import datetime
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from swarmauri_core.agents.IAgent import IAgent
|
|
5
|
+
from swarmauri_core.chains.ICallableChain import ICallableChain
|
|
6
6
|
|
|
7
7
|
class ISwarm(ABC):
|
|
8
8
|
"""
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmFactory.py
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Type, Union
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
3
|
+
from swarmauri_core.swarms.ISwarm import ISwarm
|
|
4
|
+
from swarmauri_core.chains.ICallableChain import ICallableChain
|
|
5
|
+
from swarmauri_core.agents.IAgent import IAgent
|
|
6
6
|
|
|
7
7
|
class Step(NamedTuple):
|
|
8
8
|
description: str
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IDecompose.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import Tuple, List
|
|
3
|
-
from
|
|
3
|
+
from swarmauri_core.vectors.IVector import IVector # Assuming there's a base IVector interface for vector representations
|
|
4
4
|
|
|
5
5
|
class IDecompose(ABC):
|
|
6
6
|
"""
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorStore.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import List, Dict, Union
|
|
3
|
-
from
|
|
4
|
-
from
|
|
3
|
+
from swarmauri_core.vectors.IVector import IVector
|
|
4
|
+
from swarmauri_core.documents.IDocument import IDocument
|
|
5
5
|
|
|
6
6
|
class IVectorStore(ABC):
|
|
7
7
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: swarmauri_core
|
|
3
|
-
Version: 0.5.0.
|
|
3
|
+
Version: 0.5.0.dev5
|
|
4
4
|
Summary: This repository includes core interfaces, standard ABCs and concrete references, third party plugins, and experimental modules for the swarmaURI framework.
|
|
5
5
|
Home-page: http://github.com/swarmauri/swarmauri-sdk
|
|
6
6
|
Author: Jacob Stewart
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from swarmauri.core.chains.ICallableChain import ICallableChain
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_apis/IAgentCommands.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_apis/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agent_factories/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentRetrieve.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentSystemContext.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentToolkit.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/agents/IAgentVectorStore.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/ICallableChain.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainContext.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/chains/IChainContextLoader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/conversations/IMaxSize.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/conversations/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/distances/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/document_stores/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/documents/IDocument.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/documents/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/embeddings/IFeature.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/embeddings/ISaveModel.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/embeddings/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/IMetricAggregate.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/IMetricCalculate.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/metrics/IThreshold.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/prompts/IPromptMatrix.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/schema_converters/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarm_apis/ISwarmAPI.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarm_apis/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmChainCRUD.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/swarms/ISwarmComponent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tracing/IChainTracer.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/tracing/ITraceContext.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/utils/ITransactional.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IDivergence.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IGradient.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IProject.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IReflect.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorNorm.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/IVectorSpan.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vector_stores/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/IVectorMeta.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/IVectorProduct.py
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core/vectors/IVectorTransform.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/requires.txt
RENAMED
|
File without changes
|
{swarmauri_core-0.5.0.dev1 → swarmauri_core-0.5.0.dev5}/swarmauri_core.egg-info/top_level.txt
RENAMED
|
File without changes
|