semvec/pypi-packages huggingface dataset:
ovos-solver-llmcpp-plugin 0.0.0a3
A question solver plugin for ovos
License: MIT
Keywords: ovos plugin utterance fallback query

# <img src='https://camo.githubusercontent.com/57d5fd32c5b51e73fce9077a45f155db3edecd5dfe31d272d73569cb23ef779c/68747470733a2f2f692e696d6775722e636f6d2f6c41645a6a376d2e6a706567' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/>  LLM.cpp Persona
 
Give OpenVoiceOS some sass with [Alpaca.cpp](https://github.com/antimatter15/alpaca.cpp), [GPT4All.cpp](https://github.com/zanussbaum/gpt4all.cpp) or [Bloomz.cpp](https://github.com/NouamaneTazi/bloomz.cpp)

This plugin requires providing the path to the executable and model, it uses subprocess which allows it to work with these programs without requiring python bindings

Dedicated plugins may exist for each LLM


## Examples 

* "What is best in life?"
* "Do you like dogs"
* "Does God exist?"


## Usage

Spoken answers api

```python
from ovos_solver_llmcpp import LLMcppSolver

ALPACA_MODEL_FILE = "./models/ggml-alpaca-7b-q4.bin"
GPT4ALL_MODEL_FILE = "./models/gpt4all-lora-quantized.bin"

# binpath = "~/alpaca.cpp/chat"
binpath = "~/gpt4all.cpp/chat"

bot = LLMcppSolver({"model": GPT4ALL_MODEL_FILE,
                    "executable_path": binpath})

sentence = bot.spoken_answer("Qual é o teu animal favorito?", {"lang": "pt-pt"})
# Meus animais favoritos são cães, gatos e tartarugas!

for q in ["Does god exist?",
          "what is the speed of light?",
          "what is the meaning of life?",
          "What is your favorite color?",
          "What is best in life?"]:
    a = bot.get_spoken_answer(q)
    print(q, a)

```
flask-ckeditor-manager 0.1.42
A simple interface to use CKEditor5 with Flask
License: MIT
Requires Python: >=3.8,<4.0

# Flask-CKEditor-Manager

Flask-CKEditor-Manager _(from now on **FCKM**)_ provides a simple interface to use CKEDitor5 javascript library with Flask. Greatly inspired by Flask-CKEditor

```{warning}
🚧 This package is under heavy development..
```

## Installation

Install the extension with pip:

```bash
pip install flask-ckeditor-manager
```

Install with poetry:

```bash
poetry add flask-ckeditor-manager
```

## Configuration

This are some of the settings available

| Config                   | Description                                                                       | Type | Default     |
| ------------------------ | --------------------------------------------------------------------------------- | ---- | ----------- |
| CKEDITOR_LICENSE_KEY     | CKEditor License key                                                              | str  | `None`      |
| CKEDITOR_EDITOR_TYPE     | Editor package to be displayed                                                    | str  | `"classic"` |
| CKEDITOR_LOCAL_PATH      | If custom package is present, this is the path in the static folder.              | str  | `None`      |
| CKEDITOR_LANGUAGE        | The lengague of the editor.                                                       | str  | `None`      |
| CKEDITOR_ENABLE_CSRF     | Enable CSRF protection in SimpleUpload adapter                                    | bool | `None`      |
| CKEDITOR_UPLOAD_ENDPOINT | SimpleUpload adapter endpoint. Must follow the CKEditor5 estipulations. Read more | str  | `None`      |
| CKEDITOR_WATCHDOG        | If watchdog plugin installed change this value to True to enable its rendering    | bool | `None`      |

## Usage

Once installed the **FCKM** is easy to use. Let's walk through setting up a basic application. Also please note that this is a very basic guide: we will be taking shortcuts here that you should never take in a real application.

To begin we'll set up a Flask app:

```python
from flask import Flask

app = Flask(__name__)
```

### Setting up extension

**FCM** works via a CKEditorManager object. To kick things off, we'll set up the `ckeditor_manager` by instantiating it and telling it about our Flask app:

```python
from flask_ckeditor import CKEditorManager

ckeditor_manager = CKEditorManager()
ckeditor_manager.init_app(app)
```

### Load resources

Once the extension is set up, this will make available the `ckeditor` object into the templates context so you could load the javascript package easily, like this.

```html
<head>
  {{ ckeditor.load() }}
</head>
```

### Rendering the editor

Once created you can pass the `Chart` object to render_template and use it likewise.

```html
<!-- ckeditor.load() must be called before this line -->
<textarea id="editor"></textarea>
<div class="my-classes">{{ ckeditor.config('editor') }}</div>
```