Saravanan666/pypi-org huggingface dataset:
Package: neon-api-proxy
NeonAI API ProxyProxies API calls to consolidate usage to a single point and allow for caching of API data.Request FormatAPI requests should be in the form of a dictionary. The service requested should be specified asserviceand the
remaining data will be passed to thehandle_querymethod of the requested service as kwargs.Example Wolfram|Alpha Request:{"service":"wolfram_alpha","query":"how far away is Rome?","api":"simple","units":"metric","ip":"64.34.186.120"}Response FormatResponses will be returned as dictionaries. Responses should contain the following:status_code- Usually contains the HTTP status code from the requested API,-1should be used to specify any other errorscontent- Usually contains the HTTP content (bytes) from the requested API, but may include a string message for errors.encoding= Usually contains the HTTP content encoding if content is the byte representation of a string, may beNoneDocker ConfigurationWhen running this as a docker container, theXDG_CONFIG_HOMEenvvar is set to/config.
A configuration file at/config/neon/diana.yamlis required and should look like:MQ:port:<MQ Port>server:<MQ Hostname or IP>users:neon_api_connector:password:<neon_api user's password>user:neon_apikeys:api_services:alpha_vantage:api_key:<Alpha Vantage Key>open_weather_map:api_key:<OWM Key>wolfram_alpha:api_key:<Wolfram|Alpha Key>For example, if your configuration resides in~/.config:exportCONFIG_PATH="/home/${USER}/.config"dockerrun-v${CONFIG_PATH}:/configneon_api_proxyNote: If connecting to a local MQ server, you may need to specify--network host
Package: neon-audio
Neon AudioAudio Module for Neon Core. This module can be treated as a replacement for themycroft-corespeech module. This module handles input text, performs TTS,
and optionally returns the audio or plays it back locally.Neon Enhancementsneon-audioextendsmycroft-audiowith the following added functionality:Support for translated output languagesSupport for multiple language spoken responses (multiple users and/or multi-language users)Messagebus API listeners to handle outside requests for TTSArbitrary configuration supported by passing at module initCompatibilityMycroft TTS plugins are compatible withneon-speech.Running in DockerThe includedDockerfilemay be used to build a docker container for the neon_audio module. The below command may be used
to start the container.dockerrun-d\--network=host\--name=neon_audio\-v~/.config/pulse/cookie:/tmp/pulse_cookie:ro\-v${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro\-v/run/dbus/system_bus_socket:/run/dbus/system_bus_socket:rw\-v/tmp/.X11-unix:/tmp/.X11-unix:ro\--device=/dev/snd:/dev/snd\-ePULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native\-ePULSE_COOKIE=/tmp/pulse_cookie\-eDISPLAY=${DISPLAY}\neon_audio
Package: neon-cli-client
Neon CLI ClientThis is a lightly modified client frommycroft-core.
The CLI can be accessed from a terminal vianeon-cli.CLI UsageBy default, the CLI will use default parameters to connect to a Neon/Mycroft/OVOS
Core instance running on the local host. The following arguments may be passed to
override defaults. This information is also accessible vianeon-cli --help.--host 0.0.0.0The default0.0.0.0may be replaced with a different IP address if connecting
to a remote core instance. Note that the messagebus carries unencrypted data, so
enabling remote access is not generally recommended--port 8181The default8181may be replaced with a different port if the messagebus service
was configured to use a non-default port.--lang en-usThe language of CLI inputs and expected responses can be set by passing a BCP-47
language code here.--logs-dir ~/.local/state/neon/The default log directory is read from configuration, but it may be overridden
here. This is commonly set for Docker connections, where the log path on the host
is not configured for the CLI client.--simpleThis flag will enable a simple text-based CLI showing only inputs and responses.
This can be useful if the default CLI doesn't display properly in a terminal.
Package: neon-enclosure
Neon EnclosureThe enclosure module implements the Platform and Hardware Abstraction Layer (PHAL)
fromOpenVoiceOS. This service loads
PHAL plugins that provide different functionality to the core; plugins primarily
differ from skills in that they do not have any intents and that they may only
be valid in certain core environments (i.e. only for particular hardware or
operating system environments).Admin Servicesneon_enclosure.admincontains a service much likeneon_enclosure, but plugins
it loads will haverootprivileges. This service is intended for handling any
OS-level interactions requiring escalation of privileges and is excluded from Docker support.
Because this service runs as root, it also requires configuration be initialized
prior to its initialization; user-level configurations will be placed in the/rootdirectory per XDG, so any configuration should be done at the system-level.Running in DockerThe includedDockerfilemay be used to build a docker container for the neon_audio module. The below command may be used
to start the container.dockerrun-d\--network=host\--name=neon_enclosure\-v~/.config/pulse/cookie:/home/neon/.config/pulse/cookie:ro\-v${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro\--device=/dev/snd:/dev/snd\-ePULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native\-ePULSE_COOKIE=/home/neon/.config/pulse/cookie\neon_enclosureNote:The above example assumes Docker data is stored in the standard user locations~/.local/shareand~/.config.
You may want to change these values to some other path to separate container and host system data.
Package: neon-gui
Neon GUIGUI Module for Neon Core. This module extracts the GUI components from theMycroft Mark 2 Skilland theenclosuremodule
frommycroft-core.Neon EnhancementsIsolating the GUI to a standalone module allows for standardized implementation of common
components.CompatibilityThis package can be treated as a drop-in replacement for the GUI components inskill-mark-2.RestingScreen, and gui bus events are handled here.Running in DockerThe includedDockerfilemay be used to build a docker container for the neon_messagebus module. The below command may be used
to start the container.dockerrun-d\--name=neon_gui\--network=host\neon_gui
Package: neon-homeassistant-skill
Home Assistant Neon SkillUsesPHAL Home Assistant pluginAvailable on PyPi:pip install neon-homeassistant-skillInstallation on Neon**Note**: This skill and the required PHAL plugin come pre-installed on Neon images for the Mycroft Mark II and Neon's published Docker images. These instructions are for custom development builds or creating your own Neon instance from scratch.Install ovos-PHAL-plugin-homeassistantper their documentationThen, you canpip install neon-homeassistant-skill, or handle the installation from the~/.config/neon/neon.yamlfile if you prefer:skills:default_skills:# Jokes skill included because it cannot be pip installed to the image-https://github.com/JarbasSkills/skill-icanhazdadjokes/tree/dev-neon-homeassistant-skill# Optionally with a version, such as neon-homeassistant-skill==0.0.10Authenticating to Home AssistantOn a device with a screen, such as the Mycroft Mark II, you can sayopen home assistant dashboardand use the OAuth login flow to authenticate from the PHAL plugin. If you don't have a screen available or prefer to edit the configuration directly, read on.The documentation for ovos-PHAL-plugin-homeassistant specifies which configuration file to put your Home Assistant hostname/port and API key. Note that Neon uses a YAML configuration, not a JSON file, so edit~/.config/neon/neon.yamland make the following update for a minimal installation:PHAL:ovos-PHAL-plugin-homeassistant:host:http://<HA_IP_OR_HOSTNAME>:8123api_key:<HA_LONG_LIVED_TOKEN>ThePHALnode above should be at the root of the Neon user configuration file, appended to the end of file if existing content exists, and will merge with system configuration perNeon Configuration Docs.Mycroft Mark II does not always support .local hostnames such as the defaulthomeassistant.localDNS. You may need to use the IP of your Home Assistant instance instead. If you have a Nabu Casa subscription and don't mind traffic going out to the internet using your public Nabu Casa DNS is also a supported option. However, if your internet connectivity drops from your Neon instance, you will be unable to control your smart home devices from Neon. A local DNS/IP is preferable.Upcoming FeaturesStart OAuth workflow with voiceStart an instance of the ovos-PHAL-plugin-homeassistant if PHAL isn't already runningVacuum functionsHVAC functions
Package: neon-iris
Neon IrisNeon Iris (Interactive Relay for Intelligence Systems) provides tools for
interacting with Neon systems remotely, viaMQ.Install the Iris Python package with:pip install neon-irisTheirisentrypoint is available to interact with a bus via CLI. Help is available viairis --help.ConfigurationConfiguration files can be specified via environment variables. By default,Iriswill read configuration from~/.config/neon/diana.yamlwhereXDG_CONFIG_HOMEis set to the default~/.config.
More information about configuration handling can be foundin the docs.Note:The neon-iris Docker image usesneon.yamlby default because theirisweb UI is often deployed with neon-core.A default configuration might look like:MQ:server:neonaialpha.comport:25672users:mq_handler:user:neon_api_utilspassword:Klatchat2021iris:default_lang:en-uslanguages:-en-us-uk-uawebui_chatbot_label:"NeonAI"webui_mic_label:"SpeakwithNeon"webui_input_placeholder:"ChatwithNeon"Language SupportFor Neon Core deployments that support language support queries via MQ,languagesmay be removed andenable_lang_api: Trueadded to configuration. This will use
the reported STT/TTS supported languages in place of anyirisconfiguration.Interfacing with a Diana installationTheirisCLI includes utilities for interacting with aDianabackend. Useiris --helpto get a current list of available commands.iris start-listenerThis will start a local wake word recognizer and use a remote Neon
instance connected to MQ for processing audio and providing responses.iris start-gradioThis will start a local webserver and serve a Gradio UI to interact with a Neon
instance connected to MQ.iris start-clientThis starts a CLI client for typing inputs and receiving responses from a Neon
instance connected via MQ.
Package: neonize
NeonizeNeonize is a Python library designed to streamline the automation of tasks on WhatsApp. With neonize, users can easily automate various actions on WhatsApp, such as sending messages, processing received messages, and executing specific actions based on predefined scenarios.Key Features:Message Automation:Neonize provides a straightforward interface for sending automated messages to specific WhatsApp numbers.Message Processing:Users can define functions or actions to be taken based on received messages. This allows users to create automated responses or run specific scenarios based on message content.Binding withWhatsmeow:Neonize is built as a binding for the Whatsmeow library, leveraging similar functionality. This provides more flexibility in development and integration with functions that users may already be familiar with from Whatsmeow.Communication with Protobuf:Neonize uses the Protobuf format as the communication protocol, offering speed and efficiency in data exchange between the application and WhatsApp.Usage:Simple Installation:Neonize can be easily installed through Python package managers such as pip.pipinstallneonizeInitialization and Configuration:Users can quickly configure neonize to use the desired WhatsApp account.Easy-to-Use:Neonize provides a simple API and clear documentation to facilitate usage. Users can swiftly write scripts for WhatsApp automation according to their needs.With neonize as a binding for Whatsmeow, WhatsApp automation becomes more accessible for Python developers, combining the strengths of both libraries and leveraging familiar functionalities from Whatsmeow.Contribution GuidelinesIf you would like to contribute to this project, please follow these steps:Fork this repository.Create a new branch:git checkout -b branch-name.Perform the desired tasks or changes.Commit the changes:git commit -m 'Commit message'.Push to branch:git push origin nama-branch.Send pull request.Local DevelopmentIf you want to run this project locally, follow these steps:Clone the repository:git clone git@github.com:krypton-byte/neonize.git.Install dependencies:poetry install --with dev(customize to the project).Run the project:python examples/basic.py(customize to the project).LisensiThis project is licensed under Apache-2.0. See theLICENSEfile for more information.
Package: neon-llm-core
NeonAI Core LLMCore module for Neon LLM'sRequest FormatAPI requests should includehistory, a list of tuples of strings, and the currentqueryExample Request:{"history":[["user","hello"],["llm","hi"]],"query":"how are you?"}Response FormatResponses will be returned as dictionaries. Responses should contain the following:response- String LLM response to the queryConnection ConfigurationWhen running this as a docker container, theXDG_CONFIG_HOMEenvvar is set to/config.
A configuration file at/config/neon/diana.yamlis required and should look like:MQ:port:<MQ Port>server:<MQ Hostname or IP>users:<LLM MQ service_name>:user:<MQ user>password:<MQ user's password>LLM_<LLM NAME uppercase>:num_parallel_processes:<integer > 0>
Package: neon-mana-utils
Neon ManaNeon Mana (Messagebus Application for Neon AI) provides tools for interacting with
theMessageBus.Install the Mana utilities Python package with:pip install neon-mana-utilsThemanaentrypoint is available to interact with a bus via CLI. Help is available viamana --help.ConfigurationThe default behavior of Mana is to connect to the default core bus (ws://0.0.0.0:8181/core). The connection can be
configured for allmanacommands via:manaconfigure-messagebus--host"192.168.1.100"--port18181--hostspecifies the host URL or IP address--portspecifies the port theMessageBusis running onAny unspecified arguments will use default values.All configurations can be printed to the terminal with:manaprint-configMonitoringMana can connect to a messagebus and log allMessageobjects sent on that bus.manatail-messagebus--format--formatflag formats serialized messages printed to the shellFiltering Messages by type--includeand--excludearguments may be passed to include or exclude messages
withmsg_typematching specified prefixes. Global filters may be specified in:${XDG_CONFIG_HOME}/mana/filters.yml. An example filter file is included here:include:-recognizer_loopexclude:-"recognizer_loop:utterance"The spec above would log anyMessages that start withrecognizer_loop, except
messages with typerecognizer_loop:utterance.Monitoring other MessageBusses--host,--port,--route, and--sslmay be specified to monitor a different
messagebus without changing the configured bus that is used for other commands. A
common use case would be to monitor the GUI bus while interacting with the core bus.Sending MessagesThere are several commands available to interact with a connected Core.send-messageSend an arbitraryMessageover theMessageBus. The specified file should be a json or yaml
serialized message.--responsemay optionally define a response message type to wait for and print to the terminal.Basic CommandsThese are commands supported by Mycroft and all derivative cores; they replicate some of
the commands originally found inmycroft-core/bin.listenSend amycroft.mic.listenMessage.stopSend amycroft.stopMessage.say-toSend arecognizer_loop:utteranceMessage to skills for processing. This sends a minimal message that is
not sufficient for testing user profiles or multi-user cores.speakSend aspeakMessage to TTS for generation and playbackMessagebus APIThese commands are currently specified forneon-coreonly and are not supported
by other cores. Work is ongoing to standardize these entrypoints across projects.get-sttSend aneon.get_sttMessage and print the returned Message with transcriptions.
This will only work under NeonCore.get-ttsSend aneon.get_ttsMessage and print the returned Message with a path to generated TTS.
This will only work under NeonCore.get-responseSend arecognizer_loop:utteranceMessage with the appropriate context to return aklat.shoutresponse.
This will only work under NeonCore and will likely be refactored to reflect NeonCore changes.
Package: neon-messagebus
Neon MessagebusMessagebus Module for Neon Core. This module can be treated as a replacement for themycroft-corebus module. This module handles communication between other
connected modules.Neon Enhancementsneon-messagebusextendsmycroft.messagebuswith the following added functionality:Utilities for sending files and other data over the busA service for managing "signals" used for IPCCompatibilityThis package can be treated as a drop-in replacement formycroft.messagebusRunning in DockerThe includedDockerfilemay be used to build a docker container for the neon_messagebus module. The below command may be used
to start the container.dockerrun-d\--network=host\--name=neon_messagebus\neon_messagebus
Package: neon-minerva
Neon MinervaNeon Minerva (Modular INtelligent Evaluation for a Reliable Voice Assistant)
provides tools for testing skills.Install the Minerva Python package with:pip install neon-minervaTheminervaentrypoint is available to interact with a bus via CLI.
Help is available viaminerva --help.InstallationIf testing Padatious intents, the following system packages must be
installed before installing this package:sudoaptinstallswiglibfann-devTo install this package from PyPI, simply run:pipinstallneon-minervaIf testing with Padatious, install with thepadatiousextras:pipinstallneon-minerva[padatious]UsageThis package provides a CLI for local testing of skills. Skills installed withpipcan be specified by entrypoint, or skills cloned locally can be specified
by root directory.Resource TestsTo test that skill resources are defined for all supported languages,minerva test-resources <skill-entrypoint> <test-file><skill-entrypoint> is the string entrypoint for the skill to test as specified insetup.pyOR the path to
the skill's root directory<test-file> is a relative or absolute path to the resource test file, usuallytest_resources.yamlIntent TestsTo test that skill intents match as expected for all supported languages,minerva test-intents <skill-entrypoint> <test-file><skill-entrypoint> is the string entrypoint for the skill to test as specified insetup.pyOR the path to
the skill's root directory<test-file> is a relative or absolute path to the resource test file, usuallytest_intents.yamlThe--padaciosoflag can be added to test with Padacioso instead of Padatious for relevant intentsAdvanced UsageIn addition to convenient CLI methods, this package also provides test cases that
may be extended.Skill Unit Testsneon_minerva.tests.skill_unit_test_baseprovidesSkillTestCase, a class
that supplies boilerplate setup/teardown/mocking for testing a skill. An example
skill test implementation could look like:fromosimportenvironfromneon_minerva.tests.skill_unit_test_baseimportSkillTestCaseenviron['TEST_SKILL_ENTRYPOINT']="my_skill.test"classMySkillTest(SkillTestCase):deftest_skill_init(self):self.assertEqual(self.skill.skill_id,"my_skill.test")...Be sure to review the base class for mocked methods and test paths as these may
change in the future.Chatbot Unit Testsneon_minerva.chatbotscontains mocked data for testing as well as some utility
methods.neon_minerva.tests.chatbot_v1_test_baseprovidesTestSubmindwhich
may be extended to test a submind bot in a mocked v1 environment. For example:fromosimportenvironfromdatetimeimportdatetimefromchatbot_core.utils.enumimportConversationStatefromneon_minerva.tests.chatbot_v1_test_baseimportTestSubmindfromneon_minerva.chatbots.test_constantsimportPROMPT,RESPONSESenviron["TEST_BOT_ENTRYPOINT"]="tester"classTestTester(TestSubmind):deftest_submind_chatbot(self):self.submind.state=ConversationState.RESPresponse=self.submind.ask_chatbot("testrunner",PROMPT,datetime.now().strftime("%I:%M:%S %p"))self.assertIsInstance(response,str)self.assertIsNotNone(response)Make sure to install thechatbotsextra to use this test case
Package: neon-mq-connector
Neon MQ ConnectorThe Neon MQ Connector is an MQ interface for microservices.ConfigurationBy default, this package will useovos-configto read default configuration. In general, configuration should be passed to theMQConnectorobject at init.Legacy ConfigurationA global configuration for the MQ Connector may be specified at~/.config/neon/mq_config.json. This configuration file
may contain the following keys:server: The hostname or IP address of the MQ server to connect to. If left blank, this defaults to"localhost"port: The port used by the MQ server. If left blank, this defaults to5672users: A mapping of service names to credentials. Note that not all users will have permissions required to access each service.{"server":"localhost","port":5672,"users":{"<service_name>":{"username":"<username>","password":"<password>"}}}ServicesTheMQConnectorclass should be extended by a class providing some specific service.
Service classes will specify the following parameters.service_name: Name of the service, used to identify credentials in configurationvhost: Virtual host to connect to; messages are all constrained to this namespace.consumers: Dict of names toConsumerThreadobjects. AConsumerThreadwill accept a connection to a particularconnection, aqueue, and acallback_funcconnection: MQ connection to thevhostspecified above.queue: Queue to monitor within thevhost. Avhostmay handle multiple queues.callback_func: Function to call when a message arrives in thequeueCallback FunctionsA callback function should have the following signature:defhandle_api_input(self,channel:pika.channel.Channel,method:pika.spec.Basic.Return,properties:pika.spec.BasicProperties,body:bytes):"""Handles input requests from MQ to Neon API:param channel: MQ channel object (pika.channel.Channel):param method: MQ return method (pika.spec.Basic.Return):param properties: MQ properties (pika.spec.BasicProperties):param body: request body (bytes)"""Generally,bodyshould be decoded into adict, and thatdictshould containmessage_id. Themessage_idshould
be included in the body of any response to associate the response to the request.
A response may be sent via:channel.queue_declare(queue='<queue>')channel.basic_publish(exchange='',routing_key='<queue>',body=<data>,properties=pika.BasicProperties(expiration='1000'))Where<queue>is the queue to which the response will be published, anddatais abytesresponse (generally abase64-encodeddict).
Package: neon-phal-plugin-audio-receiver
neon-phal-plugin-audio-receiverHandles bus events to do audio receiver tasks for the Neon.AI OS on a Mycroft Mark 2.self.bus.on("neon.phal.plugin.audio.receiver.set.uxplay.name",self.handle_set_uxplay_name)self.bus.on("neon.phal.plugin.audio.receiver.set.raspotify.name",self.handle_set_raspotify_name)self.bus.on("neon.phal.plugin.audio.receiver.pair.bluetooth",self.handle_pair_bluetooth)self.bus.on("neon.phal.plugin.audio.receiver.pair.kdeconnect",self.handle_pair_kdeconnect)self.bus.on("neon.phal.plugin.audio.receiver.disable.service",self.handle_disable_service)self.bus.on("neon.phal.plugin.audio.receiver.stop.service",self.handle_stop_service)self.bus.on("neon.phal.plugin.audio.receiver.enable.service",self.handle_enable_service)self.bus.on("neon.phal.plugin.audio.receiver.start.service",self.handle_start_service)Testingpytest -vvv --cov=neon_phal_plugin_audio_receiverwill execute the unit tests, which can run in any environment.For integration testing, clone this repo on a Mark 2 with the mid-August Neon image or later and execute/home/neon/venv/bin/python tests/integration/integration.pyTheintegration.pyfile has a couple of commented tests - these are the auto-pairing tests and tests to set device names. Since those require external interaction it's best to run them one at a time as you're ready.