semvec/pypi-packages huggingface dataset:
openai-function-calling-aeolin 0.0.7
OpenAI wrapper around function calls
Requires Python: >=3.8.0

# openai-function-calling
Is a simple library which adds convenience methods to query open ai's chat endpoint with support for function calling.

## Installation
`pip install openai-function-calling-aeolin`

## Basic Usage Example
```python
from typing import Any
from function_calling import setup_api, get_chat_compmetion, ChatHistory, ChatRole, description

def to_string(obj: Any) -> str:
    return str(obj) 

setup_api("openai api key", to_string) 

@description("Generates a password of the given length") 
def generate_password(length: int) -> str:
    return "".join([random.choice("123456789abcdefghijklmnopqrstuvwxyz") for x in range(length)])

functions = [generate_password] 
history = ChatHistory("gpt-3.5-turbo",4096,functions)
history.add_message(ChatRole.SYSTEM,"You're PasswordBot an ai that can generate passwords for people") 
history.add_message(ChatRole.USER, "can you generate me a password of length 16?")
response = get_chat_completion(history) 
print(response.content)
```
## setup_api
The setup api function takes two parameters, the first one is your openai api key, the second one is a function which can be used to convert objects to the type string. The string function is used by the library when ever a callable function returns something which is not of type string

## ChatHistory
The ChatHistory will keep track of all messages and function responses. With the last parameter of `add_message` a function can be marked as ephemeral. Per default all messages which are not of the role `SYSTEM` are ephemeral.
Ephemeral messages can and will be removed by the library if the context runs out of tokens.

## get_chat_completion
This function take a ChatHistory object as an argument and queries the openai chat endpoint with it. The resulting function responses and messages are automatically recorded in the history itself. Upon completion a `ChatMessage` object is returned with the assitant response. The message is stored in the field `content` inside the `ChatMessage`
The second parameter is an optional function which receives a list of responses if N was greated than 1 and returns one of the responses. If this function is not supplied the first response will be taken by default
The following optional parameters are passed through to the openai library (parameter name: default value)
- function_call: auto
- max_tokens: 1024
- temperature: 0.9
- top_p: 1.0
- n: 1
ipynb-image-extract 1.0
Extract images from IPython Notebooks

# ipynb-image-extractor

ipynb-image-extractor is a Python package that allows you to easily extract images from IPython Notebooks and save them to a specified output folder.

## Installation

You can install ipynb-image-extractor via pip:

```bash
pip install ipynb-image-extract
```

## Usage
Once installed, you can use the extract-images command to extract images from an IPython Notebook file and save them to an output folder. Here's the basic usage:

```bash
extract-images input.ipynb output_folder
```
- `input.ipynb`: The path to the IPython Notebook file from which you want to extract images.
- `output_folder`: The folder where the extracted images will be saved.

## How it Works

The package utilizes the `nbformat` and `Pillow` libraries to parse the IPython Notebook and extract image data from 'image/png' outputs. The images are saved in PNG format.

## Contributions

Contributions are welcome! If you encounter issues, have ideas for improvements, or want to contribute to the project, please open an issue or submit a pull request on the [GitHub repository](https://github.com/rohzzn/ipynb-image-extractor).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
ipynb-image-extractor 2.0
Extract images from IPython Notebooks

# ipynb-image-extractor

ipynb-image-extractor is a Python package that allows you to easily extract images from IPython Notebooks and save them to a specified output folder.

## Installation

You can install ipynb-image-extractor via pip:

```bash
pip install ipynb-image-extractor
```

## Usage
Once installed, you can use the extract-images command to extract images from an IPython Notebook file and save them to an output folder. Here's the basic usage:

```bash
extract-images input.ipynb output_folder
```
- `input.ipynb`: The path to the IPython Notebook file from which you want to extract images.
- `output_folder`: The folder where the extracted images will be saved.

## How it Works

The package utilizes the `nbformat` and `Pillow` libraries to parse the IPython Notebook and extract image data from 'image/png' outputs. The images are saved in PNG format.

## Contributions

Contributions are welcome! If you encounter issues, have ideas for improvements, or want to contribute to the project, please open an issue or submit a pull request on the [GitHub repository](https://github.com/rohzzn/ipynb-image-extractor).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
uzbek-language 0.1.0
This package was created to correct Uzbek spelling mistakes and translate from Latin to Cyrillic

# Uzbek-language



This package was created to correct Uzbek spelling mistakes and translate from Latin to Cyrillic

### Install package

```bash
pip install uzbek-language
```
### Use in translator
```python
from uzbek_language import Translator

text = "salom dunyo"

translate = Translator(text=text)

# output text converted to latin
print(transtale.latin())

# output text converted to cyrillic
print(transtale.cyrillic())

# auto output the modified text
print(transtale.auto())
```
### Use in spelling
```python
from uzbek_language import Spelling

s = Spelling(word='salom')

# if the word is a mistake, it will say the same word
print(s.get_matches())

# determine whether the word is correct or incorrect

print(s.is_availible())
```
#### Developed by Quvonchbek Bobojonov (c) 2023