euriai 1.0.3__tar.gz → 1.0.4__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.3 → euriai-1.0.4}/PKG-INFO +114 -65
- {euriai-1.0.3 → euriai-1.0.4}/README.md +113 -64
- {euriai-1.0.3 → euriai-1.0.4}/euriai/crewai.py +2 -1
- {euriai-1.0.3 → euriai-1.0.4}/euriai/euri_embed.py +19 -4
- {euriai-1.0.3 → euriai-1.0.4}/euriai.egg-info/PKG-INFO +114 -65
- {euriai-1.0.3 → euriai-1.0.4}/setup.cfg +1 -1
- {euriai-1.0.3 → euriai-1.0.4}/setup.py +1 -1
- {euriai-1.0.3 → euriai-1.0.4}/euriai/__init__.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/autogen.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/cli.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/client.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/embedding.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/euri_chat.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/langchain.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/langgraph.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/llamaindex.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/n8n.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai/smolagents.py +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai.egg-info/SOURCES.txt +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai.egg-info/dependency_links.txt +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai.egg-info/entry_points.txt +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai.egg-info/requires.txt +0 -0
- {euriai-1.0.3 → euriai-1.0.4}/euriai.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: euriai
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.4
|
4
4
|
Summary: Python client for Euri API (euron.one) with CLI, LangChain, and LlamaIndex integration
|
5
5
|
Author: Euri
|
6
6
|
Author-email: tech@euron.one
|
@@ -52,10 +52,44 @@ Dynamic: summary
|
|
52
52
|
|
53
53
|
## 🔧 Installation
|
54
54
|
|
55
|
+
### Basic Installation
|
55
56
|
```bash
|
56
57
|
pip install euriai
|
57
58
|
```
|
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
|
+
|
59
93
|
## 🚀 Python Usage
|
60
94
|
|
61
95
|
### Text Generation
|
@@ -107,16 +141,20 @@ List all supported model IDs with recommended use-cases and temperature/token ad
|
|
107
141
|
euriai --models
|
108
142
|
```
|
109
143
|
|
110
|
-
## 🤖
|
144
|
+
## 🤖 Framework Integrations
|
111
145
|
|
112
|
-
###
|
146
|
+
### LangChain Integration
|
147
|
+
|
148
|
+
**Installation**: `pip install euriai[langchain]`
|
149
|
+
|
150
|
+
#### Text Generation
|
113
151
|
|
114
152
|
Use Euriai with LangChain directly:
|
115
153
|
|
116
154
|
```python
|
117
|
-
from euriai import
|
155
|
+
from euriai import EuriaiChatModel
|
118
156
|
|
119
|
-
llm =
|
157
|
+
llm = EuriaiChatModel(
|
120
158
|
api_key="your_api_key",
|
121
159
|
model="gpt-4.1-nano",
|
122
160
|
temperature=0.7,
|
@@ -126,66 +164,25 @@ llm = EuriaiLangChainLLM(
|
|
126
164
|
print(llm.invoke("Write a poem about time travel."))
|
127
165
|
```
|
128
166
|
|
129
|
-
|
167
|
+
#### Embeddings
|
130
168
|
|
131
169
|
Use Euriai embeddings with LangChain:
|
132
170
|
|
133
171
|
```python
|
134
|
-
from euriai
|
172
|
+
from euriai import EuriaiEmbeddings
|
135
173
|
|
136
174
|
embedding_model = EuriaiEmbeddings(api_key="your_key")
|
137
175
|
print(embedding_model.embed_query("What's AI?")[:5]) # Print first 5 dimensions
|
138
176
|
```
|
139
177
|
|
140
|
-
|
141
|
-
|
142
|
-
### CrewAI Integration
|
143
|
-
```python
|
144
|
-
from euriai import EuriaiCrewAI
|
145
|
-
|
146
|
-
# Example: Create a crew from YAML config files
|
147
|
-
crew = EuriaiCrewAI.from_yaml('agents.yaml', 'tasks.yaml')
|
148
|
-
result = crew.run(inputs={"topic": "AI in Healthcare"})
|
149
|
-
print(result)
|
150
|
-
|
151
|
-
# Or programmatically
|
152
|
-
crew = EuriaiCrewAI()
|
153
|
-
crew.add_agent("researcher", {
|
154
|
-
"role": "Researcher",
|
155
|
-
"goal": "Find information about {topic}",
|
156
|
-
"llm": "openai/gpt-4o"
|
157
|
-
})
|
158
|
-
crew.add_task("research_task", {
|
159
|
-
"description": "Research the topic {topic}",
|
160
|
-
"agent": "researcher"
|
161
|
-
})
|
162
|
-
crew.build_crew()
|
163
|
-
result = crew.run(inputs={"topic": "AI in Healthcare"})
|
164
|
-
print(result)
|
165
|
-
```
|
166
|
-
|
167
|
-
### AutoGen Integration
|
168
|
-
```python
|
169
|
-
from euriai import EuriaiAutoGen
|
178
|
+
### LlamaIndex Integration
|
170
179
|
|
171
|
-
|
172
|
-
# Add an agent (see AutoGen docs for agent config details)
|
173
|
-
agent = autogen.add_agent({
|
174
|
-
"name": "assistant",
|
175
|
-
"llm_config": {"api_key": "YOUR_OPENAI_KEY", "model": "gpt-4o"}
|
176
|
-
})
|
177
|
-
# Run a chat
|
178
|
-
response = autogen.run_chat("Hello, what is the weather today?")
|
179
|
-
print(response)
|
180
|
-
# Access chat history
|
181
|
-
print(autogen.get_history())
|
182
|
-
```
|
180
|
+
**Installation**: `pip install euriai[llama-index]`
|
183
181
|
|
184
|
-
### LlamaIndex Integration
|
185
182
|
```python
|
186
183
|
from euriai import EuriaiLlamaIndex
|
187
184
|
|
188
|
-
llama = EuriaiLlamaIndex()
|
185
|
+
llama = EuriaiLlamaIndex(api_key="your_api_key")
|
189
186
|
llama.add_documents([
|
190
187
|
"Abraham Lincoln was the 16th President of the United States.",
|
191
188
|
"He led the country during the American Civil War."
|
@@ -196,6 +193,9 @@ print(response)
|
|
196
193
|
```
|
197
194
|
|
198
195
|
### LangGraph Integration
|
196
|
+
|
197
|
+
**Installation**: `pip install euriai[langgraph]`
|
198
|
+
|
199
199
|
```python
|
200
200
|
from euriai import EuriaiLangGraph
|
201
201
|
|
@@ -210,27 +210,67 @@ def farewell_node(state):
|
|
210
210
|
return state
|
211
211
|
|
212
212
|
# Create the graph
|
213
|
-
graph = EuriaiLangGraph()
|
213
|
+
graph = EuriaiLangGraph(api_key="your_api_key")
|
214
214
|
graph.add_node("greet", greet_node)
|
215
215
|
graph.add_node("farewell", farewell_node)
|
216
216
|
graph.add_edge("greet", "farewell")
|
217
|
-
graph.
|
218
|
-
|
217
|
+
graph.set_entry_point("greet")
|
218
|
+
graph.set_finish_point("farewell")
|
219
|
+
result = graph.run({"name": "Alice"})
|
219
220
|
print(result)
|
220
221
|
```
|
221
222
|
|
222
|
-
|
223
|
+
### CrewAI Integration
|
223
224
|
|
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]`
|
225
268
|
|
226
269
|
```python
|
227
270
|
from euriai import EuriaiSmolAgent
|
228
271
|
|
229
272
|
# Define a tool using the @tool decorator
|
230
|
-
|
231
|
-
from smolagents import tool
|
232
|
-
except ImportError:
|
233
|
-
raise ImportError("Please install smolagents: pip install smolagents")
|
273
|
+
from smolagents import tool
|
234
274
|
|
235
275
|
@tool
|
236
276
|
def add(a: int, b: int) -> int:
|
@@ -238,14 +278,14 @@ def add(a: int, b: int) -> int:
|
|
238
278
|
return a + b
|
239
279
|
|
240
280
|
# Create the agent with the tool
|
241
|
-
agent = EuriaiSmolAgent(tools=[add])
|
281
|
+
agent = EuriaiSmolAgent(api_key="your_api_key", tools=[add])
|
242
282
|
response = agent.run("What is 2 + 3?")
|
243
283
|
print(response)
|
244
284
|
```
|
245
285
|
|
246
|
-
|
286
|
+
### n8n Integration
|
247
287
|
|
248
|
-
|
288
|
+
**Installation**: Basic installation only (`pip install euriai`)
|
249
289
|
|
250
290
|
```python
|
251
291
|
from euriai import EuriaiN8N
|
@@ -262,8 +302,17 @@ print(result)
|
|
262
302
|
|
263
303
|
---
|
264
304
|
|
265
|
-
|
266
|
-
|
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 |
|
267
316
|
|
268
317
|
## 📘 Documentation
|
269
318
|
|
@@ -6,10 +6,44 @@
|
|
6
6
|
|
7
7
|
## 🔧 Installation
|
8
8
|
|
9
|
+
### Basic Installation
|
9
10
|
```bash
|
10
11
|
pip install euriai
|
11
12
|
```
|
12
13
|
|
14
|
+
### Framework-Specific Installation
|
15
|
+
For framework integrations, install the specific extras you need:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
# For LangChain integration
|
19
|
+
pip install euriai[langchain]
|
20
|
+
|
21
|
+
# For LlamaIndex integration
|
22
|
+
pip install euriai[llama-index]
|
23
|
+
|
24
|
+
# For LangGraph integration
|
25
|
+
pip install euriai[langgraph]
|
26
|
+
|
27
|
+
# For CrewAI integration
|
28
|
+
pip install euriai[crewai]
|
29
|
+
|
30
|
+
# For AutoGen integration
|
31
|
+
pip install euriai[autogen]
|
32
|
+
|
33
|
+
# For SmolAgents integration
|
34
|
+
pip install euriai[smolagents]
|
35
|
+
|
36
|
+
# Install multiple frameworks
|
37
|
+
pip install euriai[langchain,llama-index,langgraph]
|
38
|
+
|
39
|
+
# Install all frameworks
|
40
|
+
pip install euriai[langchain,llama-index,langgraph,crewai,autogen,smolagents]
|
41
|
+
```
|
42
|
+
|
43
|
+
> **Note**: The n8n integration only requires the base installation as it uses standard HTTP requests.
|
44
|
+
|
45
|
+
---
|
46
|
+
|
13
47
|
## 🚀 Python Usage
|
14
48
|
|
15
49
|
### Text Generation
|
@@ -61,16 +95,20 @@ List all supported model IDs with recommended use-cases and temperature/token ad
|
|
61
95
|
euriai --models
|
62
96
|
```
|
63
97
|
|
64
|
-
## 🤖
|
98
|
+
## 🤖 Framework Integrations
|
65
99
|
|
66
|
-
###
|
100
|
+
### LangChain Integration
|
101
|
+
|
102
|
+
**Installation**: `pip install euriai[langchain]`
|
103
|
+
|
104
|
+
#### Text Generation
|
67
105
|
|
68
106
|
Use Euriai with LangChain directly:
|
69
107
|
|
70
108
|
```python
|
71
|
-
from euriai import
|
109
|
+
from euriai import EuriaiChatModel
|
72
110
|
|
73
|
-
llm =
|
111
|
+
llm = EuriaiChatModel(
|
74
112
|
api_key="your_api_key",
|
75
113
|
model="gpt-4.1-nano",
|
76
114
|
temperature=0.7,
|
@@ -80,66 +118,25 @@ llm = EuriaiLangChainLLM(
|
|
80
118
|
print(llm.invoke("Write a poem about time travel."))
|
81
119
|
```
|
82
120
|
|
83
|
-
|
121
|
+
#### Embeddings
|
84
122
|
|
85
123
|
Use Euriai embeddings with LangChain:
|
86
124
|
|
87
125
|
```python
|
88
|
-
from euriai
|
126
|
+
from euriai import EuriaiEmbeddings
|
89
127
|
|
90
128
|
embedding_model = EuriaiEmbeddings(api_key="your_key")
|
91
129
|
print(embedding_model.embed_query("What's AI?")[:5]) # Print first 5 dimensions
|
92
130
|
```
|
93
131
|
|
94
|
-
|
95
|
-
|
96
|
-
### CrewAI Integration
|
97
|
-
```python
|
98
|
-
from euriai import EuriaiCrewAI
|
99
|
-
|
100
|
-
# Example: Create a crew from YAML config files
|
101
|
-
crew = EuriaiCrewAI.from_yaml('agents.yaml', 'tasks.yaml')
|
102
|
-
result = crew.run(inputs={"topic": "AI in Healthcare"})
|
103
|
-
print(result)
|
104
|
-
|
105
|
-
# Or programmatically
|
106
|
-
crew = EuriaiCrewAI()
|
107
|
-
crew.add_agent("researcher", {
|
108
|
-
"role": "Researcher",
|
109
|
-
"goal": "Find information about {topic}",
|
110
|
-
"llm": "openai/gpt-4o"
|
111
|
-
})
|
112
|
-
crew.add_task("research_task", {
|
113
|
-
"description": "Research the topic {topic}",
|
114
|
-
"agent": "researcher"
|
115
|
-
})
|
116
|
-
crew.build_crew()
|
117
|
-
result = crew.run(inputs={"topic": "AI in Healthcare"})
|
118
|
-
print(result)
|
119
|
-
```
|
120
|
-
|
121
|
-
### AutoGen Integration
|
122
|
-
```python
|
123
|
-
from euriai import EuriaiAutoGen
|
132
|
+
### LlamaIndex Integration
|
124
133
|
|
125
|
-
|
126
|
-
# Add an agent (see AutoGen docs for agent config details)
|
127
|
-
agent = autogen.add_agent({
|
128
|
-
"name": "assistant",
|
129
|
-
"llm_config": {"api_key": "YOUR_OPENAI_KEY", "model": "gpt-4o"}
|
130
|
-
})
|
131
|
-
# Run a chat
|
132
|
-
response = autogen.run_chat("Hello, what is the weather today?")
|
133
|
-
print(response)
|
134
|
-
# Access chat history
|
135
|
-
print(autogen.get_history())
|
136
|
-
```
|
134
|
+
**Installation**: `pip install euriai[llama-index]`
|
137
135
|
|
138
|
-
### LlamaIndex Integration
|
139
136
|
```python
|
140
137
|
from euriai import EuriaiLlamaIndex
|
141
138
|
|
142
|
-
llama = EuriaiLlamaIndex()
|
139
|
+
llama = EuriaiLlamaIndex(api_key="your_api_key")
|
143
140
|
llama.add_documents([
|
144
141
|
"Abraham Lincoln was the 16th President of the United States.",
|
145
142
|
"He led the country during the American Civil War."
|
@@ -150,6 +147,9 @@ print(response)
|
|
150
147
|
```
|
151
148
|
|
152
149
|
### LangGraph Integration
|
150
|
+
|
151
|
+
**Installation**: `pip install euriai[langgraph]`
|
152
|
+
|
153
153
|
```python
|
154
154
|
from euriai import EuriaiLangGraph
|
155
155
|
|
@@ -164,27 +164,67 @@ def farewell_node(state):
|
|
164
164
|
return state
|
165
165
|
|
166
166
|
# Create the graph
|
167
|
-
graph = EuriaiLangGraph()
|
167
|
+
graph = EuriaiLangGraph(api_key="your_api_key")
|
168
168
|
graph.add_node("greet", greet_node)
|
169
169
|
graph.add_node("farewell", farewell_node)
|
170
170
|
graph.add_edge("greet", "farewell")
|
171
|
-
graph.
|
172
|
-
|
171
|
+
graph.set_entry_point("greet")
|
172
|
+
graph.set_finish_point("farewell")
|
173
|
+
result = graph.run({"name": "Alice"})
|
173
174
|
print(result)
|
174
175
|
```
|
175
176
|
|
176
|
-
|
177
|
+
### CrewAI Integration
|
177
178
|
|
178
|
-
|
179
|
+
**Installation**: `pip install euriai[crewai]`
|
180
|
+
|
181
|
+
```python
|
182
|
+
from euriai import EuriaiCrewAI
|
183
|
+
|
184
|
+
# Example: Create a crew from YAML config files
|
185
|
+
crew = EuriaiCrewAI(api_key="your_api_key")
|
186
|
+
crew.add_agent("researcher", {
|
187
|
+
"role": "Researcher",
|
188
|
+
"goal": "Find information about {topic}",
|
189
|
+
"backstory": "You are an expert researcher"
|
190
|
+
})
|
191
|
+
crew.add_task("research_task", {
|
192
|
+
"description": "Research the topic {topic}",
|
193
|
+
"agent": "researcher"
|
194
|
+
})
|
195
|
+
crew.build_crew()
|
196
|
+
result = crew.run(inputs={"topic": "AI in Healthcare"})
|
197
|
+
print(result)
|
198
|
+
```
|
199
|
+
|
200
|
+
### AutoGen Integration
|
201
|
+
|
202
|
+
**Installation**: `pip install euriai[autogen]`
|
203
|
+
|
204
|
+
```python
|
205
|
+
from euriai import EuriaiAutoGen
|
206
|
+
|
207
|
+
autogen = EuriaiAutoGen(api_key="your_api_key")
|
208
|
+
# Add an agent (see AutoGen docs for agent config details)
|
209
|
+
agent = autogen.create_assistant_agent(
|
210
|
+
name="assistant",
|
211
|
+
system_message="You are a helpful assistant",
|
212
|
+
model="gpt-4.1-nano"
|
213
|
+
)
|
214
|
+
# Run a chat
|
215
|
+
response = autogen.initiate_chat(agent, message="Hello, what is the weather today?")
|
216
|
+
print(response)
|
217
|
+
```
|
218
|
+
|
219
|
+
### SmolAgents Integration
|
220
|
+
|
221
|
+
**Installation**: `pip install euriai[smolagents]`
|
179
222
|
|
180
223
|
```python
|
181
224
|
from euriai import EuriaiSmolAgent
|
182
225
|
|
183
226
|
# Define a tool using the @tool decorator
|
184
|
-
|
185
|
-
from smolagents import tool
|
186
|
-
except ImportError:
|
187
|
-
raise ImportError("Please install smolagents: pip install smolagents")
|
227
|
+
from smolagents import tool
|
188
228
|
|
189
229
|
@tool
|
190
230
|
def add(a: int, b: int) -> int:
|
@@ -192,14 +232,14 @@ def add(a: int, b: int) -> int:
|
|
192
232
|
return a + b
|
193
233
|
|
194
234
|
# Create the agent with the tool
|
195
|
-
agent = EuriaiSmolAgent(tools=[add])
|
235
|
+
agent = EuriaiSmolAgent(api_key="your_api_key", tools=[add])
|
196
236
|
response = agent.run("What is 2 + 3?")
|
197
237
|
print(response)
|
198
238
|
```
|
199
239
|
|
200
|
-
|
240
|
+
### n8n Integration
|
201
241
|
|
202
|
-
|
242
|
+
**Installation**: Basic installation only (`pip install euriai`)
|
203
243
|
|
204
244
|
```python
|
205
245
|
from euriai import EuriaiN8N
|
@@ -216,8 +256,17 @@ print(result)
|
|
216
256
|
|
217
257
|
---
|
218
258
|
|
219
|
-
|
220
|
-
|
259
|
+
## 🔍 Framework Status
|
260
|
+
|
261
|
+
| Framework | Status | Installation Command | Notes |
|
262
|
+
|-----------|--------|---------------------|-------|
|
263
|
+
| LangChain | ✅ Working | `pip install euriai[langchain]` | Full compatibility |
|
264
|
+
| LlamaIndex | ✅ Working | `pip install euriai[llama-index]` | Full compatibility |
|
265
|
+
| n8n | ✅ Working | `pip install euriai` | No extra dependencies |
|
266
|
+
| LangGraph | ⚠️ Requires Install | `pip install euriai[langgraph]` | Install required |
|
267
|
+
| CrewAI | ⚠️ Requires Install | `pip install euriai[crewai]` | Install required |
|
268
|
+
| AutoGen | ⚠️ Requires Install | `pip install euriai[autogen]` | Install required |
|
269
|
+
| SmolAgents | ⚠️ Requires Install | `pip install euriai[smolagents]` | Install required |
|
221
270
|
|
222
271
|
## 📘 Documentation
|
223
272
|
|
@@ -34,13 +34,29 @@ class EuriaiLlamaIndexEmbedding(BaseEmbedding):
|
|
34
34
|
response.raise_for_status()
|
35
35
|
return [np.array(obj["embedding"]).tolist() for obj in response.json()["data"]]
|
36
36
|
|
37
|
+
# Abstract methods required by BaseEmbedding (with underscore prefixes)
|
38
|
+
def _get_text_embedding(self, text: str) -> List[float]:
|
39
|
+
"""Get embedding for a single text. Required abstract method."""
|
40
|
+
return self._post_embedding([text])[0]
|
41
|
+
|
42
|
+
def _get_query_embedding(self, query: str) -> List[float]:
|
43
|
+
"""Get embedding for a query string. Required abstract method."""
|
44
|
+
return self._get_text_embedding(query)
|
45
|
+
|
46
|
+
async def _aget_query_embedding(self, query: str) -> List[float]:
|
47
|
+
"""Async version of get_query_embedding. Required abstract method."""
|
48
|
+
# For now, we don't support async, so we'll use the sync version
|
49
|
+
# In a real implementation, you'd want to use aiohttp or similar
|
50
|
+
return self._get_query_embedding(query)
|
51
|
+
|
52
|
+
# Public methods for backward compatibility
|
37
53
|
def get_text_embedding(self, text: str) -> List[float]:
|
38
54
|
"""Get embedding for a single text."""
|
39
|
-
return self.
|
55
|
+
return self._get_text_embedding(text)
|
40
56
|
|
41
57
|
def get_query_embedding(self, query: str) -> List[float]:
|
42
58
|
"""Get embedding for a query string."""
|
43
|
-
return self.
|
59
|
+
return self._get_query_embedding(query)
|
44
60
|
|
45
61
|
def get_text_embeddings(self, texts: List[str]) -> List[List[float]]:
|
46
62
|
"""Get embeddings for multiple texts."""
|
@@ -48,5 +64,4 @@ class EuriaiLlamaIndexEmbedding(BaseEmbedding):
|
|
48
64
|
|
49
65
|
async def aget_query_embedding(self, query: str) -> List[float]:
|
50
66
|
"""Async version of get_query_embedding."""
|
51
|
-
|
52
|
-
raise NotImplementedError("Async embeddings not supported")
|
67
|
+
return await self._aget_query_embedding(query)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: euriai
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.4
|
4
4
|
Summary: Python client for Euri API (euron.one) with CLI, LangChain, and LlamaIndex integration
|
5
5
|
Author: Euri
|
6
6
|
Author-email: tech@euron.one
|
@@ -52,10 +52,44 @@ Dynamic: summary
|
|
52
52
|
|
53
53
|
## 🔧 Installation
|
54
54
|
|
55
|
+
### Basic Installation
|
55
56
|
```bash
|
56
57
|
pip install euriai
|
57
58
|
```
|
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
|
+
|
59
93
|
## 🚀 Python Usage
|
60
94
|
|
61
95
|
### Text Generation
|
@@ -107,16 +141,20 @@ List all supported model IDs with recommended use-cases and temperature/token ad
|
|
107
141
|
euriai --models
|
108
142
|
```
|
109
143
|
|
110
|
-
## 🤖
|
144
|
+
## 🤖 Framework Integrations
|
111
145
|
|
112
|
-
###
|
146
|
+
### LangChain Integration
|
147
|
+
|
148
|
+
**Installation**: `pip install euriai[langchain]`
|
149
|
+
|
150
|
+
#### Text Generation
|
113
151
|
|
114
152
|
Use Euriai with LangChain directly:
|
115
153
|
|
116
154
|
```python
|
117
|
-
from euriai import
|
155
|
+
from euriai import EuriaiChatModel
|
118
156
|
|
119
|
-
llm =
|
157
|
+
llm = EuriaiChatModel(
|
120
158
|
api_key="your_api_key",
|
121
159
|
model="gpt-4.1-nano",
|
122
160
|
temperature=0.7,
|
@@ -126,66 +164,25 @@ llm = EuriaiLangChainLLM(
|
|
126
164
|
print(llm.invoke("Write a poem about time travel."))
|
127
165
|
```
|
128
166
|
|
129
|
-
|
167
|
+
#### Embeddings
|
130
168
|
|
131
169
|
Use Euriai embeddings with LangChain:
|
132
170
|
|
133
171
|
```python
|
134
|
-
from euriai
|
172
|
+
from euriai import EuriaiEmbeddings
|
135
173
|
|
136
174
|
embedding_model = EuriaiEmbeddings(api_key="your_key")
|
137
175
|
print(embedding_model.embed_query("What's AI?")[:5]) # Print first 5 dimensions
|
138
176
|
```
|
139
177
|
|
140
|
-
|
141
|
-
|
142
|
-
### CrewAI Integration
|
143
|
-
```python
|
144
|
-
from euriai import EuriaiCrewAI
|
145
|
-
|
146
|
-
# Example: Create a crew from YAML config files
|
147
|
-
crew = EuriaiCrewAI.from_yaml('agents.yaml', 'tasks.yaml')
|
148
|
-
result = crew.run(inputs={"topic": "AI in Healthcare"})
|
149
|
-
print(result)
|
150
|
-
|
151
|
-
# Or programmatically
|
152
|
-
crew = EuriaiCrewAI()
|
153
|
-
crew.add_agent("researcher", {
|
154
|
-
"role": "Researcher",
|
155
|
-
"goal": "Find information about {topic}",
|
156
|
-
"llm": "openai/gpt-4o"
|
157
|
-
})
|
158
|
-
crew.add_task("research_task", {
|
159
|
-
"description": "Research the topic {topic}",
|
160
|
-
"agent": "researcher"
|
161
|
-
})
|
162
|
-
crew.build_crew()
|
163
|
-
result = crew.run(inputs={"topic": "AI in Healthcare"})
|
164
|
-
print(result)
|
165
|
-
```
|
166
|
-
|
167
|
-
### AutoGen Integration
|
168
|
-
```python
|
169
|
-
from euriai import EuriaiAutoGen
|
178
|
+
### LlamaIndex Integration
|
170
179
|
|
171
|
-
|
172
|
-
# Add an agent (see AutoGen docs for agent config details)
|
173
|
-
agent = autogen.add_agent({
|
174
|
-
"name": "assistant",
|
175
|
-
"llm_config": {"api_key": "YOUR_OPENAI_KEY", "model": "gpt-4o"}
|
176
|
-
})
|
177
|
-
# Run a chat
|
178
|
-
response = autogen.run_chat("Hello, what is the weather today?")
|
179
|
-
print(response)
|
180
|
-
# Access chat history
|
181
|
-
print(autogen.get_history())
|
182
|
-
```
|
180
|
+
**Installation**: `pip install euriai[llama-index]`
|
183
181
|
|
184
|
-
### LlamaIndex Integration
|
185
182
|
```python
|
186
183
|
from euriai import EuriaiLlamaIndex
|
187
184
|
|
188
|
-
llama = EuriaiLlamaIndex()
|
185
|
+
llama = EuriaiLlamaIndex(api_key="your_api_key")
|
189
186
|
llama.add_documents([
|
190
187
|
"Abraham Lincoln was the 16th President of the United States.",
|
191
188
|
"He led the country during the American Civil War."
|
@@ -196,6 +193,9 @@ print(response)
|
|
196
193
|
```
|
197
194
|
|
198
195
|
### LangGraph Integration
|
196
|
+
|
197
|
+
**Installation**: `pip install euriai[langgraph]`
|
198
|
+
|
199
199
|
```python
|
200
200
|
from euriai import EuriaiLangGraph
|
201
201
|
|
@@ -210,27 +210,67 @@ def farewell_node(state):
|
|
210
210
|
return state
|
211
211
|
|
212
212
|
# Create the graph
|
213
|
-
graph = EuriaiLangGraph()
|
213
|
+
graph = EuriaiLangGraph(api_key="your_api_key")
|
214
214
|
graph.add_node("greet", greet_node)
|
215
215
|
graph.add_node("farewell", farewell_node)
|
216
216
|
graph.add_edge("greet", "farewell")
|
217
|
-
graph.
|
218
|
-
|
217
|
+
graph.set_entry_point("greet")
|
218
|
+
graph.set_finish_point("farewell")
|
219
|
+
result = graph.run({"name": "Alice"})
|
219
220
|
print(result)
|
220
221
|
```
|
221
222
|
|
222
|
-
|
223
|
+
### CrewAI Integration
|
223
224
|
|
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]`
|
225
268
|
|
226
269
|
```python
|
227
270
|
from euriai import EuriaiSmolAgent
|
228
271
|
|
229
272
|
# Define a tool using the @tool decorator
|
230
|
-
|
231
|
-
from smolagents import tool
|
232
|
-
except ImportError:
|
233
|
-
raise ImportError("Please install smolagents: pip install smolagents")
|
273
|
+
from smolagents import tool
|
234
274
|
|
235
275
|
@tool
|
236
276
|
def add(a: int, b: int) -> int:
|
@@ -238,14 +278,14 @@ def add(a: int, b: int) -> int:
|
|
238
278
|
return a + b
|
239
279
|
|
240
280
|
# Create the agent with the tool
|
241
|
-
agent = EuriaiSmolAgent(tools=[add])
|
281
|
+
agent = EuriaiSmolAgent(api_key="your_api_key", tools=[add])
|
242
282
|
response = agent.run("What is 2 + 3?")
|
243
283
|
print(response)
|
244
284
|
```
|
245
285
|
|
246
|
-
|
286
|
+
### n8n Integration
|
247
287
|
|
248
|
-
|
288
|
+
**Installation**: Basic installation only (`pip install euriai`)
|
249
289
|
|
250
290
|
```python
|
251
291
|
from euriai import EuriaiN8N
|
@@ -262,8 +302,17 @@ print(result)
|
|
262
302
|
|
263
303
|
---
|
264
304
|
|
265
|
-
|
266
|
-
|
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 |
|
267
316
|
|
268
317
|
## 📘 Documentation
|
269
318
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[metadata]
|
2
2
|
name = euriai
|
3
|
-
version = 1.0.
|
3
|
+
version = 1.0.4
|
4
4
|
license = MIT
|
5
5
|
description = Python client for EURI LLM API (euron.one) with CLI, LangChain, LlamaIndex, LangGraph, SmolAgents, and n8n integration
|
6
6
|
keywords = euriai, llm, langchain, llamaindex, langgraph, smolagents, n8n, agents, ai, sdk
|
@@ -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.4",
|
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
|