euriai 0.3.14__py3-none-any.whl → 0.3.15__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.
@@ -1,17 +1,27 @@
1
1
  import requests
2
- from typing import List
3
- from dataclasses import dataclass, field
2
+ from typing import List, Optional
4
3
  from llama_index.core.llms import LLM
5
4
  from llama_index.core.base.llms.types import ChatMessage, CompletionResponse, CompletionResponseGen
6
5
 
7
-
8
- @dataclass
9
6
  class EuriaiLlamaIndexLLM(LLM):
10
7
  api_key: str
11
8
  model: str = "gpt-4.1-nano"
12
9
  temperature: float = 0.7
13
10
  max_tokens: int = 1000
14
- url: str = field(default="https://api.euron.one/api/v1/chat/completions", init=False)
11
+ url: str = "https://api.euron.one/api/v1/chat/completions"
12
+
13
+ def __init__(
14
+ self,
15
+ api_key: str,
16
+ model: Optional[str] = None,
17
+ temperature: Optional[float] = None,
18
+ max_tokens: Optional[int] = None
19
+ ):
20
+ super().__init__()
21
+ self.api_key = api_key
22
+ self.model = model or self.model
23
+ self.temperature = temperature if temperature is not None else self.temperature
24
+ self.max_tokens = max_tokens if max_tokens is not None else self.max_tokens
15
25
 
16
26
  @property
17
27
  def metadata(self):
@@ -38,18 +48,16 @@ class EuriaiLlamaIndexLLM(LLM):
38
48
  response.raise_for_status()
39
49
  result = response.json()
40
50
  content = result["choices"][0]["message"]["content"]
41
-
42
51
  return CompletionResponse(text=content)
43
52
 
44
53
  def complete(self, prompt: str, **kwargs) -> CompletionResponse:
45
54
  return self.chat([ChatMessage(role="user", content=prompt)])
46
55
 
47
- # Async & streaming not implemented
48
56
  async def achat(self, messages: List[ChatMessage], **kwargs) -> CompletionResponse:
49
- raise NotImplementedError("Async chat not implemented for Euriai.")
57
+ raise NotImplementedError("Async chat not supported.")
50
58
 
51
59
  async def acomplete(self, prompt: str, **kwargs) -> CompletionResponse:
52
- raise NotImplementedError("Async complete not implemented for Euriai.")
60
+ raise NotImplementedError("Async complete not supported.")
53
61
 
54
62
  def stream_chat(self, messages: List[ChatMessage], **kwargs) -> CompletionResponseGen:
55
63
  raise NotImplementedError("Streaming not supported.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: euriai
3
- Version: 0.3.14
3
+ Version: 0.3.15
4
4
  Summary: Python client for EURI LLM API (euron.one) with CLI, LangChain, and LlamaIndex integration
5
5
  Author: euron.one
6
6
  Author-email: sudhanshu@euron.one
@@ -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=wBjo81Ds8qG8Owktw_n8QsVOB_l8OInDpFITyXEJb7c,2564
8
+ euriai/llamaindex/euri_chat.py,sha256=3sUKzSmM3E_Rg5x7gEMQWHX45_Y3DC4Rsul5sF_7qhs,2891
9
9
  euriai/llamaindex/euri_embed.py,sha256=RO62uzT9rStp9_Ow2cYa_ZrGabkPFX89ZL3Mgb13X08,1063
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,,
10
+ euriai-0.3.15.dist-info/METADATA,sha256=YvnSilgl-fe_cv0yXPnLvyF3ZmpNO3YxsQKAfY5vB44,3257
11
+ euriai-0.3.15.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
12
+ euriai-0.3.15.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
13
+ euriai-0.3.15.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
14
+ euriai-0.3.15.dist-info/RECORD,,