ngpt 3.4.0__tar.gz → 3.4.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.
Files changed (61) hide show
  1. {ngpt-3.4.0 → ngpt-3.4.1}/PKG-INFO +1 -1
  2. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/args.py +35 -10
  3. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/utils/cli_config.py +1 -1
  4. {ngpt-3.4.0 → ngpt-3.4.1}/pyproject.toml +1 -1
  5. {ngpt-3.4.0 → ngpt-3.4.1}/uv.lock +1 -1
  6. {ngpt-3.4.0 → ngpt-3.4.1}/.github/workflows/aur-publish.yml +0 -0
  7. {ngpt-3.4.0 → ngpt-3.4.1}/.github/workflows/python-publish.yml +0 -0
  8. {ngpt-3.4.0 → ngpt-3.4.1}/.gitignore +0 -0
  9. {ngpt-3.4.0 → ngpt-3.4.1}/.python-version +0 -0
  10. {ngpt-3.4.0 → ngpt-3.4.1}/COMMIT_GUIDELINES.md +0 -0
  11. {ngpt-3.4.0 → ngpt-3.4.1}/CONTRIBUTING.md +0 -0
  12. {ngpt-3.4.0 → ngpt-3.4.1}/LICENSE +0 -0
  13. {ngpt-3.4.0 → ngpt-3.4.1}/PKGBUILD +0 -0
  14. {ngpt-3.4.0 → ngpt-3.4.1}/README.md +0 -0
  15. {ngpt-3.4.0 → ngpt-3.4.1}/docs/CONTRIBUTING.md +0 -0
  16. {ngpt-3.4.0 → ngpt-3.4.1}/docs/LICENSE.md +0 -0
  17. {ngpt-3.4.0 → ngpt-3.4.1}/docs/README.md +0 -0
  18. {ngpt-3.4.0 → ngpt-3.4.1}/docs/_config.yml +0 -0
  19. {ngpt-3.4.0 → ngpt-3.4.1}/docs/api/README.md +0 -0
  20. {ngpt-3.4.0 → ngpt-3.4.1}/docs/api/cli.md +0 -0
  21. {ngpt-3.4.0 → ngpt-3.4.1}/docs/api/cli_config.md +0 -0
  22. {ngpt-3.4.0 → ngpt-3.4.1}/docs/api/client.md +0 -0
  23. {ngpt-3.4.0 → ngpt-3.4.1}/docs/api/config.md +0 -0
  24. {ngpt-3.4.0 → ngpt-3.4.1}/docs/api/logging.md +0 -0
  25. {ngpt-3.4.0 → ngpt-3.4.1}/docs/assets/css/style.scss +0 -0
  26. {ngpt-3.4.0 → ngpt-3.4.1}/docs/configuration.md +0 -0
  27. {ngpt-3.4.0 → ngpt-3.4.1}/docs/examples/README.md +0 -0
  28. {ngpt-3.4.0 → ngpt-3.4.1}/docs/examples/advanced.md +0 -0
  29. {ngpt-3.4.0 → ngpt-3.4.1}/docs/examples/basic.md +0 -0
  30. {ngpt-3.4.0 → ngpt-3.4.1}/docs/examples/cli_components.md +0 -0
  31. {ngpt-3.4.0 → ngpt-3.4.1}/docs/examples/integrations.md +0 -0
  32. {ngpt-3.4.0 → ngpt-3.4.1}/docs/installation.md +0 -0
  33. {ngpt-3.4.0 → ngpt-3.4.1}/docs/overview.md +0 -0
  34. {ngpt-3.4.0 → ngpt-3.4.1}/docs/usage/README.md +0 -0
  35. {ngpt-3.4.0 → ngpt-3.4.1}/docs/usage/cli_config.md +0 -0
  36. {ngpt-3.4.0 → ngpt-3.4.1}/docs/usage/cli_framework.md +0 -0
  37. {ngpt-3.4.0 → ngpt-3.4.1}/docs/usage/cli_usage.md +0 -0
  38. {ngpt-3.4.0 → ngpt-3.4.1}/docs/usage/gitcommsg.md +0 -0
  39. {ngpt-3.4.0 → ngpt-3.4.1}/docs/usage/library_usage.md +0 -0
  40. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/__init__.py +0 -0
  41. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/__main__.py +0 -0
  42. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/__init__.py +0 -0
  43. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/config_manager.py +0 -0
  44. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/formatters.py +0 -0
  45. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/interactive.py +0 -0
  46. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/main.py +0 -0
  47. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/modes/__init__.py +0 -0
  48. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/modes/chat.py +0 -0
  49. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/modes/code.py +0 -0
  50. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/modes/gitcommsg.py +0 -0
  51. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/modes/rewrite.py +0 -0
  52. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/modes/shell.py +0 -0
  53. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/modes/text.py +0 -0
  54. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/renderers.py +0 -0
  55. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/cli/ui.py +0 -0
  56. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/client.py +0 -0
  57. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/utils/__init__.py +0 -0
  58. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/utils/config.py +0 -0
  59. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/utils/log.py +0 -0
  60. {ngpt-3.4.0 → ngpt-3.4.1}/ngpt/utils/web_search.py +0 -0
  61. {ngpt-3.4.0 → ngpt-3.4.1}/wiki.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 3.4.0
3
+ Version: 3.4.1
4
4
  Summary: Swiss army knife for LLMs: powerful CLI, interactive chatbot, and flexible Python library. Works with OpenAI, Ollama, Groq, Claude, Gemini, and any OpenAI-compatible API.
5
5
  Project-URL: Homepage, https://github.com/nazdridoy/ngpt
6
6
  Project-URL: Repository, https://github.com/nazdridoy/ngpt
@@ -79,14 +79,19 @@ def setup_argument_parser():
79
79
  help='Set filepath to log conversation to, or create a temporary log file if no path provided')
80
80
  global_group.add_argument('--preprompt',
81
81
  help='Set custom system prompt to control AI behavior')
82
- global_group.add_argument('--no-stream', action='store_true',
83
- help='Return the whole response without streaming')
84
- global_group.add_argument('--prettify', action='store_const', const='auto',
85
- help='Render markdown responses and code with syntax highlighting and formatting')
86
- global_group.add_argument('--stream-prettify', action='store_true',
87
- help='Enable streaming with markdown rendering (automatically uses Rich renderer)')
82
+
83
+ # Output display options (mutually exclusive group)
84
+ output_group = parser.add_argument_group('Output Display Options (mutually exclusive)')
85
+ output_exclusive_group = output_group.add_mutually_exclusive_group()
86
+ output_exclusive_group.add_argument('--no-stream', action='store_true',
87
+ help='Return the whole response without streaming or formatting')
88
+ output_exclusive_group.add_argument('--prettify', action='store_const', const='auto',
89
+ help='Render complete response with markdown and code formatting (non-streaming)')
90
+ output_exclusive_group.add_argument('--stream-prettify', action='store_true', default=True,
91
+ help='Stream response with real-time markdown rendering (default)')
92
+
88
93
  global_group.add_argument('--renderer', choices=['auto', 'rich', 'glow'], default='auto',
89
- help='Select which markdown renderer to use with --prettify (auto, rich, or glow)')
94
+ help='Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)')
90
95
 
91
96
  # GitCommit message options
92
97
  gitcommsg_group = parser.add_argument_group('Git Commit Message Options')
@@ -134,9 +139,29 @@ def validate_args(args):
134
139
  if args.all and not args.show_config:
135
140
  raise ValueError("--all can only be used with --show-config")
136
141
 
137
- # Check if --prettify is used with --stream-prettify (conflict)
138
- if args.prettify and args.stream_prettify:
139
- raise ValueError("--prettify and --stream-prettify cannot be used together. Choose one option.")
142
+ # These three options are mutually exclusive rendering modes
143
+ provided_modes = []
144
+ if '--no-stream' in sys.argv:
145
+ provided_modes.append('--no-stream')
146
+ if '--prettify' in sys.argv:
147
+ provided_modes.append('--prettify')
148
+ if '--stream-prettify' in sys.argv:
149
+ provided_modes.append('--stream-prettify')
150
+
151
+ # If more than one rendering mode explicitly provided, raise error
152
+ if len(provided_modes) > 1:
153
+ raise ValueError(f"The options {', '.join(provided_modes)} cannot be used together. These options are mutually exclusive.")
154
+
155
+ # Handle the conflict between default stream-prettify and explicitly provided options
156
+ if args.no_stream:
157
+ args.stream_prettify = False
158
+ args.prettify = False
159
+ elif args.prettify:
160
+ args.stream_prettify = False
161
+ args.no_stream = False
162
+ elif args.stream_prettify:
163
+ args.no_stream = False
164
+ args.prettify = False
140
165
 
141
166
  # Check if --stream-prettify is used but Rich is not available
142
167
  if args.stream_prettify and not has_markdown_renderer('rich'):
@@ -15,7 +15,7 @@ CLI_CONFIG_OPTIONS = {
15
15
  "preprompt": {"type": "str", "default": None, "context": ["all"]},
16
16
  "no-stream": {"type": "bool", "default": False, "context": ["all"], "exclusive": ["prettify", "stream-prettify"]},
17
17
  "prettify": {"type": "bool", "default": False, "context": ["all"], "exclusive": ["no-stream", "stream-prettify"]},
18
- "stream-prettify": {"type": "bool", "default": False, "context": ["all"], "exclusive": ["no-stream", "prettify"]},
18
+ "stream-prettify": {"type": "bool", "default": True, "context": ["all"], "exclusive": ["no-stream", "prettify"]},
19
19
  "renderer": {"type": "str", "default": "auto", "context": ["all"]},
20
20
  "config-index": {"type": "int", "default": 0, "context": ["all"], "exclusive": ["provider"]},
21
21
  "web-search": {"type": "bool", "default": False, "context": ["all"]},
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ngpt"
3
- version = "3.4.0"
3
+ version = "3.4.1"
4
4
  description = "Swiss army knife for LLMs: powerful CLI, interactive chatbot, and flexible Python library. Works with OpenAI, Ollama, Groq, Claude, Gemini, and any OpenAI-compatible API."
5
5
  authors = [
6
6
  {name = "nazDridoy", email = "nazdridoy399@gmail.com"},
@@ -431,7 +431,7 @@ wheels = [
431
431
 
432
432
  [[package]]
433
433
  name = "ngpt"
434
- version = "3.4.0"
434
+ version = "3.4.1"
435
435
  source = { editable = "." }
436
436
  dependencies = [
437
437
  { name = "duckduckgo-search", version = "7.2.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },
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
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
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