Skip to content

designed to assist users in generating file names based on the content of existing files

Notifications You must be signed in to change notification settings

myinusa/filename-suggestion-ai

Repository files navigation

Filename Suggestion AI

Description

Filename Suggestion AI is a Python application designed to assist users in generating file names based on the content of existing files. It supports processing either a single file or an entire directory, applying optional filtering by file extension. The application interacts with an API to generate filename suggestions using artificial intelligence.

Only working for LM Studio.

Usage

To use Filename Suggestion AI, follow these steps:

  1. Install the required Python packages by running pip install -r requirements.txt.
  2. Set up your environment variables and configuration settings as needed (refer to the Configuration section for details).
  3. Run the script using python main.py or execute it from your IDE.
  4. Use command-line arguments to specify the file or directory you want to process, including optional filters by file extension.
python3 -m filename_suggestion_ai.main -dir <DIRECTORY> --filter ".py"

Command-Line Arguments

  • -h, --help: Show help message and exit.
  • -v, --verbose: Show log messages on screen (default is False).
  • -d, --debug: Activate debug logs (default is False).
  • -f, --file: Path to the file whose content will be sent as user content in the payload.
  • -dir, --directory: Path to the directory containing files to process.
  • -fil, --filter: Filter by file extension (optional).

FAQ

Q: Can I filter files by their extensions?
A: Yes, you can specify a file extension using the --filter argument to filter files based on their extension during processing.

Q: How do I check the logs generated by the application?
A: Logs are stored in the logs directory as main.log. You can review them for debugging purposes.

Configuration

Ensure you have the necessary environment variables set up before running the application:

  • MAIN_URL: The URL for the API endpoint.
  • Other configuration settings can be found in the script files under the filename_suggestion_ai.config module.

Features

  • Supports processing single or multiple files from a directory.
  • Filters files by extension (optional).
  • Logs all activities to help with debugging and tracking operations.
  • Uses AI for generating file names based on content.

Topics

  • File Processing
  • Command Line Interface (CLI)
  • Logging
  • Artificial Intelligence Integration

Todo

  • Add support for various LLM clients
    • LM Studio
    • [] Ollama

Considerations

  • Ensure the directory or file paths provided are correct to avoid errors during processing.
  • The application assumes that the API endpoint and system configurations are set up correctly before use.

About

designed to assist users in generating file names based on the content of existing files

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages