euriai 1.0.6__py3-none-any.whl → 1.0.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.
- euriai/__init__.py +1 -1
- euriai/autogen.py +72 -5
- {euriai-1.0.6.dist-info → euriai-1.0.8.dist-info}/METADATA +1 -1
- {euriai-1.0.6.dist-info → euriai-1.0.8.dist-info}/RECORD +7 -7
- {euriai-1.0.6.dist-info → euriai-1.0.8.dist-info}/WHEEL +0 -0
- {euriai-1.0.6.dist-info → euriai-1.0.8.dist-info}/entry_points.txt +0 -0
- {euriai-1.0.6.dist-info → euriai-1.0.8.dist-info}/top_level.txt +0 -0
euriai/__init__.py
CHANGED
euriai/autogen.py
CHANGED
@@ -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,6 +272,16 @@ class EuriaiAutoGen:
|
|
231
272
|
Returns:
|
232
273
|
Configured AssistantAgent
|
233
274
|
"""
|
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:
|
282
|
+
from . import check_optional_dependency
|
283
|
+
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
284
|
+
|
234
285
|
# Create config for Euri API
|
235
286
|
config_list = [{
|
236
287
|
"model": model or self.default_model,
|
@@ -260,7 +311,7 @@ class EuriaiAutoGen:
|
|
260
311
|
is_termination_msg: Optional[callable] = None,
|
261
312
|
code_execution_config: Optional[Dict[str, Any]] = None,
|
262
313
|
**kwargs
|
263
|
-
) -> UserProxyAgent:
|
314
|
+
) -> "UserProxyAgent":
|
264
315
|
"""
|
265
316
|
Create a user proxy agent.
|
266
317
|
|
@@ -273,6 +324,16 @@ class EuriaiAutoGen:
|
|
273
324
|
Returns:
|
274
325
|
Configured UserProxyAgent
|
275
326
|
"""
|
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:
|
334
|
+
from . import check_optional_dependency
|
335
|
+
check_optional_dependency("pyautogen", "AutoGen", "autogen")
|
336
|
+
|
276
337
|
agent = UserProxyAgent(
|
277
338
|
name=name,
|
278
339
|
is_termination_msg=is_termination_msg,
|
@@ -306,6 +367,9 @@ class EuriaiAutoGen:
|
|
306
367
|
Returns:
|
307
368
|
Configured GroupChat
|
308
369
|
"""
|
370
|
+
# Ensure AutoGen classes are properly imported
|
371
|
+
_ensure_autogen_imports()
|
372
|
+
|
309
373
|
self.group_chat = GroupChat(
|
310
374
|
agents=agents,
|
311
375
|
messages=messages or [],
|
@@ -338,6 +402,9 @@ class EuriaiAutoGen:
|
|
338
402
|
Returns:
|
339
403
|
Configured GroupChatManager
|
340
404
|
"""
|
405
|
+
# Ensure AutoGen classes are properly imported
|
406
|
+
_ensure_autogen_imports()
|
407
|
+
|
341
408
|
# Create config for Euri API
|
342
409
|
config_list = [{
|
343
410
|
"model": model or self.default_model,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
euriai/__init__.py,sha256=
|
2
|
-
euriai/autogen.py,sha256=
|
1
|
+
euriai/__init__.py,sha256=gfkPrWaBzOwtzPHz4IaRIkr2euZTec0me8nMtxOlOeQ,6629
|
2
|
+
euriai/autogen.py,sha256=1AkzH0ctH4vR6kbPzYNzR2J6n9kdDpZIx9qQGgxl-Bg,18611
|
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
|
@@ -12,8 +12,8 @@ euriai/langgraph.py,sha256=sw9e-PnfwAwmp_tUCnAGIUB78GyJsMkAzxOGvFUafiM,34128
|
|
12
12
|
euriai/llamaindex.py,sha256=c-ujod2bjL6QIvfAyuIxm1SvSCS00URFElYybKQ5Ew0,26551
|
13
13
|
euriai/n8n.py,sha256=hjkckqyW_hZNL78UkBCof1WvKCKCIjwdvZdAgx6NrB8,3764
|
14
14
|
euriai/smolagents.py,sha256=xlixGx2IWzAPTpSJGsYIK2L-SHGY9Mw1-8GbwVsEYtU,28507
|
15
|
-
euriai-1.0.
|
16
|
-
euriai-1.0.
|
17
|
-
euriai-1.0.
|
18
|
-
euriai-1.0.
|
19
|
-
euriai-1.0.
|
15
|
+
euriai-1.0.8.dist-info/METADATA,sha256=SrcXi2Fcm7qHODmX1Du_XptolZTWvWR3WIXHfRYVGXs,6806
|
16
|
+
euriai-1.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
17
|
+
euriai-1.0.8.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
|
18
|
+
euriai-1.0.8.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
|
19
|
+
euriai-1.0.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|