Skip to main content

A question solver plugin for ovos

Project description

LlamaCPP Persona

Give OpenVoiceOS some sass with LLaMA model in pure C/C++

Examples

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

Usage

Spoken answers api

from ovos_solver_llamacpp import LlamaCPPSolver

LLAMA_MODEL_FILE = "./models/ggml-model-q4_0.bin"

# persona = "omniscient oracle" # hardcoded personas, "explainer"|"bob"|"omniscient oracle"
persona = "helpful, kind, honest, good at writing"  # description of assistant
bot = LlamaCPPSolver({"model": LLAMA_MODEL_FILE, 
                      "persona": persona})

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos-solver-llamacpp-plugin-0.0.0a1.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page