patchllm 0.1.0__tar.gz → 0.1.1__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: patchllm
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Lightweight tool to manage contexts and update code with LLMs
5
5
  Author: nassimberrada
6
6
  License: MIT License
@@ -28,6 +28,10 @@ Requires-Python: >=3.8
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
30
  Requires-Dist: litellm
31
+ Requires-Dist: python-dotenv
32
+ Provides-Extra: voice
33
+ Requires-Dist: SpeechRecognition; extra == "voice"
34
+ Requires-Dist: pyttsx3; extra == "voice"
31
35
  Dynamic: license-file
32
36
 
33
37
  <p align="center">
@@ -0,0 +1 @@
1
+ from .main import Assistant
@@ -1,8 +1,8 @@
1
1
  import sys
2
2
 
3
- from context import build_context
4
- from parser import paste_response
5
- from utils import load_from_py_file
3
+ from .context import build_context
4
+ from .parser import paste_response
5
+ from .utils import load_from_py_file
6
6
  import textwrap
7
7
  import argparse
8
8
  import litellm
@@ -18,16 +18,21 @@ class Assistant:
18
18
  def __init__(
19
19
  self,
20
20
  model_name="gemini/gemini-2.5-flash",
21
+ configs: dict = None,
21
22
  configs_file = "./configs.py",
22
23
  ):
23
24
  """
24
25
  Initializes the Assistant.
25
26
  Args:
26
27
  model_name (str): The alias for the generative model to use (must be a litellm supported model string).
28
+ configs (Dict[str]): A dictionary of configurations to use for building the code context.
27
29
  configs_file (str): The path to the configurations file.
28
30
  """
29
31
  self.model_name = model_name
30
- self.configs = load_from_py_file(configs_file, "configs")
32
+ if configs:
33
+ self.configs = configs
34
+ else:
35
+ self.configs = load_from_py_file(configs_file, "configs")
31
36
  system_prompt = textwrap.dedent("""
32
37
  You are an expert pair programmer. Your purpose is to help users by modifying files based on their instructions.
33
38
 
@@ -192,7 +197,7 @@ def main():
192
197
 
193
198
  # Handle voice input
194
199
  if args.voice not in ["False", "false"]:
195
- from listener import listen, speak
200
+ from .listener import listen, speak
196
201
 
197
202
  speak("Say your task instruction.")
198
203
  task = listen()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: patchllm
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Lightweight tool to manage contexts and update code with LLMs
5
5
  Author: nassimberrada
6
6
  License: MIT License
@@ -28,6 +28,10 @@ Requires-Python: >=3.8
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
30
  Requires-Dist: litellm
31
+ Requires-Dist: python-dotenv
32
+ Provides-Extra: voice
33
+ Requires-Dist: SpeechRecognition; extra == "voice"
34
+ Requires-Dist: pyttsx3; extra == "voice"
31
35
  Dynamic: license-file
32
36
 
33
37
  <p align="center">
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ patchllm = patchllm.main:main
@@ -0,0 +1,6 @@
1
+ litellm
2
+ python-dotenv
3
+
4
+ [voice]
5
+ SpeechRecognition
6
+ pyttsx3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "patchllm"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Lightweight tool to manage contexts and update code with LLMs"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -12,10 +12,20 @@ license = {file = "LICENSE"}
12
12
  authors = [
13
13
  {name="nassimberrada"},
14
14
  ]
15
- dependencies = ["litellm"]
15
+
16
+ dependencies = [
17
+ "litellm",
18
+ "python-dotenv"
19
+ ]
16
20
 
17
21
  [project.scripts]
18
- yourtool = "patchllm.main:main"
22
+ patchllm = "patchllm.main:main"
23
+
24
+ [project.optional-dependencies]
25
+ voice = [
26
+ "SpeechRecognition",
27
+ "pyttsx3"
28
+ ]
19
29
 
20
30
  [tool.setuptools.packages.find]
21
- where = ["."]
31
+ where = ["."]
File without changes
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- yourtool = patchllm.main:main
@@ -1 +0,0 @@
1
- litellm
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes