euriai 1.0.4__py3-none-any.whl → 1.0.5__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 CHANGED
@@ -1,30 +1,118 @@
1
+ """
2
+ Euri AI Python SDK
3
+
4
+ A comprehensive Python SDK for the Euri AI API with integrations for popular frameworks.
5
+ """
6
+
1
7
  from .client import EuriaiClient
2
- from .langchain import EuriaiChatModel, EuriaiEmbeddings, EuriaiLLM, create_chat_model, create_embeddings, create_llm
3
- from .embedding import EuriaiEmbeddingClient
4
- from .euri_chat import EuriaiLlamaIndexLLM
5
- from .euri_embed import EuriaiLlamaIndexEmbedding
6
- from .crewai import EuriaiCrewAI
7
- from .autogen import EuriaiAutoGen
8
- from .llamaindex import EuriaiLlamaIndex
9
- from .langgraph import EuriaiLangGraph
10
- from .smolagents import EuriaiSmolAgent
11
- from .n8n import EuriaiN8N
8
+ from .embedding import EuriaiEmbedding
9
+
10
+ # Version
11
+ __version__ = "1.0.5"
12
12
 
13
+ # Main exports
13
14
  __all__ = [
14
- "EuriaiClient",
15
- "EuriaiEmbeddingClient",
16
- "EuriaiLlamaIndexLLM",
17
- "EuriaiLlamaIndexEmbedding",
18
- "EuriaiCrewAI",
19
- "EuriaiAutoGen",
20
- "EuriaiLlamaIndex",
21
- "EuriaiLangGraph",
22
- "EuriaiSmolAgent",
23
- "EuriaiN8N",
24
- "EuriaiChatModel",
25
- "EuriaiEmbeddings",
26
- "EuriaiLLM",
27
- "create_chat_model",
28
- "create_embeddings",
29
- "create_llm",
30
- ]
15
+ "EuriaiClient",
16
+ "EuriaiEmbedding"
17
+ ]
18
+
19
+
20
+ def check_optional_dependency(package_name: str, integration_name: str, install_extra: str = None) -> bool:
21
+ """
22
+ Check if an optional dependency is installed and provide helpful installation instructions.
23
+
24
+ Args:
25
+ package_name: The actual package name to import
26
+ integration_name: The friendly name for the integration
27
+ install_extra: The extras_require key for pip install euriai[extra]
28
+
29
+ Returns:
30
+ bool: True if package is available, False otherwise
31
+
32
+ Raises:
33
+ ImportError: With helpful installation instructions
34
+ """
35
+ try:
36
+ __import__(package_name)
37
+ return True
38
+ except ImportError:
39
+ extra_option = f"euriai[{install_extra}]" if install_extra else f"euriai[{integration_name.lower()}]"
40
+
41
+ error_msg = (
42
+ f"{integration_name} is not installed. Please install it using one of these methods:\n\n"
43
+ f"Option 1 (Recommended): Install with euriai extras:\n"
44
+ f" pip install {extra_option}\n\n"
45
+ f"Option 2: Install {integration_name} directly:\n"
46
+ f" pip install {package_name}\n\n"
47
+ f"Option 3: Install all euriai integrations:\n"
48
+ f" pip install euriai[all]\n"
49
+ )
50
+
51
+ raise ImportError(error_msg)
52
+
53
+
54
+ def install_optional_dependency(package_name: str, integration_name: str, install_extra: str = None) -> bool:
55
+ """
56
+ Attempt to automatically install an optional dependency (USE WITH CAUTION).
57
+
58
+ This function is provided for convenience but automatic installation can be risky.
59
+ It's generally better to install dependencies manually.
60
+
61
+ Args:
62
+ package_name: The actual package name to install
63
+ integration_name: The friendly name for the integration
64
+ install_extra: The extras_require key for pip install euriai[extra]
65
+
66
+ Returns:
67
+ bool: True if installation succeeded, False otherwise
68
+ """
69
+ import subprocess
70
+ import sys
71
+
72
+ try:
73
+ # Try to import first
74
+ __import__(package_name)
75
+ print(f"✓ {integration_name} is already installed")
76
+ return True
77
+ except ImportError:
78
+ pass
79
+
80
+ # Ask user for confirmation
81
+ extra_option = f"euriai[{install_extra}]" if install_extra else f"euriai[{integration_name.lower()}]"
82
+
83
+ print(f"🔍 {integration_name} is not installed.")
84
+ print(f"📦 Recommended installation: pip install {extra_option}")
85
+
86
+ response = input(f"Would you like to automatically install {package_name}? (y/N): ").lower()
87
+
88
+ if response in ['y', 'yes']:
89
+ try:
90
+ print(f"📥 Installing {package_name}...")
91
+ subprocess.check_call([sys.executable, "-m", "pip", "install", package_name])
92
+ print(f"✅ {integration_name} installed successfully!")
93
+ return True
94
+ except subprocess.CalledProcessError as e:
95
+ print(f"❌ Failed to install {package_name}: {e}")
96
+ print(f"💡 Try manually: pip install {extra_option}")
97
+ return False
98
+ else:
99
+ print(f"💡 To install manually run: pip install {extra_option}")
100
+ return False
101
+
102
+
103
+ # Optional integrations with lazy loading
104
+ def _lazy_import_with_check(module_name: str, package_name: str, integration_name: str, install_extra: str = None):
105
+ """Lazy import with automatic dependency checking."""
106
+ def _import():
107
+ check_optional_dependency(package_name, integration_name, install_extra)
108
+ from importlib import import_module
109
+ return import_module(f"euriai.{module_name}")
110
+ return _import
111
+
112
+ # Lazy imports for optional integrations
113
+ langchain = _lazy_import_with_check("langchain", "langchain-core", "LangChain", "langchain")
114
+ crewai = _lazy_import_with_check("crewai", "crewai", "CrewAI")
115
+ autogen = _lazy_import_with_check("autogen", "pyautogen", "AutoGen")
116
+ smolagents = _lazy_import_with_check("smolagents", "smolagents", "SmolAgents")
117
+ langgraph = _lazy_import_with_check("langgraph", "langgraph", "LangGraph")
118
+ llamaindex = _lazy_import_with_check("llamaindex", "llama-index", "LlamaIndex", "llama-index")
euriai/autogen.py CHANGED
@@ -198,7 +198,8 @@ class EuriaiAutoGen:
198
198
  default_model: Default model to use
199
199
  """
200
200
  if autogen is None:
201
- raise ImportError("AutoGen is not installed. Please install with `pip install pyautogen`.")
201
+ from . import check_optional_dependency
202
+ check_optional_dependency("pyautogen", "AutoGen", "autogen")
202
203
 
203
204
  self.api_key = api_key
204
205
  self.default_model = default_model
@@ -0,0 +1,251 @@
1
+ Metadata-Version: 2.4
2
+ Name: euriai
3
+ Version: 1.0.5
4
+ Summary: Python client for Euri API (euron.one) with CLI, LangChain, and LlamaIndex integration
5
+ Author: Euri
6
+ Author-email: tech@euron.one
7
+ License: MIT
8
+ Keywords: euriai,llm,langchain,llamaindex,langgraph,smolagents,n8n,agents,ai,sdk
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Intended Audience :: Developers
13
+ Requires-Python: >=3.6
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: requests
16
+ Requires-Dist: numpy
17
+ Requires-Dist: pyyaml
18
+ Provides-Extra: langchain-core
19
+ Requires-Dist: langchain-core; extra == "langchain-core"
20
+ Provides-Extra: langchain
21
+ Requires-Dist: langchain; extra == "langchain"
22
+ Provides-Extra: llama-index
23
+ Requires-Dist: llama-index>=0.10.0; extra == "llama-index"
24
+ Provides-Extra: langgraph
25
+ Requires-Dist: langgraph; extra == "langgraph"
26
+ Provides-Extra: smolagents
27
+ Requires-Dist: smolagents; extra == "smolagents"
28
+ Provides-Extra: n8n
29
+ Requires-Dist: requests; extra == "n8n"
30
+ Provides-Extra: crewai
31
+ Requires-Dist: crewai; extra == "crewai"
32
+ Provides-Extra: autogen
33
+ Requires-Dist: pyautogen; extra == "autogen"
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest; extra == "test"
36
+ Provides-Extra: all
37
+ Requires-Dist: langchain-core; extra == "all"
38
+ Requires-Dist: langchain; extra == "all"
39
+ Requires-Dist: llama-index>=0.10.0; extra == "all"
40
+ Requires-Dist: langgraph; extra == "all"
41
+ Requires-Dist: smolagents; extra == "all"
42
+ Requires-Dist: crewai; extra == "all"
43
+ Requires-Dist: pyautogen; extra == "all"
44
+ Dynamic: author
45
+ Dynamic: author-email
46
+ Dynamic: classifier
47
+ Dynamic: description
48
+ Dynamic: description-content-type
49
+ Dynamic: license
50
+ Dynamic: provides-extra
51
+ Dynamic: requires-dist
52
+ Dynamic: requires-python
53
+ Dynamic: summary
54
+
55
+ # Euri AI Python SDK
56
+
57
+ A comprehensive Python SDK for the Euri AI API with integrations for popular AI frameworks.
58
+
59
+ ## Installation
60
+
61
+ ### Basic Installation
62
+ ```bash
63
+ pip install euriai
64
+ ```
65
+
66
+ ### With Optional Integrations
67
+ ```bash
68
+ # Install specific integrations
69
+ pip install euriai[autogen] # AutoGen integration
70
+ pip install euriai[crewai] # CrewAI integration
71
+ pip install euriai[langchain] # LangChain integration
72
+ pip install euriai[smolagents] # SmolAgents integration
73
+ pip install euriai[langgraph] # LangGraph integration
74
+ pip install euriai[llama-index] # LlamaIndex integration
75
+
76
+ # Install all integrations
77
+ pip install euriai[all]
78
+ ```
79
+
80
+ ## Quick Start
81
+
82
+ ### Basic Usage
83
+ ```python
84
+ from euriai import EuriaiClient
85
+
86
+ # Initialize client
87
+ client = EuriaiClient(
88
+ api_key="your-euri-api-key",
89
+ model="gpt-4.1-nano"
90
+ )
91
+
92
+ # Generate completion
93
+ response = client.generate_completion(
94
+ prompt="What is artificial intelligence?",
95
+ temperature=0.7,
96
+ max_tokens=1000
97
+ )
98
+
99
+ print(response["choices"][0]["message"]["content"])
100
+ ```
101
+
102
+ ### Framework Integrations
103
+
104
+ The SDK provides seamless integrations with popular AI frameworks. Each integration is optional and can be installed separately.
105
+
106
+ #### AutoGen Integration
107
+ ```python
108
+ # This will automatically check if AutoGen is installed
109
+ # and provide helpful installation instructions if not
110
+ from euriai.autogen import EuriaiAutoGen
111
+
112
+ autogen = EuriaiAutoGen(
113
+ api_key="your-euri-api-key",
114
+ default_model="gpt-4.1-nano"
115
+ )
116
+ ```
117
+
118
+ #### CrewAI Integration
119
+ ```python
120
+ from euriai.crewai import EuriaiCrewAI
121
+
122
+ crew = EuriaiCrewAI(
123
+ api_key="your-euri-api-key",
124
+ default_model="gpt-4.1-nano"
125
+ )
126
+ ```
127
+
128
+ #### LangChain Integration
129
+ ```python
130
+ from euriai.langchain import EuriaiChatModel
131
+
132
+ chat_model = EuriaiChatModel(
133
+ api_key="your-euri-api-key",
134
+ model="gpt-4.1-nano"
135
+ )
136
+ ```
137
+
138
+ ### Handling Optional Dependencies
139
+
140
+ If you try to use an integration without installing its dependencies, you'll get helpful error messages:
141
+
142
+ ```python
143
+ try:
144
+ from euriai.autogen import EuriaiAutoGen
145
+ except ImportError as e:
146
+ print(e)
147
+ # This will show:
148
+ # AutoGen is not installed. Please install it using one of these methods:
149
+ #
150
+ # Option 1 (Recommended): Install with euriai extras:
151
+ # pip install euriai[autogen]
152
+ #
153
+ # Option 2: Install AutoGen directly:
154
+ # pip install pyautogen
155
+ #
156
+ # Option 3: Install all euriai integrations:
157
+ # pip install euriai[all]
158
+ ```
159
+
160
+ ### Semi-Automatic Installation (Optional)
161
+
162
+ For convenience, you can use the helper function to prompt for automatic installation:
163
+
164
+ ```python
165
+ from euriai import install_optional_dependency
166
+
167
+ # This will ask user permission before installing
168
+ if install_optional_dependency("pyautogen", "AutoGen", "autogen"):
169
+ from euriai.autogen import EuriaiAutoGen
170
+ # Now you can use AutoGen integration
171
+ ```
172
+
173
+ ## Available Models
174
+
175
+ - `gpt-4.1-nano` - Fast and efficient model
176
+ - `gpt-4.1-mini` - Balanced performance model
177
+ - `gemini-2.5-flash` - Google's Gemini model
178
+ - And more...
179
+
180
+ ## Framework Support
181
+
182
+ | Framework | Installation | Description |
183
+ |-----------|-------------|-------------|
184
+ | **AutoGen** | `pip install euriai[autogen]` | Multi-agent conversation framework |
185
+ | **CrewAI** | `pip install euriai[crewai]` | Role-playing AI agent framework |
186
+ | **LangChain** | `pip install euriai[langchain]` | Building applications with LLMs |
187
+ | **LangGraph** | `pip install euriai[langgraph]` | Building stateful, multi-actor applications |
188
+ | **SmolAgents** | `pip install euriai[smolagents]` | Minimalist agent framework |
189
+ | **LlamaIndex** | `pip install euriai[llama-index]` | Data framework for LLM applications |
190
+
191
+ ## Examples
192
+
193
+ ### AutoGen Multi-Agent Chat
194
+ ```python
195
+ from euriai.autogen import EuriaiAutoGen
196
+
197
+ autogen = EuriaiAutoGen(api_key="your-api-key")
198
+
199
+ assistant = autogen.create_assistant_agent(
200
+ name="Assistant",
201
+ model="gpt-4.1-nano"
202
+ )
203
+
204
+ user_proxy = autogen.create_user_proxy_agent(
205
+ name="User",
206
+ human_input_mode="NEVER"
207
+ )
208
+
209
+ result = autogen.run_chat(
210
+ agent1=user_proxy,
211
+ agent2=assistant,
212
+ message="Explain quantum computing",
213
+ max_turns=3
214
+ )
215
+ ```
216
+
217
+ ### CrewAI Workflow
218
+ ```python
219
+ from euriai.crewai import EuriaiCrewAI
220
+
221
+ crew = EuriaiCrewAI(api_key="your-api-key")
222
+
223
+ crew.add_agent("researcher", {
224
+ "role": "Researcher",
225
+ "goal": "Research {topic}",
226
+ "backstory": "Expert researcher with analytical skills",
227
+ "model": "gpt-4.1-nano"
228
+ })
229
+
230
+ crew.add_task("research_task", {
231
+ "description": "Research the given topic",
232
+ "expected_output": "Comprehensive research report",
233
+ "agent": "researcher"
234
+ })
235
+
236
+ result = crew.run(inputs={"topic": "AI in Healthcare"})
237
+ ```
238
+
239
+ ## API Reference
240
+
241
+ For detailed API documentation, visit: [https://euron.one/euri](https://euron.one/euri)
242
+
243
+ ## Support
244
+
245
+ - **Documentation**: [https://docs.euron.one](https://euron.one/euri)
246
+ - **GitHub**: [https://github.com/euri-ai/euriai-python-sdk](https://github.com/euri-ai/euriai-python-sdk)
247
+ - **Email**: tech@euron.one
248
+
249
+ ## License
250
+
251
+ MIT License - see LICENSE file for details.
@@ -1,5 +1,5 @@
1
- euriai/__init__.py,sha256=WE4zl0HNxDm4zwR3d0uRyjl3fjcD_pccKvPsbtuDysw,916
2
- euriai/autogen.py,sha256=4YAHrY65YYOKVsBjQa9G8pr-_Xxss1uR08qLAFzo7Rk,16023
1
+ euriai/__init__.py,sha256=P1kgfg-wUrzUOMPu5hIuwogi75xW69S5GJe2_ELvo8s,4541
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
@@ -11,8 +11,8 @@ euriai/langgraph.py,sha256=sw9e-PnfwAwmp_tUCnAGIUB78GyJsMkAzxOGvFUafiM,34128
11
11
  euriai/llamaindex.py,sha256=c-ujod2bjL6QIvfAyuIxm1SvSCS00URFElYybKQ5Ew0,26551
12
12
  euriai/n8n.py,sha256=hjkckqyW_hZNL78UkBCof1WvKCKCIjwdvZdAgx6NrB8,3764
13
13
  euriai/smolagents.py,sha256=xlixGx2IWzAPTpSJGsYIK2L-SHGY9Mw1-8GbwVsEYtU,28507
14
- euriai-1.0.4.dist-info/METADATA,sha256=W-vrzgWEy1eDQLuzM31kI278KnEl6rVP81LBwPN1Db8,8417
15
- euriai-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- euriai-1.0.4.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
17
- euriai-1.0.4.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
18
- euriai-1.0.4.dist-info/RECORD,,
14
+ euriai-1.0.5.dist-info/METADATA,sha256=CJxhIdp9ydjeH4QtwA8PTd-abReVJ4eqt94diMDNLlU,6806
15
+ euriai-1.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ euriai-1.0.5.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
17
+ euriai-1.0.5.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
18
+ euriai-1.0.5.dist-info/RECORD,,
@@ -1,331 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: euriai
3
- Version: 1.0.4
4
- Summary: Python client for Euri API (euron.one) with CLI, LangChain, and LlamaIndex integration
5
- Author: Euri
6
- Author-email: tech@euron.one
7
- License: MIT
8
- Keywords: euriai,llm,langchain,llamaindex,langgraph,smolagents,n8n,agents,ai,sdk
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Operating System :: OS Independent
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Intended Audience :: Developers
13
- Requires-Python: >=3.6
14
- Description-Content-Type: text/markdown
15
- Requires-Dist: requests
16
- Requires-Dist: numpy
17
- Requires-Dist: pyyaml
18
- Provides-Extra: langchain-core
19
- Requires-Dist: langchain-core; extra == "langchain-core"
20
- Provides-Extra: langchain
21
- Requires-Dist: langchain; extra == "langchain"
22
- Provides-Extra: llama-index
23
- Requires-Dist: llama-index>=0.10.0; extra == "llama-index"
24
- Provides-Extra: langgraph
25
- Requires-Dist: langgraph; extra == "langgraph"
26
- Provides-Extra: smolagents
27
- Requires-Dist: smolagents; extra == "smolagents"
28
- Provides-Extra: n8n
29
- Requires-Dist: requests; extra == "n8n"
30
- Provides-Extra: crewai
31
- Requires-Dist: crewai; extra == "crewai"
32
- Provides-Extra: autogen
33
- Requires-Dist: pyautogen; extra == "autogen"
34
- Provides-Extra: test
35
- Requires-Dist: pytest; extra == "test"
36
- Dynamic: author
37
- Dynamic: author-email
38
- Dynamic: classifier
39
- Dynamic: description
40
- Dynamic: description-content-type
41
- Dynamic: license
42
- Dynamic: provides-extra
43
- Dynamic: requires-dist
44
- Dynamic: requires-python
45
- Dynamic: summary
46
-
47
- # euriai 🧠
48
-
49
- **EURI AI Python Client** – A simple wrapper and CLI tool for the [Euri API](https://euron.one/euri). Supports completions, streaming responses, embeddings, CLI interaction, and an interactive guided wizard!
50
-
51
- ---
52
-
53
- ## 🔧 Installation
54
-
55
- ### Basic Installation
56
- ```bash
57
- pip install euriai
58
- ```
59
-
60
- ### Framework-Specific Installation
61
- For framework integrations, install the specific extras you need:
62
-
63
- ```bash
64
- # For LangChain integration
65
- pip install euriai[langchain]
66
-
67
- # For LlamaIndex integration
68
- pip install euriai[llama-index]
69
-
70
- # For LangGraph integration
71
- pip install euriai[langgraph]
72
-
73
- # For CrewAI integration
74
- pip install euriai[crewai]
75
-
76
- # For AutoGen integration
77
- pip install euriai[autogen]
78
-
79
- # For SmolAgents integration
80
- pip install euriai[smolagents]
81
-
82
- # Install multiple frameworks
83
- pip install euriai[langchain,llama-index,langgraph]
84
-
85
- # Install all frameworks
86
- pip install euriai[langchain,llama-index,langgraph,crewai,autogen,smolagents]
87
- ```
88
-
89
- > **Note**: The n8n integration only requires the base installation as it uses standard HTTP requests.
90
-
91
- ---
92
-
93
- ## 🚀 Python Usage
94
-
95
- ### Text Generation
96
-
97
- ```python
98
- from euriai import EuriaiClient
99
-
100
- client = EuriaiClient(
101
- api_key="your_api_key_here",
102
- model="gpt-4.1-nano" # You can also try: "gemini-2.0-flash-001", "llama-4-maverick", etc.
103
- )
104
-
105
- response = client.generate_completion(
106
- prompt="Write a short poem about artificial intelligence.",
107
- temperature=0.7,
108
- max_tokens=300
109
- )
110
-
111
- print(response)
112
- ```
113
-
114
- ### Embeddings
115
-
116
- ```python
117
- from euriai.embedding import EuriaiEmbeddingClient
118
-
119
- client = EuriaiEmbeddingClient(api_key="your_key")
120
- embedding = client.embed("Hello world")
121
- print(embedding[:5]) # Print first 5 dimensions of the embedding vector
122
- ```
123
-
124
- ## 💻 Command-Line Interface (CLI) Usage
125
-
126
- Run prompts directly from the terminal:
127
-
128
- ```bash
129
- euriai --api_key YOUR_API_KEY --prompt "Tell me a joke"
130
- ```
131
-
132
- Enable streaming output (if supported by the model):
133
-
134
- ```bash
135
- euriai --api_key YOUR_API_KEY --prompt "Stream a fun fact" --stream
136
- ```
137
-
138
- List all supported model IDs with recommended use-cases and temperature/token advice:
139
-
140
- ```bash
141
- euriai --models
142
- ```
143
-
144
- ## 🤖 Framework Integrations
145
-
146
- ### LangChain Integration
147
-
148
- **Installation**: `pip install euriai[langchain]`
149
-
150
- #### Text Generation
151
-
152
- Use Euriai with LangChain directly:
153
-
154
- ```python
155
- from euriai import EuriaiChatModel
156
-
157
- llm = EuriaiChatModel(
158
- api_key="your_api_key",
159
- model="gpt-4.1-nano",
160
- temperature=0.7,
161
- max_tokens=300
162
- )
163
-
164
- print(llm.invoke("Write a poem about time travel."))
165
- ```
166
-
167
- #### Embeddings
168
-
169
- Use Euriai embeddings with LangChain:
170
-
171
- ```python
172
- from euriai import EuriaiEmbeddings
173
-
174
- embedding_model = EuriaiEmbeddings(api_key="your_key")
175
- print(embedding_model.embed_query("What's AI?")[:5]) # Print first 5 dimensions
176
- ```
177
-
178
- ### LlamaIndex Integration
179
-
180
- **Installation**: `pip install euriai[llama-index]`
181
-
182
- ```python
183
- from euriai import EuriaiLlamaIndex
184
-
185
- llama = EuriaiLlamaIndex(api_key="your_api_key")
186
- llama.add_documents([
187
- "Abraham Lincoln was the 16th President of the United States.",
188
- "He led the country during the American Civil War."
189
- ])
190
- llama.build_index()
191
- response = llama.query("Who was Abraham Lincoln?")
192
- print(response)
193
- ```
194
-
195
- ### LangGraph Integration
196
-
197
- **Installation**: `pip install euriai[langgraph]`
198
-
199
- ```python
200
- from euriai import EuriaiLangGraph
201
-
202
- def greet_node(state):
203
- print(f"Hello, {state['name']}!")
204
- state['greeted'] = True
205
- return state
206
-
207
- def farewell_node(state):
208
- if state.get('greeted'):
209
- print(f"Goodbye, {state['name']}!")
210
- return state
211
-
212
- # Create the graph
213
- graph = EuriaiLangGraph(api_key="your_api_key")
214
- graph.add_node("greet", greet_node)
215
- graph.add_node("farewell", farewell_node)
216
- graph.add_edge("greet", "farewell")
217
- graph.set_entry_point("greet")
218
- graph.set_finish_point("farewell")
219
- result = graph.run({"name": "Alice"})
220
- print(result)
221
- ```
222
-
223
- ### CrewAI Integration
224
-
225
- **Installation**: `pip install euriai[crewai]`
226
-
227
- ```python
228
- from euriai import EuriaiCrewAI
229
-
230
- # Example: Create a crew from YAML config files
231
- crew = EuriaiCrewAI(api_key="your_api_key")
232
- crew.add_agent("researcher", {
233
- "role": "Researcher",
234
- "goal": "Find information about {topic}",
235
- "backstory": "You are an expert researcher"
236
- })
237
- crew.add_task("research_task", {
238
- "description": "Research the topic {topic}",
239
- "agent": "researcher"
240
- })
241
- crew.build_crew()
242
- result = crew.run(inputs={"topic": "AI in Healthcare"})
243
- print(result)
244
- ```
245
-
246
- ### AutoGen Integration
247
-
248
- **Installation**: `pip install euriai[autogen]`
249
-
250
- ```python
251
- from euriai import EuriaiAutoGen
252
-
253
- autogen = EuriaiAutoGen(api_key="your_api_key")
254
- # Add an agent (see AutoGen docs for agent config details)
255
- agent = autogen.create_assistant_agent(
256
- name="assistant",
257
- system_message="You are a helpful assistant",
258
- model="gpt-4.1-nano"
259
- )
260
- # Run a chat
261
- response = autogen.initiate_chat(agent, message="Hello, what is the weather today?")
262
- print(response)
263
- ```
264
-
265
- ### SmolAgents Integration
266
-
267
- **Installation**: `pip install euriai[smolagents]`
268
-
269
- ```python
270
- from euriai import EuriaiSmolAgent
271
-
272
- # Define a tool using the @tool decorator
273
- from smolagents import tool
274
-
275
- @tool
276
- def add(a: int, b: int) -> int:
277
- """Add two numbers."""
278
- return a + b
279
-
280
- # Create the agent with the tool
281
- agent = EuriaiSmolAgent(api_key="your_api_key", tools=[add])
282
- response = agent.run("What is 2 + 3?")
283
- print(response)
284
- ```
285
-
286
- ### n8n Integration
287
-
288
- **Installation**: Basic installation only (`pip install euriai`)
289
-
290
- ```python
291
- from euriai import EuriaiN8N
292
-
293
- # Initialize with your n8n instance URL and (optionally) API key
294
- n8n = EuriaiN8N(base_url="http://localhost:5678", api_key="YOUR_N8N_API_KEY")
295
-
296
- # Trigger a workflow by its webhook ID, passing data as needed
297
- workflow_id = "your-workflow-webhook-id"
298
- data = {"message": "Hello from EURI SDK!"}
299
- result = n8n.trigger_workflow(workflow_id, data)
300
- print(result)
301
- ```
302
-
303
- ---
304
-
305
- ## 🔍 Framework Status
306
-
307
- | Framework | Status | Installation Command | Notes |
308
- |-----------|--------|---------------------|-------|
309
- | LangChain | ✅ Working | `pip install euriai[langchain]` | Full compatibility |
310
- | LlamaIndex | ✅ Working | `pip install euriai[llama-index]` | Full compatibility |
311
- | n8n | ✅ Working | `pip install euriai` | No extra dependencies |
312
- | LangGraph | ⚠️ Requires Install | `pip install euriai[langgraph]` | Install required |
313
- | CrewAI | ⚠️ Requires Install | `pip install euriai[crewai]` | Install required |
314
- | AutoGen | ⚠️ Requires Install | `pip install euriai[autogen]` | Install required |
315
- | SmolAgents | ⚠️ Requires Install | `pip install euriai[smolagents]` | Install required |
316
-
317
- ## 📘 Documentation
318
-
319
- For full documentation, visit our [official docs site](https://euron.one/euri).
320
-
321
- ## 🔑 Getting an API Key
322
-
323
- Sign up for an API key at [Euron AI Platform](https://euron.one/euri).
324
-
325
- ## 🤝 Contributing
326
-
327
- Contributions are welcome! Please feel free to submit a Pull Request.
328
-
329
- ## 📄 License
330
-
331
- This project is licensed under the MIT License - see the LICENSE file for details.
File without changes