euriai 0.3.26__tar.gz → 0.3.27__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-0.3.26 → euriai-0.3.27}/PKG-INFO +1 -1
- {euriai-0.3.26 → euriai-0.3.27}/euriai/euri_chat.py +18 -13
- {euriai-0.3.26 → euriai-0.3.27}/euriai/euri_embed.py +4 -2
- {euriai-0.3.26 → euriai-0.3.27}/euriai.egg-info/PKG-INFO +1 -1
- {euriai-0.3.26 → euriai-0.3.27}/setup.py +1 -1
- {euriai-0.3.26 → euriai-0.3.27}/README.md +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai/__init__.py +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai/cli.py +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai/client.py +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai/embedding.py +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai/langchain_embed.py +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai/langchain_llm.py +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai.egg-info/SOURCES.txt +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai.egg-info/dependency_links.txt +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai.egg-info/entry_points.txt +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai.egg-info/requires.txt +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/euriai.egg-info/top_level.txt +0 -0
- {euriai-0.3.26 → euriai-0.3.27}/setup.cfg +0 -0
@@ -5,12 +5,6 @@ from llama_index.core.base.llms.types import ChatMessage, CompletionResponse, Co
|
|
5
5
|
|
6
6
|
|
7
7
|
class EuriaiLlamaIndexLLM(LLM):
|
8
|
-
api_key: str
|
9
|
-
model: str = "gpt-4.1-nano"
|
10
|
-
temperature: float = 0.7
|
11
|
-
max_tokens: int = 1000
|
12
|
-
url: str = "https://api.euron.one/api/v1/euri/alpha/chat/completions"
|
13
|
-
|
14
8
|
def __init__(
|
15
9
|
self,
|
16
10
|
api_key: str,
|
@@ -18,13 +12,24 @@ class EuriaiLlamaIndexLLM(LLM):
|
|
18
12
|
temperature: Optional[float] = None,
|
19
13
|
max_tokens: Optional[int] = None,
|
20
14
|
):
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
15
|
+
"""
|
16
|
+
Initializes the EuriaiLlamaIndexLLM.
|
17
|
+
|
18
|
+
Args:
|
19
|
+
api_key (str): Your EURI API key.
|
20
|
+
model (str, optional): Model ID to use. Defaults to "gpt-4.1-nano".
|
21
|
+
temperature (float, optional): Sampling temperature. Defaults to 0.7.
|
22
|
+
max_tokens (int, optional): Maximum number of tokens. Defaults to 1000.
|
23
|
+
"""
|
24
|
+
# Set default values first
|
25
|
+
self.api_key = api_key
|
26
|
+
self.model = model if model is not None else "gpt-4.1-nano"
|
27
|
+
self.temperature = temperature if temperature is not None else 0.7
|
28
|
+
self.max_tokens = max_tokens if max_tokens is not None else 1000
|
29
|
+
self.url = "https://api.euron.one/api/v1/euri/alpha/chat/completions"
|
30
|
+
|
31
|
+
# Now initialize the parent class
|
32
|
+
super().__init__()
|
28
33
|
|
29
34
|
@property
|
30
35
|
def metadata(self):
|
@@ -1,14 +1,16 @@
|
|
1
1
|
import requests
|
2
2
|
import numpy as np
|
3
|
-
from llama_index.core.embeddings import BaseEmbedding
|
3
|
+
from llama_index.core.embeddings import BaseEmbedding
|
4
4
|
|
5
5
|
class EuriaiLlamaIndexEmbedding(BaseEmbedding):
|
6
6
|
def __init__(self, api_key: str, model: str = "text-embedding-3-small"):
|
7
7
|
"""Initialize embedding model with API key and model name."""
|
8
|
+
# Set instance attributes first
|
8
9
|
self.api_key = api_key
|
9
10
|
self.model = model
|
10
11
|
self.url = "https://api.euron.one/api/v1/euri/alpha/embeddings"
|
11
|
-
|
12
|
+
|
13
|
+
# Then call the parent class constructor
|
12
14
|
super().__init__()
|
13
15
|
|
14
16
|
def _post_embedding(self, texts):
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="euriai",
|
5
|
-
version="0.3.
|
5
|
+
version="0.3.27",
|
6
6
|
description="Python client for EURI LLM 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
|