-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Changelog ## [0.0.2a6](https://github.com/NeonGeckoCom/neon-minerva/tree/0.0.2a6) (2023-12-08) [Full Changelog](0.0.2a5...0.0.2a6) **Merged pull requests:** - Move packages with system dependencies to `padatious` extras [\#13](#13) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.2a5](https://github.com/NeonGeckoCom/neon-minerva/tree/0.0.2a5) (2023-12-08) [Full Changelog](0.0.1...0.0.2a5) **Merged pull requests:** - Update GHA to publish pre-releases [\#12](#12) ([NeonDaniel](https://github.com/NeonDaniel)) - Fix bug causing dialog tests to pass when translations are missing [\#11](#11) ([NeonDaniel](https://github.com/NeonDaniel)) - Add support for CBF Submind tests [\#10](#10) ([NeonDaniel](https://github.com/NeonDaniel)) - Add compat. reference for `bus.emitter` [\#9](#9) ([NeonDaniel](https://github.com/NeonDaniel)) - Skill Test Class [\#5](#5) ([NeonDaniel](https://github.com/NeonDaniel)) \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
- Loading branch information
Showing
17 changed files
with
361 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# | ||
# Copyright 2008-2023 Neongecko.com Inc. | All Rights Reserved | ||
# | ||
# Notice of License - Duplicating this Notice of License near the start of any file containing | ||
# a derivative of this software is a condition of license for this software. | ||
# Friendly Licensing: | ||
# No charge, open source royalty free use of the Neon AI software source and object is offered for | ||
# educational users, noncommercial enthusiasts, Public Benefit Corporations (and LLCs) and | ||
# Social Purpose Corporations (and LLCs). Developers can contact [email protected] | ||
# For commercial licensing, distribution of derivative works or redistribution please contact [email protected] | ||
# Distributed on an "AS IS” basis without warranties or conditions of any kind, either express or implied. | ||
# Trademarks of Neongecko: Neon AI(TM), Neon Assist (TM), Neon Communicator(TM), Klat(TM) | ||
# Authors: Guy Daniels, Daniel McKnight, Regina Bloomstine, Elon Gasper, Richard Leeds | ||
# | ||
# Specialized conversational reconveyance options from Conversation Processing Intelligence Corp. | ||
# US Patents 2008-2023: US7424516, US20140161250, US20140177813, US8638908, US8068604, US8553852, US10530923, US10530924 | ||
# China Patent: CN102017585 - Europe Patent: EU2156652 - Patents Pending |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# | ||
# Copyright 2008-2023 Neongecko.com Inc. | All Rights Reserved | ||
# | ||
# Notice of License - Duplicating this Notice of License near the start of any file containing | ||
# a derivative of this software is a condition of license for this software. | ||
# Friendly Licensing: | ||
# No charge, open source royalty free use of the Neon AI software source and object is offered for | ||
# educational users, noncommercial enthusiasts, Public Benefit Corporations (and LLCs) and | ||
# Social Purpose Corporations (and LLCs). Developers can contact [email protected] | ||
# For commercial licensing, distribution of derivative works or redistribution please contact [email protected] | ||
# Distributed on an "AS IS” basis without warranties or conditions of any kind, either express or implied. | ||
# Trademarks of Neongecko: Neon AI(TM), Neon Assist (TM), Neon Communicator(TM), Klat(TM) | ||
# Authors: Guy Daniels, Daniel McKnight, Regina Bloomstine, Elon Gasper, Richard Leeds | ||
# | ||
# Specialized conversational reconveyance options from Conversation Processing Intelligence Corp. | ||
# US Patents 2008-2023: US7424516, US20140161250, US20140177813, US8638908, US8068604, US8553852, US10530923, US10530924 | ||
# China Patent: CN102017585 - Europe Patent: EU2156652 - Patents Pending | ||
|
||
PROMPT = "hello!" | ||
|
||
RESPONSES = {"Ned": "Hi, I'm Ned. How are you, testrunner?", | ||
"Eliza": "Hello... I'm glad you could drop by today.", | ||
"terry": "Hey", | ||
"Ima": "I am ready to talk", | ||
"wolfram": "Hello, human", | ||
"kbot": "hello!", | ||
"alice": "Hi there!", | ||
"abstain": ""} | ||
|
||
VOTES_BY_USER = { | ||
'1prompt1': { | ||
'bot1': [], | ||
'bot2': ['bot1'], | ||
'bot3': [], | ||
'bot4': [], | ||
'abstain': ['bot2', 'bot3', 'bot4'] | ||
}, | ||
'2prompt2': { | ||
'bot1': [], | ||
'bot2': [], | ||
'bot4': [], | ||
'abstain': ['bot1', 'bot2', 'bot4'] | ||
}, | ||
'3prompt3': { | ||
'bot1': [], | ||
'bot2': ['bot1'], | ||
'bot3': [], | ||
'bot4': [], | ||
'abstain': ['bot2', 'bot3', 'bot4'] | ||
} | ||
} | ||
|
||
SELECTIONS = { | ||
'bot1': [('prompt1', 'bot2'), ('prompt2', 'abstain'), ('prompt3', 'bot2')], | ||
'bot2': [('prompt1', 'abstain'), ('prompt2', 'abstain'), ('prompt3', 'abstain')], | ||
'bot3': [('prompt1', 'abstain'), ('prompt3', 'abstain')], | ||
'bot4': [('prompt1', 'abstain'), ('prompt2', 'abstain'), ('prompt3', 'abstain')] | ||
} | ||
|
||
SELECTION_HISTORY = ['bot2', 'bot2', 'bot2'] | ||
|
||
PARTICIPANT_HISTORY = [(), # element 0 is expected to be an empty tuple | ||
('bot1', 'bot2', 'bot3', 'bot4'), | ||
('bot1', 'bot2', 'bot3', 'bot4')] | ||
|
||
# ContextKeeper constants | ||
RECENT_USERS = [f"user{number}" for number in range(20)] | ||
RECENT_SHOUTS = [ | ||
"Who is the president of Ukraine?", | ||
"Who is the president of the US?", | ||
"What is the distance between them?", | ||
"When was he born?" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# | ||
# Copyright 2008-2023 Neongecko.com Inc. | All Rights Reserved | ||
# | ||
# Notice of License - Duplicating this Notice of License near the start of any file containing | ||
# a derivative of this software is a condition of license for this software. | ||
# Friendly Licensing: | ||
# No charge, open source royalty free use of the Neon AI software source and object is offered for | ||
# educational users, noncommercial enthusiasts, Public Benefit Corporations (and LLCs) and | ||
# Social Purpose Corporations (and LLCs). Developers can contact [email protected] | ||
# For commercial licensing, distribution of derivative works or redistribution please contact [email protected] | ||
# Distributed on an "AS IS” basis without warranties or conditions of any kind, either express or implied. | ||
# Trademarks of Neongecko: Neon AI(TM), Neon Assist (TM), Neon Communicator(TM), Klat(TM) | ||
# Authors: Guy Daniels, Daniel McKnight, Regina Bloomstine, Elon Gasper, Richard Leeds | ||
# | ||
# Specialized conversational reconveyance options from Conversation Processing Intelligence Corp. | ||
# US Patents 2008-2023: US7424516, US20140161250, US20140177813, US8638908, US8068604, US8553852, US10530923, US10530924 | ||
# China Patent: CN102017585 - Europe Patent: EU2156652 - Patents Pending | ||
import pkg_resources | ||
|
||
|
||
def load_chatbot(name: str): | ||
try: | ||
from importlib_metadata import entry_points | ||
bot_entrypoints = entry_points(group="neon.plugin.chatbot") | ||
except ImportError: | ||
bot_entrypoints = pkg_resources.iter_entry_points("neon.plugin.chatbot") | ||
|
||
for bot in bot_entrypoints: | ||
if bot.name == name: | ||
return bot.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# | ||
# Copyright 2008-2023 Neongecko.com Inc. | All Rights Reserved | ||
# | ||
# Notice of License - Duplicating this Notice of License near the start of any file containing | ||
# a derivative of this software is a condition of license for this software. | ||
# Friendly Licensing: | ||
# No charge, open source royalty free use of the Neon AI software source and object is offered for | ||
# educational users, noncommercial enthusiasts, Public Benefit Corporations (and LLCs) and | ||
# Social Purpose Corporations (and LLCs). Developers can contact [email protected] | ||
# For commercial licensing, distribution of derivative works or redistribution please contact [email protected] | ||
# Distributed on an "AS IS” basis without warranties or conditions of any kind, either express or implied. | ||
# Trademarks of Neongecko: Neon AI(TM), Neon Assist (TM), Neon Communicator(TM), Klat(TM) | ||
# Authors: Guy Daniels, Daniel McKnight, Regina Bloomstine, Elon Gasper, Richard Leeds | ||
# | ||
# Specialized conversational reconveyance options from Conversation Processing Intelligence Corp. | ||
# US Patents 2008-2023: US7424516, US20140161250, US20140177813, US8638908, US8068604, US8553852, US10530923, US10530924 | ||
# China Patent: CN102017585 - Europe Patent: EU2156652 - Patents Pending | ||
|
||
|
||
import unittest | ||
|
||
from os import getenv | ||
from time import sleep | ||
from chatbot_core.utils import clean_up_bot | ||
from klat_connector import start_socket | ||
from klat_connector.mach_server import MachKlatServer | ||
from neon_minerva.chatbots.util import load_chatbot | ||
|
||
|
||
class TestSubmind(unittest.TestCase): | ||
# Initialize a server for testing | ||
server = MachKlatServer() | ||
sleep(1) | ||
socket = start_socket("0.0.0.0") | ||
submind = None | ||
|
||
@classmethod | ||
def setUpClass(cls) -> None: | ||
# Determine submind to test | ||
submind_entrypoint = getenv("TEST_BOT_ENTRYPOINT") | ||
bot_class = load_chatbot(submind_entrypoint) | ||
# Initialize a submind instance | ||
cls.submind = bot_class(cls.socket, "Private", "testrunner", | ||
"testpassword", on_server=False) | ||
|
||
@classmethod | ||
def tearDownClass(cls) -> None: | ||
clean_up_bot(cls.submind) | ||
cls.server.shutdown_server() |
Oops, something went wrong.