euriai 1.0.5__py3-none-any.whl → 1.0.6__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.
- euriai/__init__.py +111 -25
- euriai/direct.py +82 -0
- {euriai-1.0.5.dist-info → euriai-1.0.6.dist-info}/METADATA +1 -1
- {euriai-1.0.5.dist-info → euriai-1.0.6.dist-info}/RECORD +7 -6
- {euriai-1.0.5.dist-info → euriai-1.0.6.dist-info}/WHEEL +0 -0
- {euriai-1.0.5.dist-info → euriai-1.0.6.dist-info}/entry_points.txt +0 -0
- {euriai-1.0.5.dist-info → euriai-1.0.6.dist-info}/top_level.txt +0 -0
euriai/__init__.py
CHANGED
@@ -4,19 +4,33 @@ Euri AI Python SDK
|
|
4
4
|
A comprehensive Python SDK for the Euri AI API with integrations for popular frameworks.
|
5
5
|
"""
|
6
6
|
|
7
|
-
|
8
|
-
from .embedding import EuriaiEmbedding
|
7
|
+
__version__ = "1.0.6"
|
9
8
|
|
10
|
-
#
|
11
|
-
|
9
|
+
# Core imports that should always work
|
10
|
+
try:
|
11
|
+
from .client import EuriaiClient
|
12
|
+
except ImportError as e:
|
13
|
+
print(f"Warning: Could not import EuriaiClient: {e}")
|
14
|
+
EuriaiClient = None
|
12
15
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
try:
|
17
|
+
from .embedding import EuriaiEmbeddingClient
|
18
|
+
# Backward compatibility alias
|
19
|
+
EuriaiEmbedding = EuriaiEmbeddingClient
|
20
|
+
except ImportError as e:
|
21
|
+
print(f"Warning: Could not import EuriaiEmbeddingClient: {e}")
|
22
|
+
EuriaiEmbeddingClient = None
|
23
|
+
EuriaiEmbedding = None
|
18
24
|
|
25
|
+
# Main exports (only include what was successfully imported)
|
26
|
+
__all__ = []
|
27
|
+
if EuriaiClient is not None:
|
28
|
+
__all__.append("EuriaiClient")
|
29
|
+
if EuriaiEmbeddingClient is not None:
|
30
|
+
__all__.extend(["EuriaiEmbeddingClient", "EuriaiEmbedding"])
|
19
31
|
|
32
|
+
|
33
|
+
# Helper functions for optional dependencies
|
20
34
|
def check_optional_dependency(package_name: str, integration_name: str, install_extra: str = None) -> bool:
|
21
35
|
"""
|
22
36
|
Check if an optional dependency is installed and provide helpful installation instructions.
|
@@ -100,19 +114,91 @@ def install_optional_dependency(package_name: str, integration_name: str, instal
|
|
100
114
|
return False
|
101
115
|
|
102
116
|
|
103
|
-
#
|
104
|
-
def
|
105
|
-
"""Lazy import
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
117
|
+
# Lazy loading functions for optional integrations
|
118
|
+
def _get_langchain():
|
119
|
+
"""Lazy import for LangChain integration."""
|
120
|
+
try:
|
121
|
+
from . import langchain
|
122
|
+
return langchain
|
123
|
+
except ImportError:
|
124
|
+
check_optional_dependency("langchain-core", "LangChain", "langchain")
|
125
|
+
|
126
|
+
def _get_crewai():
|
127
|
+
"""Lazy import for CrewAI integration."""
|
128
|
+
try:
|
129
|
+
from . import crewai
|
130
|
+
return crewai
|
131
|
+
except ImportError:
|
132
|
+
check_optional_dependency("crewai", "CrewAI", "crewai")
|
133
|
+
|
134
|
+
def _get_autogen():
|
135
|
+
"""Lazy import for AutoGen integration."""
|
136
|
+
try:
|
137
|
+
from . import autogen
|
138
|
+
return autogen
|
139
|
+
except ImportError:
|
140
|
+
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
141
|
+
|
142
|
+
def _get_smolagents():
|
143
|
+
"""Lazy import for SmolAgents integration."""
|
144
|
+
try:
|
145
|
+
from . import smolagents
|
146
|
+
return smolagents
|
147
|
+
except ImportError:
|
148
|
+
check_optional_dependency("smolagents", "SmolAgents", "smolagents")
|
149
|
+
|
150
|
+
def _get_langgraph():
|
151
|
+
"""Lazy import for LangGraph integration."""
|
152
|
+
try:
|
153
|
+
from . import langgraph
|
154
|
+
return langgraph
|
155
|
+
except ImportError:
|
156
|
+
check_optional_dependency("langgraph", "LangGraph", "langgraph")
|
157
|
+
|
158
|
+
def _get_llamaindex():
|
159
|
+
"""Lazy import for LlamaIndex integration."""
|
160
|
+
try:
|
161
|
+
from . import llamaindex
|
162
|
+
return llamaindex
|
163
|
+
except ImportError:
|
164
|
+
check_optional_dependency("llama-index", "LlamaIndex", "llama-index")
|
165
|
+
|
166
|
+
|
167
|
+
# Create lazy loading properties
|
168
|
+
class _LazyLoader:
|
169
|
+
"""Lazy loader for optional integrations."""
|
170
|
+
|
171
|
+
@property
|
172
|
+
def langchain(self):
|
173
|
+
return _get_langchain()
|
174
|
+
|
175
|
+
@property
|
176
|
+
def crewai(self):
|
177
|
+
return _get_crewai()
|
178
|
+
|
179
|
+
@property
|
180
|
+
def autogen(self):
|
181
|
+
return _get_autogen()
|
182
|
+
|
183
|
+
@property
|
184
|
+
def smolagents(self):
|
185
|
+
return _get_smolagents()
|
186
|
+
|
187
|
+
@property
|
188
|
+
def langgraph(self):
|
189
|
+
return _get_langgraph()
|
190
|
+
|
191
|
+
@property
|
192
|
+
def llamaindex(self):
|
193
|
+
return _get_llamaindex()
|
194
|
+
|
195
|
+
|
196
|
+
# Create the lazy loader instance
|
197
|
+
_lazy = _LazyLoader()
|
198
|
+
|
199
|
+
# Make the integrations available as module-level attributes
|
200
|
+
def __getattr__(name: str):
|
201
|
+
"""Handle lazy loading of optional integrations."""
|
202
|
+
if hasattr(_lazy, name):
|
203
|
+
return getattr(_lazy, name)
|
204
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
euriai/direct.py
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
"""
|
2
|
+
Direct Import Module for Euri AI SDK
|
3
|
+
|
4
|
+
This module provides direct access to integrations without going through the main __init__.py,
|
5
|
+
which can be useful if there are import issues with the main package.
|
6
|
+
|
7
|
+
Usage:
|
8
|
+
# Instead of: from euriai.langchain import EuriaiChatModel
|
9
|
+
# Use: from euriai.direct import langchain_chat_model
|
10
|
+
|
11
|
+
from euriai.direct import langchain_chat_model, langchain_embeddings
|
12
|
+
|
13
|
+
chat_model = langchain_chat_model(
|
14
|
+
api_key="your-key",
|
15
|
+
model="gpt-4.1-nano"
|
16
|
+
)
|
17
|
+
"""
|
18
|
+
|
19
|
+
# Direct imports that bypass __init__.py
|
20
|
+
def langchain_chat_model(api_key: str, model: str = "gpt-4.1-nano", **kwargs):
|
21
|
+
"""Create a LangChain chat model directly."""
|
22
|
+
from .langchain import EuriaiChatModel
|
23
|
+
return EuriaiChatModel(api_key=api_key, model=model, **kwargs)
|
24
|
+
|
25
|
+
def langchain_llm(api_key: str, model: str = "gpt-4.1-nano", **kwargs):
|
26
|
+
"""Create a LangChain LLM directly."""
|
27
|
+
from .langchain import EuriaiLLM
|
28
|
+
return EuriaiLLM(api_key=api_key, model=model, **kwargs)
|
29
|
+
|
30
|
+
def langchain_embeddings(api_key: str, model: str = "text-embedding-3-small", **kwargs):
|
31
|
+
"""Create LangChain embeddings directly."""
|
32
|
+
from .langchain import EuriaiEmbeddings
|
33
|
+
return EuriaiEmbeddings(api_key=api_key, model=model, **kwargs)
|
34
|
+
|
35
|
+
def autogen_instance(api_key: str, default_model: str = "gpt-4.1-nano"):
|
36
|
+
"""Create an AutoGen instance directly."""
|
37
|
+
from .autogen import EuriaiAutoGen
|
38
|
+
return EuriaiAutoGen(api_key=api_key, default_model=default_model)
|
39
|
+
|
40
|
+
def crewai_instance(api_key: str, default_model: str = "gpt-4.1-nano", **kwargs):
|
41
|
+
"""Create a CrewAI instance directly."""
|
42
|
+
from .crewai import EuriaiCrewAI
|
43
|
+
return EuriaiCrewAI(api_key=api_key, default_model=default_model, **kwargs)
|
44
|
+
|
45
|
+
def client(api_key: str, model: str = "gpt-4.1-nano", **kwargs):
|
46
|
+
"""Create a basic Euri client directly."""
|
47
|
+
from .client import EuriaiClient
|
48
|
+
return EuriaiClient(api_key=api_key, model=model, **kwargs)
|
49
|
+
|
50
|
+
def embedding_client(api_key: str, model: str = "text-embedding-3-small"):
|
51
|
+
"""Create an embedding client directly."""
|
52
|
+
from .embedding import EuriaiEmbeddingClient
|
53
|
+
return EuriaiEmbeddingClient(api_key=api_key, model=model)
|
54
|
+
|
55
|
+
# Class exports for direct import
|
56
|
+
def get_langchain_classes():
|
57
|
+
"""Get LangChain classes for direct import."""
|
58
|
+
from .langchain import EuriaiChatModel, EuriaiLLM, EuriaiEmbeddings
|
59
|
+
return {
|
60
|
+
'EuriaiChatModel': EuriaiChatModel,
|
61
|
+
'EuriaiLLM': EuriaiLLM,
|
62
|
+
'EuriaiEmbeddings': EuriaiEmbeddings
|
63
|
+
}
|
64
|
+
|
65
|
+
def get_autogen_classes():
|
66
|
+
"""Get AutoGen classes for direct import."""
|
67
|
+
from .autogen import EuriaiAutoGen
|
68
|
+
return {'EuriaiAutoGen': EuriaiAutoGen}
|
69
|
+
|
70
|
+
def get_crewai_classes():
|
71
|
+
"""Get CrewAI classes for direct import."""
|
72
|
+
from .crewai import EuriaiCrewAI
|
73
|
+
return {'EuriaiCrewAI': EuriaiCrewAI}
|
74
|
+
|
75
|
+
def get_core_classes():
|
76
|
+
"""Get core classes for direct import."""
|
77
|
+
from .client import EuriaiClient
|
78
|
+
from .embedding import EuriaiEmbeddingClient
|
79
|
+
return {
|
80
|
+
'EuriaiClient': EuriaiClient,
|
81
|
+
'EuriaiEmbeddingClient': EuriaiEmbeddingClient
|
82
|
+
}
|
@@ -1,8 +1,9 @@
|
|
1
|
-
euriai/__init__.py,sha256=
|
1
|
+
euriai/__init__.py,sha256=9m4dUESDsDNgIxkzoZBSR7oNOCFD2YzLX-1IY3UR__E,6629
|
2
2
|
euriai/autogen.py,sha256=a_uKUn1FTxlFx7d7LwFnsM6TsdGbdecYxwujIp6xU0w,16044
|
3
3
|
euriai/cli.py,sha256=hF1wiiL2QQSfWf8WlLQyNVDBd4YkbiwmMSoPxVbyPTM,3290
|
4
4
|
euriai/client.py,sha256=L-o6hv9N3md-l-hz-kz5nYVaaZqnrREZlo_0jguhF7E,4066
|
5
5
|
euriai/crewai.py,sha256=nfMMOOhKiCIc2v42nj2Zf9rP0U5m4GrfK_6zkXL77gw,7594
|
6
|
+
euriai/direct.py,sha256=u0U_25r4866a2VsyqR2Q-cHJ6dgROOtmHkM-XoHmo68,3105
|
6
7
|
euriai/embedding.py,sha256=uP66Ph1k9Ou6J5RAkztJxlfyj0S0MESOvZ4ulhnVo-o,1270
|
7
8
|
euriai/euri_chat.py,sha256=DEAiet1ReRwB4ljkPYaTl1Nb5uc20-JF-3PQjGQZXk4,3567
|
8
9
|
euriai/euri_embed.py,sha256=g7zs1G-ZBDJjOGJtkkfIcV4LPtRcm9wpVWmrfMGn5EM,2919
|
@@ -11,8 +12,8 @@ euriai/langgraph.py,sha256=sw9e-PnfwAwmp_tUCnAGIUB78GyJsMkAzxOGvFUafiM,34128
|
|
11
12
|
euriai/llamaindex.py,sha256=c-ujod2bjL6QIvfAyuIxm1SvSCS00URFElYybKQ5Ew0,26551
|
12
13
|
euriai/n8n.py,sha256=hjkckqyW_hZNL78UkBCof1WvKCKCIjwdvZdAgx6NrB8,3764
|
13
14
|
euriai/smolagents.py,sha256=xlixGx2IWzAPTpSJGsYIK2L-SHGY9Mw1-8GbwVsEYtU,28507
|
14
|
-
euriai-1.0.
|
15
|
-
euriai-1.0.
|
16
|
-
euriai-1.0.
|
17
|
-
euriai-1.0.
|
18
|
-
euriai-1.0.
|
15
|
+
euriai-1.0.6.dist-info/METADATA,sha256=zY0bdGDLoGfz-o-eY9mGWmC1AIS1E0QPOWZIdNbyO9Y,6806
|
16
|
+
euriai-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
17
|
+
euriai-1.0.6.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
|
18
|
+
euriai-1.0.6.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
|
19
|
+
euriai-1.0.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|