euriai 0.3.28__py3-none-any.whl → 0.3.30__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/euri_chat.py +4 -4
- euriai/euri_embed.py +13 -4
- {euriai-0.3.28.dist-info → euriai-0.3.30.dist-info}/METADATA +1 -1
- {euriai-0.3.28.dist-info → euriai-0.3.30.dist-info}/RECORD +7 -7
- {euriai-0.3.28.dist-info → euriai-0.3.30.dist-info}/WHEEL +0 -0
- {euriai-0.3.28.dist-info → euriai-0.3.30.dist-info}/entry_points.txt +0 -0
- {euriai-0.3.28.dist-info → euriai-0.3.30.dist-info}/top_level.txt +0 -0
euriai/euri_chat.py
CHANGED
@@ -28,12 +28,12 @@ class EuriaiLlamaIndexLLM(LLM):
|
|
28
28
|
temperature (float, optional): Sampling temperature. Defaults to 0.7.
|
29
29
|
max_tokens (int, optional): Maximum number of tokens. Defaults to 1000.
|
30
30
|
"""
|
31
|
-
# Create a dictionary of parameters
|
31
|
+
# Create a dictionary of parameters with default values directly
|
32
32
|
model_params = {
|
33
33
|
"api_key": api_key,
|
34
|
-
"model": model if model is not None else
|
35
|
-
"temperature": temperature if temperature is not None else
|
36
|
-
"max_tokens": max_tokens if max_tokens is not None else
|
34
|
+
"model": model if model is not None else "gpt-4.1-nano",
|
35
|
+
"temperature": temperature if temperature is not None else 0.7,
|
36
|
+
"max_tokens": max_tokens if max_tokens is not None else 1000,
|
37
37
|
}
|
38
38
|
|
39
39
|
# Initialize the parent class with the parameters
|
euriai/euri_embed.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import requests
|
2
2
|
import numpy as np
|
3
|
-
from typing import List, Optional
|
3
|
+
from typing import List, Optional, Callable, Any
|
4
4
|
from llama_index.core.embeddings import BaseEmbedding
|
5
5
|
|
6
6
|
class EuriaiLlamaIndexEmbedding(BaseEmbedding):
|
@@ -11,10 +11,10 @@ class EuriaiLlamaIndexEmbedding(BaseEmbedding):
|
|
11
11
|
|
12
12
|
def __init__(self, api_key: str, model: Optional[str] = None):
|
13
13
|
"""Initialize embedding model with API key and model name."""
|
14
|
-
# Create parameters for the parent class
|
14
|
+
# Create parameters for the parent class with default values directly
|
15
15
|
embed_params = {
|
16
16
|
"api_key": api_key,
|
17
|
-
"model": model if model is not None else
|
17
|
+
"model": model if model is not None else "text-embedding-3-small",
|
18
18
|
}
|
19
19
|
|
20
20
|
# Initialize the parent class
|
@@ -38,6 +38,15 @@ class EuriaiLlamaIndexEmbedding(BaseEmbedding):
|
|
38
38
|
"""Get embedding for a single text."""
|
39
39
|
return self._post_embedding([text])[0]
|
40
40
|
|
41
|
+
def get_query_embedding(self, query: str) -> List[float]:
|
42
|
+
"""Get embedding for a query string."""
|
43
|
+
return self.get_text_embedding(query)
|
44
|
+
|
41
45
|
def get_text_embeddings(self, texts: List[str]) -> List[List[float]]:
|
42
46
|
"""Get embeddings for multiple texts."""
|
43
|
-
return self._post_embedding(texts)
|
47
|
+
return self._post_embedding(texts)
|
48
|
+
|
49
|
+
async def aget_query_embedding(self, query: str) -> List[float]:
|
50
|
+
"""Async version of get_query_embedding."""
|
51
|
+
# We don't support async, so raise NotImplementedError
|
52
|
+
raise NotImplementedError("Async embeddings not supported")
|
@@ -2,12 +2,12 @@ euriai/__init__.py,sha256=8YhbRV8s4wmNxDP9KmjOxQYLgKUCke450vnp-8-kPKs,449
|
|
2
2
|
euriai/cli.py,sha256=hF1wiiL2QQSfWf8WlLQyNVDBd4YkbiwmMSoPxVbyPTM,3290
|
3
3
|
euriai/client.py,sha256=USiqdMULgAiky7nkrJKF3FyKcOS2DtDmUdbeBSnyLYk,4076
|
4
4
|
euriai/embedding.py,sha256=z-LLKU68tCrPi9QMs1tlKwyr7WJcjceCTkNQIFMG6vA,1276
|
5
|
-
euriai/euri_chat.py,sha256=
|
6
|
-
euriai/euri_embed.py,sha256=
|
5
|
+
euriai/euri_chat.py,sha256=tuNhwyyzZTSJjX4Su8XBftp7a5YtsalerglNhho2fpA,3573
|
6
|
+
euriai/euri_embed.py,sha256=hk9OSMIT3ZxvMbajBpUxUsCGUOk-d3WXYvariBQ-jaA,2143
|
7
7
|
euriai/langchain_embed.py,sha256=OXWWxiKJ4g24TFgnWPOCZvhK7G8xtSf0ppQ2zwHkIPM,584
|
8
8
|
euriai/langchain_llm.py,sha256=D5YvYwV7q9X2_vdoaQiPs7tNiUmjkGz-9Q-7M61hhkg,986
|
9
|
-
euriai-0.3.
|
10
|
-
euriai-0.3.
|
11
|
-
euriai-0.3.
|
12
|
-
euriai-0.3.
|
13
|
-
euriai-0.3.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|