semvec/pypi-packages huggingface dataset:
glabels 0.1.3
Simple wrapper around glabels-3-batch and glabels-batch-qt
Requires Python: >=3.7

This library is a simple wrapper around `glabels-3-batch` and `glabels-batch-qt` - extremely convenient utilities for creating labels from pre-created templates:

- Glabels-3 - https://github.com/jimevins/glabels
- Glabels-qt - https://github.com/jimevins/glabels-qt
# Installation  
  
```shell
pip install glabels
```  
  
# Usage  
### glabels-batch-qt  
  
```python  
from glabels import GLabelsBatchQT  
  
  
g = GLabelsBatchQT("/path/to/glabels-batch-qt")  
  
# If you call the function without the output parameter,  
# the output will be given in bytes as the result of execution  
out = g.run(
	template='path/to/template',
	copies=3,
)
print(out)
# b'%PDF-1.4\n%\xc3\xa2\xc3\.........'

# If you specify the path to the output file
out = g.run(
	template='path/to/template',  
	output="path/to/output",  
	copies=3,  
)  
print(out)  
# None  
  
# Instead of specifying the path to the template, 
# you can give it in bytes  
out = g.run(  
	template=b'...',  
	copies=3,  
)  
print(out)  
# b'%PDF-1.4\n%\xc3\xa2\xc3\.........'  
```

> Since `glabals-bath-qt` itself does not issue errors in `stdout`, `subprocess.Popen` cannot catch errors. (At least, I do not know how)
### glabels-3-batch

```python
from glabels import Glabels3Batch  
  
  
g = Glabels3Batch("/path/to/glabels-3-batch")  
  
# If you call the function without the output parameter,  
# the output will be given in bytes as the result of execution  
# Here you need to understand that there will be not only PDF in stdout  
out = g.run(  
	template='path/to/template',  
	copies=3,  
)  
  
print(out)  
# b'LABEL FILE = /path/to/template\n%PDF-1.4\n%\xc3\xa2\xc3\.........'  
  
# If you specify the path to the output file  
out = g.run(  
	template='path/to/template',  
	output="path/to/output",  
	copies=3,  
)  
print(out)  
# None  
  
# Instead of specifying the path to the template, you can give it in bytes  
out = g.run(  
	template=b'...',  
	copies=3,  
)  
print(out)  
# b'LABEL FILE = /path/to/template\n%PDF-1.4\n%\xc3\xa2\xc3\.........'
```
chat-cli 0.3.5
Command line interaction with ChatGPT with chat history saved locally
Requires Python: >=3.8,<4.0

# Installation

I recommend using `pipx` for installation. Follow [pipx's documentation](https://pypa.github.io/pipx/) to install it, then run `pipx install chat-cli`.

# Building

Chat uses the `poetry` build tool.

1. [Install poetry](https://python-poetry.org/docs/#installation)
2. Clone the chat project repo
3. Run `poetry build` in the project root
4. The wheel and sdist will be built in the `dist/` directory

# Usage

`chat [-h] [--apikey APIKEY] [--prompt PROMPT] [--save] [-f CONFIG] [-m MODEL] [--resume] [-s SEARCH]`

## Options

### `-h`, `--help`

show these options and exit

### `--apikey`

Specify the API key to use when connection to OpenAI

### `--prompt`

Change the prompt that is displayed for input. The sequences %t and %T can be used to display the current token and max token count for the model, respectively. Default prompt is '%t/%T > '

### `--save`

If specified with --apikey and/or --prompt, save them to the config file

### `-f`, `--config` 

Specify an alternate file to load the configuration from (Default: $XDG_CONFIG_HOME/Chat/chat.json)

### `-m`, `--model`

Specify the model to use, refer to https://platform.openai.com/docs/models for list

### `--resume`

Resumes last conversation

### `-s`, `--search`

Search your chat history for a given regex

## Commands

When chating, the following commands perform special actions

### `.redo`

Regenerates the previous response. Removes the old response from the history

### `.copy`

Copies the first code block in the previous response to the system clipboard. Print's whats been copied

### `.exit`

Exits the application and saves the chat history. Same as encountering `EOF`. Prints the chat log location.

### `.summarize`

Asks the model to summarize the conversation and starts a new conversation with the summary as the first message. Saves the conversation prior to the summary. Should be called before reaching the token limit to continue a conversation.