euriai 0.3.14__tar.gz → 0.3.16__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: euriai
3
- Version: 0.3.14
3
+ Version: 0.3.16
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
@@ -1,17 +1,30 @@
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
6
 
8
- @dataclass
9
7
  class EuriaiLlamaIndexLLM(LLM):
10
8
  api_key: str
11
9
  model: str = "gpt-4.1-nano"
12
10
  temperature: float = 0.7
13
11
  max_tokens: int = 1000
14
- url: str = field(default="https://api.euron.one/api/v1/chat/completions", init=False)
12
+ url: str = "https://api.euron.one/api/v1/chat/completions"
13
+
14
+ def __init__(
15
+ self,
16
+ api_key: str,
17
+ model: Optional[str] = None,
18
+ temperature: Optional[float] = None,
19
+ max_tokens: Optional[int] = None,
20
+ ):
21
+ # ✅ Pydantic-style super init with all fields
22
+ super().__init__(
23
+ api_key=api_key,
24
+ model=model or self.model,
25
+ temperature=temperature if temperature is not None else self.temperature,
26
+ max_tokens=max_tokens if max_tokens is not None else self.max_tokens,
27
+ )
15
28
 
16
29
  @property
17
30
  def metadata(self):
@@ -38,18 +51,16 @@ class EuriaiLlamaIndexLLM(LLM):
38
51
  response.raise_for_status()
39
52
  result = response.json()
40
53
  content = result["choices"][0]["message"]["content"]
41
-
42
54
  return CompletionResponse(text=content)
43
55
 
44
56
  def complete(self, prompt: str, **kwargs) -> CompletionResponse:
45
57
  return self.chat([ChatMessage(role="user", content=prompt)])
46
58
 
47
- # Async & streaming not implemented
48
59
  async def achat(self, messages: List[ChatMessage], **kwargs) -> CompletionResponse:
49
- raise NotImplementedError("Async chat not implemented for Euriai.")
60
+ raise NotImplementedError("Async chat not supported.")
50
61
 
51
62
  async def acomplete(self, prompt: str, **kwargs) -> CompletionResponse:
52
- raise NotImplementedError("Async complete not implemented for Euriai.")
63
+ raise NotImplementedError("Async complete not supported.")
53
64
 
54
65
  def stream_chat(self, messages: List[ChatMessage], **kwargs) -> CompletionResponseGen:
55
66
  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.16
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
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="euriai",
5
- version="0.3.14",
5
+ version="0.3.16",
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