euriai 0.3.13__py3-none-any.whl → 0.3.14__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/llamaindex/euri_chat.py +12 -17
- {euriai-0.3.13.dist-info → euriai-0.3.14.dist-info}/METADATA +1 -1
- {euriai-0.3.13.dist-info → euriai-0.3.14.dist-info}/RECORD +6 -6
- {euriai-0.3.13.dist-info → euriai-0.3.14.dist-info}/WHEEL +0 -0
- {euriai-0.3.13.dist-info → euriai-0.3.14.dist-info}/entry_points.txt +0 -0
- {euriai-0.3.13.dist-info → euriai-0.3.14.dist-info}/top_level.txt +0 -0
euriai/llamaindex/euri_chat.py
CHANGED
@@ -1,22 +1,17 @@
|
|
1
1
|
import requests
|
2
2
|
from typing import List
|
3
|
+
from dataclasses import dataclass, field
|
3
4
|
from llama_index.core.llms import LLM
|
4
5
|
from llama_index.core.base.llms.types import ChatMessage, CompletionResponse, CompletionResponseGen
|
5
6
|
|
6
7
|
|
8
|
+
@dataclass
|
7
9
|
class EuriaiLlamaIndexLLM(LLM):
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
max_tokens: int = 1000,
|
14
|
-
):
|
15
|
-
self.api_key = api_key
|
16
|
-
self.model = model
|
17
|
-
self.temperature = temperature
|
18
|
-
self.max_tokens = max_tokens
|
19
|
-
self.url = "https://api.euron.one/api/v1/chat/completions"
|
10
|
+
api_key: str
|
11
|
+
model: str = "gpt-4.1-nano"
|
12
|
+
temperature: float = 0.7
|
13
|
+
max_tokens: int = 1000
|
14
|
+
url: str = field(default="https://api.euron.one/api/v1/chat/completions", init=False)
|
20
15
|
|
21
16
|
@property
|
22
17
|
def metadata(self):
|
@@ -49,7 +44,7 @@ class EuriaiLlamaIndexLLM(LLM):
|
|
49
44
|
def complete(self, prompt: str, **kwargs) -> CompletionResponse:
|
50
45
|
return self.chat([ChatMessage(role="user", content=prompt)])
|
51
46
|
|
52
|
-
# Async
|
47
|
+
# Async & streaming not implemented
|
53
48
|
async def achat(self, messages: List[ChatMessage], **kwargs) -> CompletionResponse:
|
54
49
|
raise NotImplementedError("Async chat not implemented for Euriai.")
|
55
50
|
|
@@ -57,13 +52,13 @@ class EuriaiLlamaIndexLLM(LLM):
|
|
57
52
|
raise NotImplementedError("Async complete not implemented for Euriai.")
|
58
53
|
|
59
54
|
def stream_chat(self, messages: List[ChatMessage], **kwargs) -> CompletionResponseGen:
|
60
|
-
raise NotImplementedError("Streaming not supported
|
55
|
+
raise NotImplementedError("Streaming not supported.")
|
61
56
|
|
62
57
|
def stream_complete(self, prompt: str, **kwargs) -> CompletionResponseGen:
|
63
|
-
raise NotImplementedError("Streaming not supported
|
58
|
+
raise NotImplementedError("Streaming not supported.")
|
64
59
|
|
65
60
|
async def astream_chat(self, messages: List[ChatMessage], **kwargs) -> CompletionResponseGen:
|
66
|
-
raise NotImplementedError("Async streaming not supported
|
61
|
+
raise NotImplementedError("Async streaming not supported.")
|
67
62
|
|
68
63
|
async def astream_complete(self, prompt: str, **kwargs) -> CompletionResponseGen:
|
69
|
-
raise NotImplementedError("Async streaming not supported
|
64
|
+
raise NotImplementedError("Async streaming not supported.")
|
@@ -5,10 +5,10 @@ euriai/embedding.py,sha256=z-LLKU68tCrPi9QMs1tlKwyr7WJcjceCTkNQIFMG6vA,1276
|
|
5
5
|
euriai/langchain_embed.py,sha256=OXWWxiKJ4g24TFgnWPOCZvhK7G8xtSf0ppQ2zwHkIPM,584
|
6
6
|
euriai/langchain_llm.py,sha256=D5YvYwV7q9X2_vdoaQiPs7tNiUmjkGz-9Q-7M61hhkg,986
|
7
7
|
euriai/llamaindex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
euriai/llamaindex/euri_chat.py,sha256=
|
8
|
+
euriai/llamaindex/euri_chat.py,sha256=wBjo81Ds8qG8Owktw_n8QsVOB_l8OInDpFITyXEJb7c,2564
|
9
9
|
euriai/llamaindex/euri_embed.py,sha256=RO62uzT9rStp9_Ow2cYa_ZrGabkPFX89ZL3Mgb13X08,1063
|
10
|
-
euriai-0.3.
|
11
|
-
euriai-0.3.
|
12
|
-
euriai-0.3.
|
13
|
-
euriai-0.3.
|
14
|
-
euriai-0.3.
|
10
|
+
euriai-0.3.14.dist-info/METADATA,sha256=--ZO-0UztNBgeeERY5Aw_d5YDJKlXQmlS1xaQp95cEA,3257
|
11
|
+
euriai-0.3.14.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
12
|
+
euriai-0.3.14.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
|
13
|
+
euriai-0.3.14.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
|
14
|
+
euriai-0.3.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|