OpenVoiceOS / ovos-skill-fallback-chatgpt

Apache License 2.0
23 stars 15 forks source link

Missing OVOSLangTranslationFactory mapping #8

Closed atd closed 1 year ago

atd commented 1 year ago

I dockerized this pluging, following the examples in ovos-docker repo

When starting, I get this error

Seems like a translation configuration is missing? Is it needed? (chatpgt knows how to speak in several languages)

ovos_skill_fallback_chatgpt  | 2023-06-04 20:06:28.830 - OVOS - ovos_plugin_manager.utils:load_plugin:146 - WARNING - Could no
t find the plugin PluginTypes.TRANSLATE.libretranslate_plug                                                                   
ovos_skill_fallback_chatgpt  | 2023-06-04 20:06:28.831 - skill-ovos-fallback-chatgpt.openvoiceos - ERROR - Skill initializatio
n failed                                                                                                                      
ovos_skill_fallback_chatgpt  | Traceback (most recent call last):
ovos_skill_fallback_chatgpt  |   File "/usr/lib/python3.11/site-packages/ovos_workshop/skills/base.py", line 412, in _startup
ovos_skill_fallback_chatgpt  |     self.initialize()
ovos_skill_fallback_chatgpt  |   File "/home/ovos/.local/lib/python3.11/site-packages/skill_ovos_fallback_chatgpt/__init__.py"
, line 35, in initialize
ovos_skill_fallback_chatgpt  |     self._chat = OpenAIPersonaSolver(config=self.settings)
ovos_skill_fallback_chatgpt  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos_skill_fallback_chatgpt  |   File "/home/ovos/.local/lib/python3.11/site-packages/ovos_solver_openai_persona/__init__.py",
 line 9, in __init__
ovos_skill_fallback_chatgpt  |     super().__init__(name="OpenAI ChatGPT Persona", config=config)
ovos_skill_fallback_chatgpt  |   File "/home/ovos/.local/lib/python3.11/site-packages/ovos_solver_openai_persona/engines.py", 
line 57, in __init__
ovos_skill_fallback_chatgpt  |     super().__init__(name=name, priority=25, config=config,
ovos_skill_fallback_chatgpt  |   File "/usr/lib/python3.11/site-packages/ovos_plugin_manager/templates/solvers.py", line 34, i
n __init__
ovos_skill_fallback_chatgpt  |     self.translator = OVOSLangTranslationFactory.create()
ovos_skill_fallback_chatgpt  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos_skill_fallback_chatgpt  |   File "/usr/lib/python3.11/site-packages/ovos_plugin_manager/language.py", line 185, in create
ovos_skill_fallback_chatgpt  |     raise ValueError
ovos_skill_fallback_chatgpt  | ValueError
atd commented 1 year ago

pip3 install neon-lang-plugin-libretranslate did the trick. Maybe add it to requirements.txt?

goldyfruit commented 1 year ago

@JarbasAl is this should be a requirements of this skill or should I install neon-lang-plugin-libretranslate by default in ovos_core container?

JarbasAl commented 1 year ago

the translation plugin is configurable globally, it should not be a requirement of individual plugin but of core

we dont have a good default yet, so we just use the neon hosted libretrabslate (anyone can host it)

we should use a offline alternative, such as https://github.com/OpenVoiceOS/ovos-translate-plugin-nllb

goldyfruit commented 1 year ago

the translation plugin is configurable globally, it should not be a requirement of individual plugin but of core

we dont have a good default yet, so we just use the neon hosted libretrabslate (anyone can host it)

we should use a offline alternative, such as https://github.com/OpenVoiceOS/ovos-translate-plugin-nllb

For now, I going with neon-lang-plugin-libretranslate in ovos_core and ovos_skill_base.

JarbasAl commented 1 year ago

we now have translation servers and a default plugin, closing