euriai 1.0.7__tar.gz → 1.0.8__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.
- {euriai-1.0.7 → euriai-1.0.8}/PKG-INFO +1 -1
- {euriai-1.0.7 → euriai-1.0.8}/euriai/__init__.py +1 -1
- {euriai-1.0.7 → euriai-1.0.8}/euriai/autogen.py +64 -17
- {euriai-1.0.7 → euriai-1.0.8}/euriai.egg-info/PKG-INFO +1 -1
- {euriai-1.0.7 → euriai-1.0.8}/setup.py +1 -1
- {euriai-1.0.7 → euriai-1.0.8}/README.md +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/cli.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/client.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/crewai.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/direct.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/embedding.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/euri_chat.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/euri_embed.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/langchain.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/langgraph.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/llamaindex.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/n8n.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai/smolagents.py +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai.egg-info/SOURCES.txt +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai.egg-info/dependency_links.txt +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai.egg-info/entry_points.txt +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai.egg-info/requires.txt +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/euriai.egg-info/top_level.txt +0 -0
- {euriai-1.0.7 → euriai-1.0.8}/setup.cfg +0 -0
@@ -9,6 +9,49 @@ except ImportError:
|
|
9
9
|
autogen = None
|
10
10
|
AssistantAgent = UserProxyAgent = GroupChat = GroupChatManager = None
|
11
11
|
|
12
|
+
def _ensure_autogen_imports():
|
13
|
+
"""Ensure AutoGen classes are properly imported."""
|
14
|
+
global autogen, AssistantAgent, UserProxyAgent, GroupChat, GroupChatManager
|
15
|
+
|
16
|
+
try:
|
17
|
+
# Force re-import of autogen module
|
18
|
+
import importlib
|
19
|
+
import sys
|
20
|
+
|
21
|
+
# Remove any cached modules to force fresh import
|
22
|
+
if 'autogen' in sys.modules:
|
23
|
+
importlib.reload(sys.modules['autogen'])
|
24
|
+
|
25
|
+
# Import the main module
|
26
|
+
import autogen as _autogen
|
27
|
+
|
28
|
+
# Import individual classes with explicit error handling
|
29
|
+
from autogen import AssistantAgent as _AssistantAgent
|
30
|
+
from autogen import UserProxyAgent as _UserProxyAgent
|
31
|
+
from autogen import GroupChat as _GroupChat
|
32
|
+
from autogen import GroupChatManager as _GroupChatManager
|
33
|
+
|
34
|
+
# Verify that all classes are not None
|
35
|
+
if _AssistantAgent is None or _UserProxyAgent is None:
|
36
|
+
raise ImportError("AutoGen classes imported as None")
|
37
|
+
|
38
|
+
# Update global variables
|
39
|
+
autogen = _autogen
|
40
|
+
AssistantAgent = _AssistantAgent
|
41
|
+
UserProxyAgent = _UserProxyAgent
|
42
|
+
GroupChat = _GroupChat
|
43
|
+
GroupChatManager = _GroupChatManager
|
44
|
+
|
45
|
+
# Verify the globals were updated
|
46
|
+
if AssistantAgent is None:
|
47
|
+
raise ImportError("Failed to update global AssistantAgent variable")
|
48
|
+
|
49
|
+
return True
|
50
|
+
|
51
|
+
except ImportError as e:
|
52
|
+
from . import check_optional_dependency
|
53
|
+
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
54
|
+
|
12
55
|
class EuriaiModelClient:
|
13
56
|
"""
|
14
57
|
Custom model client that uses Euri API for AutoGen integration.
|
@@ -197,9 +240,7 @@ class EuriaiAutoGen:
|
|
197
240
|
api_key: Your Euri API key
|
198
241
|
default_model: Default model to use
|
199
242
|
"""
|
200
|
-
|
201
|
-
from . import check_optional_dependency
|
202
|
-
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
243
|
+
_ensure_autogen_imports()
|
203
244
|
|
204
245
|
self.api_key = api_key
|
205
246
|
self.default_model = default_model
|
@@ -216,7 +257,7 @@ class EuriaiAutoGen:
|
|
216
257
|
temperature: float = 0.7,
|
217
258
|
max_tokens: int = 1000,
|
218
259
|
**kwargs
|
219
|
-
) -> AssistantAgent:
|
260
|
+
) -> "AssistantAgent":
|
220
261
|
"""
|
221
262
|
Create an assistant agent with Euri API integration.
|
222
263
|
|
@@ -231,8 +272,13 @@ class EuriaiAutoGen:
|
|
231
272
|
Returns:
|
232
273
|
Configured AssistantAgent
|
233
274
|
"""
|
234
|
-
#
|
235
|
-
|
275
|
+
# Import AutoGen classes directly to ensure they're available
|
276
|
+
try:
|
277
|
+
from autogen import AssistantAgent
|
278
|
+
# Verify the class is not None
|
279
|
+
if AssistantAgent is None:
|
280
|
+
raise ImportError("AutoGen AssistantAgent class is None")
|
281
|
+
except ImportError:
|
236
282
|
from . import check_optional_dependency
|
237
283
|
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
238
284
|
|
@@ -265,7 +311,7 @@ class EuriaiAutoGen:
|
|
265
311
|
is_termination_msg: Optional[callable] = None,
|
266
312
|
code_execution_config: Optional[Dict[str, Any]] = None,
|
267
313
|
**kwargs
|
268
|
-
) -> UserProxyAgent:
|
314
|
+
) -> "UserProxyAgent":
|
269
315
|
"""
|
270
316
|
Create a user proxy agent.
|
271
317
|
|
@@ -278,8 +324,13 @@ class EuriaiAutoGen:
|
|
278
324
|
Returns:
|
279
325
|
Configured UserProxyAgent
|
280
326
|
"""
|
281
|
-
#
|
282
|
-
|
327
|
+
# Import AutoGen classes directly to ensure they're available
|
328
|
+
try:
|
329
|
+
from autogen import UserProxyAgent
|
330
|
+
# Verify the class is not None
|
331
|
+
if UserProxyAgent is None:
|
332
|
+
raise ImportError("AutoGen UserProxyAgent class is None")
|
333
|
+
except ImportError:
|
283
334
|
from . import check_optional_dependency
|
284
335
|
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
285
336
|
|
@@ -316,10 +367,8 @@ class EuriaiAutoGen:
|
|
316
367
|
Returns:
|
317
368
|
Configured GroupChat
|
318
369
|
"""
|
319
|
-
#
|
320
|
-
|
321
|
-
from . import check_optional_dependency
|
322
|
-
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
370
|
+
# Ensure AutoGen classes are properly imported
|
371
|
+
_ensure_autogen_imports()
|
323
372
|
|
324
373
|
self.group_chat = GroupChat(
|
325
374
|
agents=agents,
|
@@ -353,10 +402,8 @@ class EuriaiAutoGen:
|
|
353
402
|
Returns:
|
354
403
|
Configured GroupChatManager
|
355
404
|
"""
|
356
|
-
#
|
357
|
-
|
358
|
-
from . import check_optional_dependency
|
359
|
-
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
405
|
+
# Ensure AutoGen classes are properly imported
|
406
|
+
_ensure_autogen_imports()
|
360
407
|
|
361
408
|
# Create config for Euri API
|
362
409
|
config_list = [{
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="euriai",
|
5
|
-
version="1.0.
|
5
|
+
version="1.0.8",
|
6
6
|
description="Python client for Euri API (euron.one) with CLI, LangChain, and LlamaIndex integration",
|
7
7
|
long_description=open("README.md", encoding="utf-8").read(),
|
8
8
|
long_description_content_type="text/markdown",
|
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
|