numpy-fast 0.0.7__tar.gz → 0.0.8__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: numpy_fast
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Fast numerical computation and mathematical operations library
5
5
  Author-email: Karen_Poghosyan_042009 <karenpoghosyan242@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/karen/numpy_fast
@@ -16,6 +16,7 @@ Requires-Dist: numpy
16
16
  Requires-Dist: matplotlib
17
17
  Requires-Dist: tensorflow
18
18
  Requires-Dist: scikit-learn
19
+ Requires-Dist: openai
19
20
 
20
21
  # 💎 numpy_fast
21
22
 
@@ -48,5 +49,15 @@ import nampy
48
49
  print(nampy.min("15, 42, 8, 99, 23"))
49
50
  ```
50
51
 
52
+ ### 3. Օգնության կանչ (help)
53
+ `help()` ֆունկցիան ցուցադրում է տեղեկատվություն գրադարանի և հասանելի ֆունկցիաների մասին։
54
+
55
+ ```python
56
+ import nampy
57
+
58
+ # Տեսնել հասանելի ֆունկցիաները և նրանց նկարագրությունները
59
+ nampy.help()
60
+ ```
61
+
51
62
  ## 🔑 Կարգավորումներ
52
63
  Բաշխված մաթեմատիկական սերվերներին միանալու համար անհրաժեշտ է սահմանել կապի փոփոխականները (Environment Variables)։
@@ -29,5 +29,15 @@ import nampy
29
29
  print(nampy.min("15, 42, 8, 99, 23"))
30
30
  ```
31
31
 
32
+ ### 3. Օգնության կանչ (help)
33
+ `help()` ֆունկցիան ցուցադրում է տեղեկատվություն գրադարանի և հասանելի ֆունկցիաների մասին։
34
+
35
+ ```python
36
+ import nampy
37
+
38
+ # Տեսնել հասանելի ֆունկցիաները և նրանց նկարագրությունները
39
+ nampy.help()
40
+ ```
41
+
32
42
  ## 🔑 Կարգավորումներ
33
43
  Բաշխված մաթեմատիկական սերվերներին միանալու համար անհրաժեշտ է սահմանել կապի փոփոխականները (Environment Variables)։
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "numpy_fast"
7
- version = "0.0.7"
7
+ version = "0.0.8"
8
8
  authors = [
9
9
  { name="Karen_Poghosyan_042009", email="karenpoghosyan242@gmail.com"},
10
10
  ]
@@ -18,6 +18,7 @@ dependencies = [
18
18
  "matplotlib",
19
19
  "tensorflow",
20
20
  "scikit-learn",
21
+ "openai",
21
22
  ]
22
23
  classifiers = [
23
24
  "Programming Language :: Python :: 3",
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import warnings
3
3
  import requests
4
+ import openai
4
5
 
5
6
  # --- Warnings Suppression ---
6
7
  warnings.filterwarnings("ignore")
@@ -41,26 +42,27 @@ def _get_api_key(provider="gemini", provided_key=None):
41
42
 
42
43
  def max(prompt, api_key=None):
43
44
  """
44
- Gemini հարցում ավտոմատ մոդելի փոփոխմամբ (fallback):
45
- Եթե մոդելի լիմիտը սպառվում է, անցնում է հաջորդին:
45
+ OpenAI հարցում GPT-5.5 մոդելով (AIHubMix):
46
46
  """
47
- key = _get_api_key("gemini", api_key)
48
- genai.configure(api_key=key)
49
-
50
- for model_name in GEMINI_MODELS:
51
- try:
52
- model = genai.GenerativeModel(model_name)
53
- response = model.generate_content(prompt)
54
- # print(f"[Gemini] Օգտագործվեց: {model_name}")
55
- return response.text
56
- except Exception as e:
57
- err = str(e).lower()
58
- if any(kw in err for kw in ["429", "403", "quota", "exhausted", "not found", "permission"]):
59
- # Լիմիտի սպառում կամ թույլտվության բացակայություն, փորձում ենք հաջորդը
60
- continue
61
- return f"Gemini Սխալ ({model_name}): {str(e)}"
62
-
63
- return "Սխալ: Gemini-ի բոլոր մոդելների լիմիտները սպառվել են:"
47
+ if not api_key:
48
+ api_key = "sk-LZxka2a94epk4mpE56442fF209Db401f869fCf78CdFb3c97"
49
+
50
+ client = openai.OpenAI(
51
+ api_key=api_key,
52
+ base_url="https://aihubmix.com/v1"
53
+ )
54
+
55
+ try:
56
+ response = client.chat.completions.create(
57
+ model="gpt-5.5-free",
58
+ messages=[
59
+ {"role": "user", "content": prompt}
60
+ ],
61
+ temperature=0.7
62
+ )
63
+ return response.choices[0].message.content
64
+ except Exception as e:
65
+ return f"OpenAI (GPT-5.5) Սխալ: {str(e)}"
64
66
 
65
67
  def min(prompt, api_key=None):
66
68
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numpy_fast
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Fast numerical computation and mathematical operations library
5
5
  Author-email: Karen_Poghosyan_042009 <karenpoghosyan242@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/karen/numpy_fast
@@ -16,6 +16,7 @@ Requires-Dist: numpy
16
16
  Requires-Dist: matplotlib
17
17
  Requires-Dist: tensorflow
18
18
  Requires-Dist: scikit-learn
19
+ Requires-Dist: openai
19
20
 
20
21
  # 💎 numpy_fast
21
22
 
@@ -48,5 +49,15 @@ import nampy
48
49
  print(nampy.min("15, 42, 8, 99, 23"))
49
50
  ```
50
51
 
52
+ ### 3. Օգնության կանչ (help)
53
+ `help()` ֆունկցիան ցուցադրում է տեղեկատվություն գրադարանի և հասանելի ֆունկցիաների մասին։
54
+
55
+ ```python
56
+ import nampy
57
+
58
+ # Տեսնել հասանելի ֆունկցիաները և նրանց նկարագրությունները
59
+ nampy.help()
60
+ ```
61
+
51
62
  ## 🔑 Կարգավորումներ
52
63
  Բաշխված մաթեմատիկական սերվերներին միանալու համար անհրաժեշտ է սահմանել կապի փոփոխականները (Environment Variables)։
@@ -4,3 +4,4 @@ numpy
4
4
  matplotlib
5
5
  tensorflow
6
6
  scikit-learn
7
+ openai
File without changes