euriai 0.3.30__py3-none-any.whl → 1.0.0__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.
@@ -0,0 +1,282 @@
1
+ Metadata-Version: 2.4
2
+ Name: euriai
3
+ Version: 1.0.0
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
+ ```bash
56
+ pip install euriai
57
+ ```
58
+
59
+ ## 🚀 Python Usage
60
+
61
+ ### Text Generation
62
+
63
+ ```python
64
+ from euriai import EuriaiClient
65
+
66
+ client = EuriaiClient(
67
+ api_key="your_api_key_here",
68
+ model="gpt-4.1-nano" # You can also try: "gemini-2.0-flash-001", "llama-4-maverick", etc.
69
+ )
70
+
71
+ response = client.generate_completion(
72
+ prompt="Write a short poem about artificial intelligence.",
73
+ temperature=0.7,
74
+ max_tokens=300
75
+ )
76
+
77
+ print(response)
78
+ ```
79
+
80
+ ### Embeddings
81
+
82
+ ```python
83
+ from euriai.embedding import EuriaiEmbeddingClient
84
+
85
+ client = EuriaiEmbeddingClient(api_key="your_key")
86
+ embedding = client.embed("Hello world")
87
+ print(embedding[:5]) # Print first 5 dimensions of the embedding vector
88
+ ```
89
+
90
+ ## 💻 Command-Line Interface (CLI) Usage
91
+
92
+ Run prompts directly from the terminal:
93
+
94
+ ```bash
95
+ euriai --api_key YOUR_API_KEY --prompt "Tell me a joke"
96
+ ```
97
+
98
+ Enable streaming output (if supported by the model):
99
+
100
+ ```bash
101
+ euriai --api_key YOUR_API_KEY --prompt "Stream a fun fact" --stream
102
+ ```
103
+
104
+ List all supported model IDs with recommended use-cases and temperature/token advice:
105
+
106
+ ```bash
107
+ euriai --models
108
+ ```
109
+
110
+ ## 🤖 LangChain Integration
111
+
112
+ ### Text Generation
113
+
114
+ Use Euriai with LangChain directly:
115
+
116
+ ```python
117
+ from euriai import EuriaiLangChainLLM
118
+
119
+ llm = EuriaiLangChainLLM(
120
+ api_key="your_api_key",
121
+ model="gpt-4.1-nano",
122
+ temperature=0.7,
123
+ max_tokens=300
124
+ )
125
+
126
+ print(llm.invoke("Write a poem about time travel."))
127
+ ```
128
+
129
+ ### Embeddings
130
+
131
+ Use Euriai embeddings with LangChain:
132
+
133
+ ```python
134
+ from euriai.langchain_embed import EuriaiEmbeddings
135
+
136
+ embedding_model = EuriaiEmbeddings(api_key="your_key")
137
+ print(embedding_model.embed_query("What's AI?")[:5]) # Print first 5 dimensions
138
+ ```
139
+
140
+ ## Usage Examples
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
170
+
171
+ autogen = EuriaiAutoGen()
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
+ ```
183
+
184
+ ### LlamaIndex Integration
185
+ ```python
186
+ from euriai import EuriaiLlamaIndex
187
+
188
+ llama = EuriaiLlamaIndex()
189
+ llama.add_documents([
190
+ "Abraham Lincoln was the 16th President of the United States.",
191
+ "He led the country during the American Civil War."
192
+ ])
193
+ llama.build_index()
194
+ response = llama.query("Who was Abraham Lincoln?")
195
+ print(response)
196
+ ```
197
+
198
+ ### LangGraph Integration
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()
214
+ graph.add_node("greet", greet_node)
215
+ graph.add_node("farewell", farewell_node)
216
+ graph.add_edge("greet", "farewell")
217
+ graph.set_state({"name": "Alice"})
218
+ result = graph.run()
219
+ print(result)
220
+ ```
221
+
222
+ ---
223
+
224
+ ## 2. **SmolAgents Integration**
225
+
226
+ ```python
227
+ from euriai import EuriaiSmolAgent
228
+
229
+ # Define a tool using the @tool decorator
230
+ try:
231
+ from smolagents import tool
232
+ except ImportError:
233
+ raise ImportError("Please install smolagents: pip install smolagents")
234
+
235
+ @tool
236
+ def add(a: int, b: int) -> int:
237
+ """Add two numbers."""
238
+ return a + b
239
+
240
+ # Create the agent with the tool
241
+ agent = EuriaiSmolAgent(tools=[add])
242
+ response = agent.run("What is 2 + 3?")
243
+ print(response)
244
+ ```
245
+
246
+ ---
247
+
248
+ ## 3. **n8n Integration**
249
+
250
+ ```python
251
+ from euriai import EuriaiN8N
252
+
253
+ # Initialize with your n8n instance URL and (optionally) API key
254
+ n8n = EuriaiN8N(base_url="http://localhost:5678", api_key="YOUR_N8N_API_KEY")
255
+
256
+ # Trigger a workflow by its webhook ID, passing data as needed
257
+ workflow_id = "your-workflow-webhook-id"
258
+ data = {"message": "Hello from EURI SDK!"}
259
+ result = n8n.trigger_workflow(workflow_id, data)
260
+ print(result)
261
+ ```
262
+
263
+ ---
264
+
265
+ **You can copy-paste these code blocks into your client documentation or UI for user reference.**
266
+ If you want advanced examples (e.g., multi-tool SmolAgents, LangGraph with more nodes, or n8n with authentication), just let me know!
267
+
268
+ ## 📘 Documentation
269
+
270
+ For full documentation, visit our [official docs site](https://euron.one/euri).
271
+
272
+ ## 🔑 Getting an API Key
273
+
274
+ Sign up for an API key at [Euron AI Platform](https://euron.one/euri).
275
+
276
+ ## 🤝 Contributing
277
+
278
+ Contributions are welcome! Please feel free to submit a Pull Request.
279
+
280
+ ## 📄 License
281
+
282
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,18 @@
1
+ euriai/__init__.py,sha256=5AFG_ovSriY5Kfz0kb1uKuNK_ei6o4k-kcCgoTZqNk0,795
2
+ euriai/autogen.py,sha256=4YAHrY65YYOKVsBjQa9G8pr-_Xxss1uR08qLAFzo7Rk,16023
3
+ euriai/cli.py,sha256=hF1wiiL2QQSfWf8WlLQyNVDBd4YkbiwmMSoPxVbyPTM,3290
4
+ euriai/client.py,sha256=L-o6hv9N3md-l-hz-kz5nYVaaZqnrREZlo_0jguhF7E,4066
5
+ euriai/crewai.py,sha256=stnwsChy4MYXwWP6JBk_twg61EZTaTj8zoBiLN5n_I0,7135
6
+ euriai/embedding.py,sha256=uP66Ph1k9Ou6J5RAkztJxlfyj0S0MESOvZ4ulhnVo-o,1270
7
+ euriai/euri_chat.py,sha256=DEAiet1ReRwB4ljkPYaTl1Nb5uc20-JF-3PQjGQZXk4,3567
8
+ euriai/euri_embed.py,sha256=VE-RLUb5bYnEFA_dxFkj2c3Jr_SYyJKPmFOzsDOR0Ys,2137
9
+ euriai/langchain.py,sha256=ZHET7cO9CslXIMSKFYcjwCLWfP8pov22Udal5gSMOoo,29640
10
+ euriai/langgraph.py,sha256=sw9e-PnfwAwmp_tUCnAGIUB78GyJsMkAzxOGvFUafiM,34128
11
+ euriai/llamaindex.py,sha256=c-ujod2bjL6QIvfAyuIxm1SvSCS00URFElYybKQ5Ew0,26551
12
+ euriai/n8n.py,sha256=hjkckqyW_hZNL78UkBCof1WvKCKCIjwdvZdAgx6NrB8,3764
13
+ euriai/smolagents.py,sha256=xlixGx2IWzAPTpSJGsYIK2L-SHGY9Mw1-8GbwVsEYtU,28507
14
+ euriai-1.0.0.dist-info/METADATA,sha256=3qQs4Z403ImXKfKnzI3__uftPhwdd_MSEFyT9rn5iPA,6881
15
+ euriai-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ euriai-1.0.0.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
17
+ euriai-1.0.0.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
18
+ euriai-1.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
euriai/langchain_embed.py DELETED
@@ -1,14 +0,0 @@
1
- from langchain_core.embeddings import Embeddings
2
- from typing import List
3
- from euriai.embedding import EuriaiEmbeddingClient
4
-
5
-
6
- class EuriaiEmbeddings(Embeddings):
7
- def __init__(self, api_key: str, model: str = "text-embedding-3-small"):
8
- self.client = EuriaiEmbeddingClient(api_key=api_key, model=model)
9
-
10
- def embed_documents(self, texts: List[str]) -> List[List[float]]:
11
- return [embedding.tolist() for embedding in self.client.embed_batch(texts)]
12
-
13
- def embed_query(self, text: str) -> List[float]:
14
- return self.client.embed(text).tolist()
euriai/langchain_llm.py DELETED
@@ -1,26 +0,0 @@
1
- from langchain.llms.base import LLM
2
- from typing import Optional, List
3
- from euriai import EuriaiClient
4
-
5
-
6
- class EuriaiLangChainLLM(LLM):
7
- model: str = "gpt-4.1-nano"
8
- temperature: float = 0.7
9
- max_tokens: int = 300
10
-
11
- def __init__(self, api_key: str, model: str = "gpt-4.1-nano", temperature: float = 0.7, max_tokens: int = 300, **kwargs):
12
- super().__init__(model=model, temperature=temperature, max_tokens=max_tokens, **kwargs)
13
- object.__setattr__(self, "_client", EuriaiClient(api_key=api_key, model=model))
14
-
15
- @property
16
- def _llm_type(self) -> str:
17
- return "euriai"
18
-
19
- def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str:
20
- response = self._client.generate_completion(
21
- prompt=prompt,
22
- temperature=self.temperature,
23
- max_tokens=self.max_tokens,
24
- stop=stop
25
- )
26
- return response.get("choices", [{}])[0].get("message", {}).get("content", "")
@@ -1,135 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: euriai
3
- Version: 0.3.30
4
- Summary: Python client for EURI LLM API (euron.one) with CLI, LangChain, and LlamaIndex integration
5
- Author: euron.one
6
- Author-email: sudhanshu@euron.one
7
- License: MIT
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Operating System :: OS Independent
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Intended Audience :: Developers
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- Requires-Dist: requests
15
- Requires-Dist: langchain-core
16
- Requires-Dist: llama-index>=0.10.0
17
- Requires-Dist: numpy
18
- Dynamic: author
19
- Dynamic: author-email
20
- Dynamic: classifier
21
- Dynamic: description
22
- Dynamic: description-content-type
23
- Dynamic: license
24
- Dynamic: requires-dist
25
- Dynamic: requires-python
26
- Dynamic: summary
27
-
28
- # euriai 🧠
29
-
30
- **EURI AI Python Client** – A simple wrapper and CLI tool for the [Euron LLM API](https://euron.one/euri/api). Supports completions, streaming responses, embeddings, CLI interaction, and an interactive guided wizard!
31
-
32
- ---
33
-
34
- ## 🔧 Installation
35
-
36
- ```bash
37
- pip install euriai
38
- ```
39
-
40
- ## 🚀 Python Usage
41
-
42
- ### Text Generation
43
-
44
- ```python
45
- from euriai import EuriaiClient
46
-
47
- client = EuriaiClient(
48
- api_key="your_api_key_here",
49
- model="gpt-4.1-nano" # You can also try: "gemini-2.0-flash-001", "llama-4-maverick", etc.
50
- )
51
-
52
- response = client.generate_completion(
53
- prompt="Write a short poem about artificial intelligence.",
54
- temperature=0.7,
55
- max_tokens=300
56
- )
57
-
58
- print(response)
59
- ```
60
-
61
- ### Embeddings
62
-
63
- ```python
64
- from euriai.embedding import EuriaiEmbeddingClient
65
-
66
- client = EuriaiEmbeddingClient(api_key="your_key")
67
- embedding = client.embed("Hello world")
68
- print(embedding[:5]) # Print first 5 dimensions of the embedding vector
69
- ```
70
-
71
- ## 💻 Command-Line Interface (CLI) Usage
72
-
73
- Run prompts directly from the terminal:
74
-
75
- ```bash
76
- euriai --api_key YOUR_API_KEY --prompt "Tell me a joke"
77
- ```
78
-
79
- Enable streaming output (if supported by the model):
80
-
81
- ```bash
82
- euriai --api_key YOUR_API_KEY --prompt "Stream a fun fact" --stream
83
- ```
84
-
85
- List all supported model IDs with recommended use-cases and temperature/token advice:
86
-
87
- ```bash
88
- euriai --models
89
- ```
90
-
91
- ## 🤖 LangChain Integration
92
-
93
- ### Text Generation
94
-
95
- Use Euriai with LangChain directly:
96
-
97
- ```python
98
- from euriai import EuriaiLangChainLLM
99
-
100
- llm = EuriaiLangChainLLM(
101
- api_key="your_api_key",
102
- model="gpt-4.1-nano",
103
- temperature=0.7,
104
- max_tokens=300
105
- )
106
-
107
- print(llm.invoke("Write a poem about time travel."))
108
- ```
109
-
110
- ### Embeddings
111
-
112
- Use Euriai embeddings with LangChain:
113
-
114
- ```python
115
- from euriai.langchain_embed import EuriaiEmbeddings
116
-
117
- embedding_model = EuriaiEmbeddings(api_key="your_key")
118
- print(embedding_model.embed_query("What's AI?")[:5]) # Print first 5 dimensions
119
- ```
120
-
121
- ## 📘 Documentation
122
-
123
- For full documentation, visit our [official docs site](https://euron.one/euri/api).
124
-
125
- ## 🔑 Getting an API Key
126
-
127
- Sign up for an API key at [Euron AI Platform](https://euron.one/euri/api).
128
-
129
- ## 🤝 Contributing
130
-
131
- Contributions are welcome! Please feel free to submit a Pull Request.
132
-
133
- ## 📄 License
134
-
135
- This project is licensed under the MIT License - see the LICENSE file for details.
@@ -1,13 +0,0 @@
1
- euriai/__init__.py,sha256=8YhbRV8s4wmNxDP9KmjOxQYLgKUCke450vnp-8-kPKs,449
2
- euriai/cli.py,sha256=hF1wiiL2QQSfWf8WlLQyNVDBd4YkbiwmMSoPxVbyPTM,3290
3
- euriai/client.py,sha256=USiqdMULgAiky7nkrJKF3FyKcOS2DtDmUdbeBSnyLYk,4076
4
- euriai/embedding.py,sha256=z-LLKU68tCrPi9QMs1tlKwyr7WJcjceCTkNQIFMG6vA,1276
5
- euriai/euri_chat.py,sha256=tuNhwyyzZTSJjX4Su8XBftp7a5YtsalerglNhho2fpA,3573
6
- euriai/euri_embed.py,sha256=hk9OSMIT3ZxvMbajBpUxUsCGUOk-d3WXYvariBQ-jaA,2143
7
- euriai/langchain_embed.py,sha256=OXWWxiKJ4g24TFgnWPOCZvhK7G8xtSf0ppQ2zwHkIPM,584
8
- euriai/langchain_llm.py,sha256=D5YvYwV7q9X2_vdoaQiPs7tNiUmjkGz-9Q-7M61hhkg,986
9
- euriai-0.3.30.dist-info/METADATA,sha256=-3VaAOjaXrKWPF86TjoHw2Zx4lT8H78EE0zxG3fmk5Q,3249
10
- euriai-0.3.30.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
11
- euriai-0.3.30.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
12
- euriai-0.3.30.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
13
- euriai-0.3.30.dist-info/RECORD,,