euriai 0.2.1__py3-none-any.whl → 0.3.1__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 +3 -0
- euriai/langchain_llm.py +32 -0
- {euriai-0.2.1.dist-info → euriai-0.3.1.dist-info}/METADATA +17 -2
- euriai-0.3.1.dist-info/RECORD +9 -0
- euriai-0.2.1.dist-info/RECORD +0 -8
- {euriai-0.2.1.dist-info → euriai-0.3.1.dist-info}/WHEEL +0 -0
- {euriai-0.2.1.dist-info → euriai-0.3.1.dist-info}/entry_points.txt +0 -0
- {euriai-0.2.1.dist-info → euriai-0.3.1.dist-info}/top_level.txt +0 -0
euriai/__init__.py
CHANGED
euriai/langchain_llm.py
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
from langchain_core.language_models.llms import LLM
|
2
|
+
from typing import Optional, List
|
3
|
+
from .client import EuriaiClient
|
4
|
+
|
5
|
+
class EuriaiLangChainLLM(LLM):
|
6
|
+
"""
|
7
|
+
LangChain-compatible wrapper for euriai.EuriaiClient
|
8
|
+
"""
|
9
|
+
|
10
|
+
def __init__(
|
11
|
+
self,
|
12
|
+
api_key: str,
|
13
|
+
model: str = "gpt-4.1-nano",
|
14
|
+
temperature: float = 0.7,
|
15
|
+
max_tokens: int = 300
|
16
|
+
):
|
17
|
+
self.client = EuriaiClient(api_key=api_key, model=model)
|
18
|
+
self.temperature = temperature
|
19
|
+
self.max_tokens = max_tokens
|
20
|
+
|
21
|
+
@property
|
22
|
+
def _llm_type(self) -> str:
|
23
|
+
return "euriai"
|
24
|
+
|
25
|
+
def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str:
|
26
|
+
response = self.client.generate_completion(
|
27
|
+
prompt=prompt,
|
28
|
+
temperature=self.temperature,
|
29
|
+
max_tokens=self.max_tokens,
|
30
|
+
stop=stop
|
31
|
+
)
|
32
|
+
return response.get("choices", [{}])[0].get("message", {}).get("content", "")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: euriai
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.1
|
4
4
|
Summary: Python client for EURI LLM API (euron.one) with CLI and interactive wizard
|
5
5
|
Author: euron.one
|
6
6
|
Author-email: sudhanshu@euron.one
|
@@ -8,11 +8,11 @@ License: MIT
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: Operating System :: OS Independent
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
11
|
-
Classifier: Development Status :: 4 - Beta
|
12
11
|
Classifier: Intended Audience :: Developers
|
13
12
|
Requires-Python: >=3.6
|
14
13
|
Description-Content-Type: text/markdown
|
15
14
|
Requires-Dist: requests
|
15
|
+
Requires-Dist: langchain-core
|
16
16
|
|
17
17
|
# euriai 🧠
|
18
18
|
|
@@ -59,3 +59,18 @@ euriai --api_key YOUR_API_KEY --prompt "Stream a fun fact" --stream
|
|
59
59
|
|
60
60
|
euriai --models
|
61
61
|
|
62
|
+
## 🤖 LangChain Integration
|
63
|
+
|
64
|
+
Use Euriai with LangChain directly:
|
65
|
+
|
66
|
+
```python
|
67
|
+
from euriai import EuriaiLangChainLLM
|
68
|
+
|
69
|
+
llm = EuriaiLangChainLLM(
|
70
|
+
api_key="your_api_key",
|
71
|
+
model="gpt-4.1-nano",
|
72
|
+
temperature=0.7,
|
73
|
+
max_tokens=300
|
74
|
+
)
|
75
|
+
|
76
|
+
print(llm.invoke("Write a poem about time travel."))
|
@@ -0,0 +1,9 @@
|
|
1
|
+
euriai/__init__.py,sha256=MB58A0AUXMvhW9gJWK8NSpnvtGawlejvtKJ1DOhs1SM,133
|
2
|
+
euriai/cli.py,sha256=hF1wiiL2QQSfWf8WlLQyNVDBd4YkbiwmMSoPxVbyPTM,3290
|
3
|
+
euriai/client.py,sha256=USiqdMULgAiky7nkrJKF3FyKcOS2DtDmUdbeBSnyLYk,4076
|
4
|
+
euriai/langchain_llm.py,sha256=F25RvENHJl8C-RS4iECGqF7oNAKGCjpYuiJaatukc_k,986
|
5
|
+
euriai-0.3.1.dist-info/METADATA,sha256=7l9WrjKgyrnKmqIQOWnpUgzUNNACHVOr_rIHSbd10Zo,1901
|
6
|
+
euriai-0.3.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
7
|
+
euriai-0.3.1.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
|
8
|
+
euriai-0.3.1.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
|
9
|
+
euriai-0.3.1.dist-info/RECORD,,
|
euriai-0.2.1.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
euriai/__init__.py,sha256=jyfCq3Mc-PrsIK2SGU49o7ATy834G74oDfiKJsYa-A4,34
|
2
|
-
euriai/cli.py,sha256=hF1wiiL2QQSfWf8WlLQyNVDBd4YkbiwmMSoPxVbyPTM,3290
|
3
|
-
euriai/client.py,sha256=USiqdMULgAiky7nkrJKF3FyKcOS2DtDmUdbeBSnyLYk,4076
|
4
|
-
euriai-0.2.1.dist-info/METADATA,sha256=s1ZQP--7T9mUgDqSVQa1abkLlVj5wKKXwVSUKtB8Kk4,1606
|
5
|
-
euriai-0.2.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
6
|
-
euriai-0.2.1.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
|
7
|
-
euriai-0.2.1.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
|
8
|
-
euriai-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|