from token_talkers import BaseClass
from token_talkers import base_function
BaseClass().base_method()
base_function()
$ python -m token_talkers
#or
$ token_talkers
For instructions on setting up the project for development and contributions, see CONTRIBUTING.md
To set up the environment variables, create a .env
file in the root directory of your project and add the following lines:
OPENAI_BASE_URL=http://192.168.1.199:11434/v1
OPENAI_API_KEY=your_openai_api_key_here
Alternatively, you can provide the --openai_base_url
and --openai_api_key
arguments when running the CLI:
$ python -m token_talkers --openai_base_url http://192.168.1.199:11434/v1 --openai_api_key your_openai_api_key_here
#or
$ token_talkers --openai_base_url http://192.168.1.199:11434/v1 --openai_api_key your_openai_api_key_here
""" Schema Documentation:
The SQLite database schema consists of two tables: hard_files
and soft_files
.
hard_files
Table:
path
(TEXT PRIMARY KEY): The absolute path to the file.size
(INTEGER): The size of the file in bytes.is_binary
(BOOLEAN): A flag indicating whether the file is binary.number_of_lines
(INTEGER): The number of lines in the file (0 for binary files).processed
(BOOLEAN): A flag indicating whether the file has been processed.
This table stores metadata about the actual files present in the file system.
soft_files
Table:
path
(TEXT PRIMARY KEY): The absolute path to the symbolic link.hard_path
(TEXT): The absolute path to the actual file that the symbolic link points to.- FOREIGN KEY(hard_path) REFERENCES
hard_files
(path)
- FOREIGN KEY(hard_path) REFERENCES
This table stores metadata about symbolic links and their corresponding actual files.
The schema is used to index files and symbolic links in a directory, allowing for efficient querying and management of file metadata. """
To run the file_index.py
script from the command line, use the following instructions:
- Ensure you have Python installed on your system.
- Clone an example repository to use as a codebase. You can use the provided
setup_demo_repo.sh
script to clone therequests
repository:
$ ./setup_demo_repo.sh /path/to/destination_folder
- Run the
file_index.py
script to populate the file index database:
$ python file_index.py /path/to/destination_folder /path/to/database.db --wipe
This will index all files in the specified directory and store the information in the SQLite database.
Read the CONTRIBUTING.md file.