semvec/pypi-packages huggingface dataset:
llm-space 0.0.3
A Python wrapper for managing OpenAI API and other LLM models.
License: MIT
Requires Python: >=3.10,<4.0

# LLM Tools

This package wraps the OpenAI API and other LLM models that share the completion endpoint feature. It provides a simple interface to generate text from a prompt.


## Installation

```bash
pip install llm-space
```


## Usage

```python
from llm_space.openai import prompt
from pathlib import Path


# Create a prompt object that will be logged to the `my-task` directory under the
# current working directory.
# The PromptZeros class will use arguments that will maximize the determinism of the outputs.
pz = prompt.PromptZeros(Path("./"), "my-task")

# Send a prompt to the API and return the response.
w = pz.send_prompt("What is the WDI code for GDP?", return_data=True)

# Print the response.
print(w)

# Output:

# {'message': [{'role': 'system', 'content': ''}, {'role': 'user', 'content': 'What is the WDI code for GDP?'}], 'response': {'id': 'chatcmpl-8V0IN0VbeYTrsBAohs309DHJQLJL8', 'choices': [{'finish_reason': 'stop', 'index': 0, 'message': {'content': 'The WDI code for GDP (Gross Domestic Product) is "NY.GDP.MKTP.CD".', 'role': 'assistant', 'function_call': None, 'tool_calls': None}}], 'created': 1702399995, 'model': 'gpt-3.5-turbo-0613', 'object': 'chat.completion', 'system_fingerprint': None, 'usage': {'completion_tokens': 23, 'prompt_tokens': 20, 'total_tokens': 43}}, 'content': 'The WDI code for GDP (Gross Domestic Product) is "NY.GDP.MKTP.CD".', 'api_kwargs': {'temperature': 0, 'top_p': 0, 'n': 1, 'stream': False, 'frequency_penalty': 0, 'presence_penalty': 0, 'model': 'gpt-3.5-turbo', 'max_tokens': 4029}, 'metadata': {}, 'message_hash': '1a5816095c232f29428d4cec70498391'}
```

NOTE: The output is also logged to the `my-task` directory under the current working directory.
playsoundsimple-py 0.8.4
A simple library for playing sound files.
License: MIT
Requires Python: >=3.7,<3.12

# playsoundsimple.py
## Description
Library for working with sound files of the format: `MP3`, `WAV`, `OGG`,`FLAC`, `MIDI`.

## Installation
```
pip install playsoundsimple.py
```

### About MIDI support
In order to play MIDI files you need to install FluidSynth:
- **Windows**: [Releases](https://github.com/FluidSynth/fluidsynth/releases)
    1. **Download** a zip file suitable for your version of Windows.
    1. **Unpack the archive** anywhere, *but it is recommended to put it in a folder `C:\Program Files\FluidSynth`*
    1. **Next**, open `Settings` > `System` > `About the system` > `Additional system parameters` > `Environment variables` > `[Double click on Path]` > `Create` > `[Enter the full path to the folder with FluidSynth]`
    1. **That's it, FluidSynth is installed!**
- **Linux**:
    - **Ubuntu/Debian**:
        ```shell
        sudo apt-get install fluidsynth
        ```
    - **Arch Linux**:
        ```shell
        sudo pacman -S fluidsynth
        ```
- **MacOS**
    - With [Fink](http://www.finkproject.org/):
        ```shell
        fink install fluidsynth
        ```
    - With [Homebrew](https://brew.sh/):
        ```shell
        brew install fluidsynth
        ```
    - With [MacPorts](http://www.macports.org/):
        ```shell
        sudo port install fluidsynth
        ```

## More
```example
import playsoundsimple as pss

s = pss.Sound("main.wav")
s.play()
s.wait()
```

## Author
- Roman Slabicky
    - [Vkontakte](https://vk.com/romanin2)
    - [GitHub](https://github.com/romanin-rf)