PikoAi 0.1.18__tar.gz → 0.1.19__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 (45) hide show
  1. {pikoai-0.1.18 → pikoai-0.1.19}/PKG-INFO +1 -1
  2. {pikoai-0.1.18 → pikoai-0.1.19}/Src/PikoAi.egg-info/PKG-INFO +1 -1
  3. {pikoai-0.1.18 → pikoai-0.1.19}/Src/llm_interface/llm.py +2 -28
  4. {pikoai-0.1.18 → pikoai-0.1.19}/setup.py +1 -1
  5. {pikoai-0.1.18 → pikoai-0.1.19}/LICENSE +0 -0
  6. {pikoai-0.1.18 → pikoai-0.1.19}/README.md +0 -0
  7. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Agents/Executor/__init__.py +0 -0
  8. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Agents/Executor/executor.py +0 -0
  9. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Agents/Executor/prompts.py +0 -0
  10. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Agents/__init__.py +0 -0
  11. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/__init__.py +0 -0
  12. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/base_env.py +0 -0
  13. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/base_executor.py +0 -0
  14. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/env.py +0 -0
  15. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/js_executor.py +0 -0
  16. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/python_executor.py +0 -0
  17. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/shell.py +0 -0
  18. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/tests/__init__.py +0 -0
  19. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/tests/test_python_executor.py +0 -0
  20. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Env/tests/test_shell_executor.py +0 -0
  21. {pikoai-0.1.18 → pikoai-0.1.19}/Src/OpenCopilot.py +0 -0
  22. {pikoai-0.1.18 → pikoai-0.1.19}/Src/PikoAi.egg-info/SOURCES.txt +0 -0
  23. {pikoai-0.1.18 → pikoai-0.1.19}/Src/PikoAi.egg-info/dependency_links.txt +0 -0
  24. {pikoai-0.1.18 → pikoai-0.1.19}/Src/PikoAi.egg-info/entry_points.txt +0 -0
  25. {pikoai-0.1.18 → pikoai-0.1.19}/Src/PikoAi.egg-info/requires.txt +0 -0
  26. {pikoai-0.1.18 → pikoai-0.1.19}/Src/PikoAi.egg-info/top_level.txt +0 -0
  27. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/__init__.py +0 -0
  28. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/file_task.py +0 -0
  29. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/system_details.py +0 -0
  30. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/tool_dir.json +0 -0
  31. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/tool_manager.py +0 -0
  32. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/userinp.py +0 -0
  33. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/web_loader.py +0 -0
  34. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Tools/web_search.py +0 -0
  35. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Utils/__init__.py +0 -0
  36. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Utils/executor_utils.py +0 -0
  37. {pikoai-0.1.18 → pikoai-0.1.19}/Src/Utils/ter_interface.py +0 -0
  38. {pikoai-0.1.18 → pikoai-0.1.19}/Src/cli.py +0 -0
  39. {pikoai-0.1.18 → pikoai-0.1.19}/Src/llm_interface/__init__.py +0 -0
  40. {pikoai-0.1.18 → pikoai-0.1.19}/setup.cfg +0 -0
  41. {pikoai-0.1.18 → pikoai-0.1.19}/test/test.py +0 -0
  42. {pikoai-0.1.18 → pikoai-0.1.19}/test/test_file_task.py +0 -0
  43. {pikoai-0.1.18 → pikoai-0.1.19}/test/test_opencopilot_file_integration.py +0 -0
  44. {pikoai-0.1.18 → pikoai-0.1.19}/test/testjs.py +0 -0
  45. {pikoai-0.1.18 → pikoai-0.1.19}/test/testscript.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PikoAi
3
- Version: 0.1.18
3
+ Version: 0.1.19
4
4
  Summary: An AI-powered task automation tool
5
5
  Home-page: https://github.com/nihaaaar22/OS-Assistant
6
6
  Author: Nihar S
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PikoAi
3
- Version: 0.1.18
3
+ Version: 0.1.19
4
4
  Summary: An AI-powered task automation tool
5
5
  Home-page: https://github.com/nihaaaar22/OS-Assistant
6
6
  Author: Nihar S
@@ -7,26 +7,11 @@ import os
7
7
  import sys
8
8
  import json
9
9
  import litellm # Added import for litellm
10
- import logging
11
- from datetime import datetime
12
10
 
13
11
  sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../')))
14
12
 
15
13
  from Utils.ter_interface import TerminalInterface
16
14
 
17
- # Set up logging
18
- log_dir = os.path.join(os.path.dirname(__file__), '../../logs')
19
- os.makedirs(log_dir, exist_ok=True)
20
- log_file = os.path.join(log_dir, 'llm_responses.log')
21
-
22
- # Configure logging
23
- logging.basicConfig(
24
- level=logging.INFO,
25
- format='%(asctime)s - %(message)s',
26
- handlers=[
27
- logging.FileHandler(log_file) # Only log to file, removed StreamHandler
28
- ]
29
- )
30
15
 
31
16
  # Load environment variables from .env file
32
17
  load_dotenv()
@@ -45,15 +30,6 @@ class LiteLLMInterface:
45
30
  def __init__(self):
46
31
  self.terminal = TerminalInterface()
47
32
  self.model_name = self.load_config()
48
- logging.info(f"\n{'='*50}\nNew Session - Using model: {self.model_name}\n{'='*50}")
49
-
50
- def log_response(self, response_content):
51
- """Log only the LLM response in a readable format."""
52
- timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
53
- log_entry = f"\n{'='*50}\nTimestamp: {timestamp}\nModel: {self.model_name}\n\n"
54
- log_entry += f"Response:\n{response_content}\n"
55
- log_entry += f"{'='*50}\n"
56
- logging.info(log_entry)
57
33
 
58
34
  def load_config(self):
59
35
  config_path = os.path.join(os.path.dirname(__file__), '../../config.json')
@@ -84,12 +60,10 @@ class LiteLLMInterface:
84
60
  response_content += content
85
61
 
86
62
  self.terminal.flush_markdown()
87
- # Log only the response after successful completion
88
- self.log_response(response_content)
89
63
  return response_content
90
64
  except Exception as e:
91
- # Log the error
92
- logging.error(f"\n{'='*50}\nError occurred:\nModel: {self.model_name}\nError: {str(e)}\n{'='*50}")
65
+ # litellm maps exceptions to OpenAI exceptions.
66
+ # The executor should catch these and handle them.
93
67
  print(f"An error occurred during the API call: {e}")
94
68
  self.terminal.flush_markdown() # Ensure terminal is flushed even on error
95
69
  raise # Re-raise the exception to be caught by the executor
@@ -3,7 +3,7 @@ from pathlib import Path
3
3
 
4
4
  setup(
5
5
  name="PikoAi",
6
- version="0.1.18",
6
+ version="0.1.19",
7
7
  packages=find_packages(where="Src"),
8
8
  py_modules=["cli", "OpenCopilot"],
9
9
  package_dir={"": "Src"},
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes