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

# <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/robot.svg' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/> DialoGPT Persona
 
Give Mycroft some sass with [DialoGPT](https://github.com/microsoft/DialoGPT)

While this can not compete with [ChatGPT Persona](https://github.com/OpenVoiceOS/ovos-solver-plugin-openai-persona) it is an offline alternative, you can use any model from huggingface to have different personas

Find models [here](https://huggingface.co/models?pipeline_tag=conversational&search=dialogpt)

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


## Usage

Spoken answers api

```python
from ovos_solver_dialogpt import DialoGPTSolver

d = DialoGPTSolver({"model": "microsoft/DialoGPT-large"})
sentence = d.spoken_answer("What is best in life?")
print(sentence)
# To be alive.

sentence = d.spoken_answer("Qual é o teu animal favorito?", {"lang": "pt-pt"})
print(sentence)
# Adoro todos os animais

d = DialoGPTSolver({"model": "ingen51/DialoGPT-medium-GPT4"})
for q in ["hello!",
          "who are you?",
          "what is the speed of light?",
          "what is the meaning of life?",
          "Does god exist?",
          "What is your favorite color?",
          "What is your favorite animal?",
          "What is best in life?"]:
    a = d.get_spoken_answer(q)
    print(q, a)
    # hello! Hiya there.
    # who are you? I'm the guy that runs the place. 
    # what is the speed of light? About 186,600 mph
    # what is the meaning of life? The meaning of existence is to suffer alone.
    # Does god exist? Yes. He does.
    # What is your favorite color? I don't have one in particular.
    # What is your favorite animal? Horned lizard.
    # What is best in life? A warm home.
```
keksik-api 0.2.5
Обвертка над API keksik.io
License: MIT
Requires Python: >=3.8,<4.0

# Keksik API wrapper

Обвертка над API [keksik.io](https://keksik.io/api)

<p align="center">
  <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/keksik-api">
  <img alt="PyPI" src="https://img.shields.io/pypi/v/keksik-api?color=green&label=PyPI">
</p>

# Использование:
```python
import os
from keksik_api import KeksikAPI, KeksikAPIException

GROUP_ID = int(os.environ.get('GROUP_ID'))
ACCESS_TOKEN = os.environ.get('ACCESS_TOKEN')


api = KeksikAPI(GROUP_ID, ACCESS_TOKEN)

last_donates = await api.donates.get_last()
for item in last_donates.items:
    print(item.id)

# Передача токена динамически
await api.donates.answer(1, "Спасибо :3", group=GROUP_ID, token=ACCESS_TOKEN)

# Ошибочки
try:
    await api.donates.answer(-666, '')
except KeksikAPIException as exc:
    print("Произошла ошибка: ", exc.error_code, exc.message)

# Кастомные запросы
await api.request("{method}", dict(data='...'), raise_errors=False)

# Callback
import uvicorn
from fastapi import FastAPI

from keksik_api.callback import Callback, Router
from keksik_api import schemas

SECRET_KEY = os.environ.get('SECRET_KEY')
CONFIRMATION_CODE = os.environ.get('CONFIRMATION_CODE')


router = Router()

@router.on_new_donate()
async def on_new_donate_handler(event: schemas.DonateEvent):
    print("New donate", event.donate.id)

callback = Callback(
    KeksikAPI(GROUP_ID, ACCESS_TOKEN),
    SECRET_KEY,
    CONFIRMATION_CODE,
    router=router
)


app = FastAPI()

@app.post("/")
async def app_route(params: dict):
    return await callback.route_web_request(params)


if __name__ == "__main__":
    uvicorn.run(app)
```