A question solver plugin for ovos
Project description
OpenAI Persona
Give OpenVoiceOS some sass with OpenAI!
Leverages OpenAI Completions API to create some fun interactions. Phrases not explicitly handled by other skills will be run by a LLM, so nearly every interaction will have some response. But be warned, Mycroft might become a bit obnoxious...
Usage
Spoken answers api with OpenAI or LocalAI completions backend, prompt engineering is used to behave like a voice assistant
from ovos_solver_openai_persona import OpenAIPersonaSolver
bot = OpenAIPersonaSolver({"key": "sk-XXX",
"persona": "helpful, creative, clever, and very friendly"})
print(bot.get_spoken_answer("describe quantum mechanics in simple terms"))
# Quantum mechanics is a branch of physics that deals with the behavior of particles on a very small scale, such as atoms and subatomic particles. It explores the idea that particles can exist in multiple states at once and that their behavior is not predictable in the traditional sense.
print(bot.spoken_answer("Quem encontrou o caminho maritimo para o Brazil", {"lang": "pt-pt"}))
# Explorador português Pedro Álvares Cabral é creditado com a descoberta do Brasil em 1500
This plugin will work with ovos-persona-server
Configuration
This plugin can be configured to use a LocalAI server instead of OpenAI.
{
"api_url": <your_local_LocalAI_server_url>,
"key": <your_OpenAI_key>,
"enable_memory": true,
"memory_size": 15,
"initial_prompt": "You are a helpful assistant."
}
When using LocalAI, the "key"
can be anything, but it has to exist.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ovos-solver-openai-persona-plugin-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6813c71beb243d4160b68fdec3b049024f9e341b043d1efe200a13bdf17e1bf1 |
|
MD5 | e673eeca362784e50956416199830d27 |
|
BLAKE2b-256 | b8e606984c91c4bed94b6e8f87f363a627dc088cf520abc45ac24181d587a96f |
Close
Hashes for ovos_solver_openai_persona_plugin-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 459df6811a2a8f2f1ad4f45c9bc84f9fc7fc858b82fb181d911d6c67db419dc1 |
|
MD5 | 99ed992aadcb013d6e008ad4f71e0084 |
|
BLAKE2b-256 | a70b796fb28a5090169600e5bf3bff6aa63b8a88358e1f92fc37e7bdaa0de0db |