ai-microcore 4.0.0.dev20__tar.gz → 4.0.0.dev22__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.
Files changed (43) hide show
  1. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/PKG-INFO +9 -11
  2. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/README.md +5 -8
  3. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/__init__.py +1 -1
  4. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/interactive_setup.py +6 -4
  5. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/mcp.py +1 -2
  6. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/ui.py +5 -5
  7. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/pyproject.toml +3 -2
  8. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/LICENSE +0 -0
  9. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/_env.py +0 -0
  10. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/_llm_functions.py +0 -0
  11. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/_prepare_llm_args.py +0 -0
  12. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/ai_func/__init__.py +0 -0
  13. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/ai_func/ai-func.json.j2 +0 -0
  14. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/ai_func/ai-func.pythonic.j2 +0 -0
  15. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/ai_modules.py +0 -0
  16. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/configuration.py +0 -0
  17. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/embedding_db/__init__.py +0 -0
  18. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/embedding_db/chromadb.py +0 -0
  19. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/file_storage.py +0 -0
  20. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/json_parsing.py +0 -0
  21. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/__init__.py +0 -0
  22. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/_openai_llm_v0.py +0 -0
  23. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/_openai_llm_v1.py +0 -0
  24. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/anthropic.py +0 -0
  25. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/google_genai.py +0 -0
  26. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/google_vertex_ai.py +0 -0
  27. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/local_llm.py +0 -0
  28. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/local_transformers.py +0 -0
  29. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/openai_llm.py +0 -0
  30. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/llm/shared.py +0 -0
  31. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/logging.py +0 -0
  32. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/message_types.py +0 -0
  33. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/metrics.py +0 -0
  34. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/python.py +0 -0
  35. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/templating/__init__.py +0 -0
  36. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/templating/jinja2.py +0 -0
  37. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/text2speech/elevenlabs.py +0 -0
  38. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/tokenizing.py +0 -0
  39. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/types.py +0 -0
  40. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/utils.py +0 -0
  41. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/wrappers/__init__.py +0 -0
  42. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/wrappers/llm_response_wrapper.py +0 -0
  43. {ai_microcore-4.0.0.dev20 → ai_microcore-4.0.0.dev22}/microcore/wrappers/prompt_wrapper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-microcore
3
- Version: 4.0.0.dev20
3
+ Version: 4.0.0.dev22
4
4
  Summary: # Minimalistic Foundation for AI Applications
5
5
  Keywords: llm,large language models,ai,similarity search,ai search,gpt,openai,framework,adapter
6
6
  Author-email: Vitalii Stepanenko <mail@vitalii.in>
@@ -17,13 +17,14 @@ Classifier: Intended Audience :: Developers
17
17
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
18
18
  License-File: LICENSE
19
19
  Requires-Dist: openai>=0.28.1,<2
20
- Requires-Dist: python-dotenv~=1.0.0
20
+ Requires-Dist: python-dotenv~=1.1.0
21
21
  Requires-Dist: Jinja2~=3.1.2
22
22
  Requires-Dist: colorama~=0.4.6
23
23
  Requires-Dist: PyYAML~=6.0
24
24
  Requires-Dist: chardet~=5.2.0
25
25
  Requires-Dist: tiktoken>=0.7.0,<1.0
26
- Requires-Dist: mcp~=1.9.1
26
+ Requires-Dist: mcp~=1.9.2
27
+ Requires-Dist: fastmcp~=2.8.0
27
28
  Requires-Dist: docstring_parser~=0.16.0
28
29
  Project-URL: Source Code, https://github.com/Nayjest/ai-microcore
29
30
 
@@ -31,7 +32,7 @@ Project-URL: Source Code, https://github.com/Nayjest/ai-microcore
31
32
  <a href="https://github.com/Nayjest/ai-microcore/releases" target="_blank"><img src="https://img.shields.io/github/v/release/Nayjest/ai-microcore.svg" alt="Release Notes"></a>
32
33
  <a href="https://app.codacy.com/gh/Nayjest/ai-microcore/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade" target="_blank"><img src="https://app.codacy.com/project/badge/Grade/441d03416bc048828c649129530dcbc3" alt="Code Quality"></a>
33
34
  <a href="https://github.com/Nayjest/ai-microcore/actions/workflows/pylint.yml" target="_blank"><img src="https://github.com/Nayjest/ai-microcore/actions/workflows/pylint.yml/badge.svg" alt="Pylint"></a>
34
- <img src="coverage.svg" alt="Code Coverage">
35
+ <img src="https://github.com/Nayjest/ai-microcore/blob/main/coverage.svg" alt="Code Coverage">
35
36
  <a href="https://github.com/Nayjest/ai-microcore/actions/workflows/tests.yml" target="_blank"><img src="https://github.com/Nayjest/ai-microcore/actions/workflows/tests.yml/badge.svg" alt="Tests"></a>
36
37
  <a href="https://github.com/Nayjest/ai-microcore/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/static/v1?label=license&message=MIT&color=d08aff" alt="License"></a>
37
38
  </p>
@@ -65,9 +66,9 @@ while user_msg := input('Enter message: '):
65
66
 
66
67
  ## 🔗 Links
67
68
 
68
- - [API Reference](https://ai-microcore.github.io/api-reference/)
69
- - [PyPi Package](https://pypi.org/project/ai-microcore/)
70
- - [GitHub Repository](https://github.com/Nayjest/ai-microcore)
69
+ - [API Reference](https://ai-microcore.github.io/api-reference/)
70
+ - [PyPi Package](https://pypi.org/project/ai-microcore/)
71
+ - [GitHub Repository](https://github.com/Nayjest/ai-microcore)
71
72
 
72
73
 
73
74
  ## 💻 Installation
@@ -85,10 +86,7 @@ git clone git@github.com:Nayjest/ai-microcore.git && mv ai-microcore/microcore .
85
86
 
86
87
  ## 📋 Requirements
87
88
 
88
- Python 3.10 / 3.11 / 3.12 / 3.13
89
-
90
- Both v0.28+ and v1.X OpenAI package versions are supported.
91
-
89
+ Python 3.10 / 3.11 / 3.12 / 3.13 / 3.14
92
90
 
93
91
  ## ⚙️ Configuring
94
92
 
@@ -2,7 +2,7 @@
2
2
  <a href="https://github.com/Nayjest/ai-microcore/releases" target="_blank"><img src="https://img.shields.io/github/v/release/Nayjest/ai-microcore.svg" alt="Release Notes"></a>
3
3
  <a href="https://app.codacy.com/gh/Nayjest/ai-microcore/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade" target="_blank"><img src="https://app.codacy.com/project/badge/Grade/441d03416bc048828c649129530dcbc3" alt="Code Quality"></a>
4
4
  <a href="https://github.com/Nayjest/ai-microcore/actions/workflows/pylint.yml" target="_blank"><img src="https://github.com/Nayjest/ai-microcore/actions/workflows/pylint.yml/badge.svg" alt="Pylint"></a>
5
- <img src="coverage.svg" alt="Code Coverage">
5
+ <img src="https://github.com/Nayjest/ai-microcore/blob/main/coverage.svg" alt="Code Coverage">
6
6
  <a href="https://github.com/Nayjest/ai-microcore/actions/workflows/tests.yml" target="_blank"><img src="https://github.com/Nayjest/ai-microcore/actions/workflows/tests.yml/badge.svg" alt="Tests"></a>
7
7
  <a href="https://github.com/Nayjest/ai-microcore/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/static/v1?label=license&message=MIT&color=d08aff" alt="License"></a>
8
8
  </p>
@@ -36,9 +36,9 @@ while user_msg := input('Enter message: '):
36
36
 
37
37
  ## 🔗 Links
38
38
 
39
- - [API Reference](https://ai-microcore.github.io/api-reference/)
40
- - [PyPi Package](https://pypi.org/project/ai-microcore/)
41
- - [GitHub Repository](https://github.com/Nayjest/ai-microcore)
39
+ - [API Reference](https://ai-microcore.github.io/api-reference/)
40
+ - [PyPi Package](https://pypi.org/project/ai-microcore/)
41
+ - [GitHub Repository](https://github.com/Nayjest/ai-microcore)
42
42
 
43
43
 
44
44
  ## 💻 Installation
@@ -56,10 +56,7 @@ git clone git@github.com:Nayjest/ai-microcore.git && mv ai-microcore/microcore .
56
56
 
57
57
  ## 📋 Requirements
58
58
 
59
- Python 3.10 / 3.11 / 3.12 / 3.13
60
-
61
- Both v0.28+ and v1.X OpenAI package versions are supported.
62
-
59
+ Python 3.10 / 3.11 / 3.12 / 3.13 / 3.14
63
60
 
64
61
  ## ⚙️ Configuring
65
62
 
@@ -186,4 +186,4 @@ __all__ = [
186
186
  # "wrappers",
187
187
  ]
188
188
 
189
- __version__ = "4.0.0-dev20"
189
+ __version__ = "4.0.0-dev22"
@@ -31,11 +31,13 @@ def interactive_setup(
31
31
  list(i.value for i in ApiType if not ApiType.is_local(i)),
32
32
  )
33
33
  if "LLM_API_KEY" not in raw_config:
34
- raw_config["LLM_API_KEY"] = ask_non_empty("API Key: ")
34
+ raw_config["LLM_API_KEY"] = ask_non_empty("API Key: ").strip()
35
35
  if "MODEL" not in raw_config:
36
- raw_config["MODEL"] = ask_non_empty("Model Name: ")
36
+ raw_config["MODEL"] = ask_non_empty("Model Name: ").strip()
37
37
  if "LLM_API_BASE" not in raw_config:
38
- raw_config["LLM_API_BASE"] = input("API Base URL (may be empty for some API types): ")
38
+ raw_config["LLM_API_BASE"] = input(
39
+ "API Base URL (may be empty for some API types): "
40
+ ).strip()
39
41
  if extras:
40
42
  if isinstance(extras, list):
41
43
  extras = {
@@ -50,7 +52,7 @@ def interactive_setup(
50
52
  }
51
53
  for field, title in extras.items():
52
54
  if field not in raw_config:
53
- raw_config[field] = ask_non_empty(f"{title}: ")
55
+ raw_config[field] = ask_non_empty(f"{title}: ").strip()
54
56
  try:
55
57
  config = configure(
56
58
  **{
@@ -76,8 +76,7 @@ class MCPConnection:
76
76
  use_cache: bool = True,
77
77
  connect_timeout: float = 10,
78
78
  ) -> "MCPConnection":
79
- con: MCPConnection = MCPConnection()
80
- con.transport = transport
79
+ con: MCPConnection = MCPConnection(url=url, transport=transport)
81
80
  con._client = Client(url, timeout=connect_timeout) # pylint: disable=W0212
82
81
  await con._client.__aenter__() # pylint: disable=E1101,W0212,C2801
83
82
  if fetch_tools:
@@ -38,13 +38,13 @@ def ask_yn(msg: str, default: bool | None = None) -> bool:
38
38
 
39
39
 
40
40
  def ask_choose(msg: str, variants: list):
41
- i = 0
41
+ idx = 0
42
42
  if isinstance(variants, list):
43
43
  for item in variants:
44
- i += 1
45
- print(f"\t{Fore.MAGENTA}{i}:{Fore.RESET}\t{item}")
44
+ idx += 1
45
+ print(f"\t{Fore.MAGENTA}{idx}:{Fore.RESET}\t{item}")
46
46
  while True:
47
- i = input(f"{msg} {Fore.MAGENTA}[1-{len(variants)}]{Fore.RESET}: ")
47
+ i = input(f"{msg} {Fore.MAGENTA}[1-{len(variants)}]{Fore.RESET}: ").strip()
48
48
  if not i.isdigit():
49
49
  error("Not a number")
50
50
  continue
@@ -58,7 +58,7 @@ def ask_choose(msg: str, variants: list):
58
58
  return item
59
59
 
60
60
 
61
- def ask_non_empty(msg):
61
+ def ask_non_empty(msg) -> str:
62
62
  while True:
63
63
  i = input(msg)
64
64
  if i.strip():
@@ -20,13 +20,14 @@ classifiers = [
20
20
 
21
21
  dependencies = [
22
22
  "openai>=0.28.1,<2",
23
- "python-dotenv~=1.0.0",
23
+ "python-dotenv~=1.1.0",
24
24
  "Jinja2~=3.1.2",
25
25
  "colorama~=0.4.6",
26
26
  "PyYAML~=6.0",
27
27
  "chardet~=5.2.0",
28
28
  "tiktoken>=0.7.0,<1.0",
29
- "mcp~=1.9.1",
29
+ "mcp~=1.9.2",
30
+ "fastmcp~=2.8.0",
30
31
  "docstring_parser~=0.16.0",
31
32
  ]
32
33
  requires-python = ">=3.10"