-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from GabrielSCabrera/dev
Add new teacher characters
- Loading branch information
Showing
9 changed files
with
74 additions
and
8 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,30 @@ | ||
from banterbot import AzureNeuralVoiceManager, OpenAIModelManager, TKInterface | ||
|
||
|
||
def run() -> None: | ||
""" | ||
Runs the TKInterface for a custom-made character. | ||
""" | ||
model = OpenAIModelManager.load("gpt-4-turbo") | ||
tone_model = OpenAIModelManager.load("gpt-4-turbo") | ||
voice = AzureNeuralVoiceManager.load("Henri") | ||
|
||
# Optional system prompt to set up a custom character prior to initializing BanterBot. | ||
system = ( | ||
"You are Henri, a dedicated and passionate French teacher for English speakers known for your engaging and" | ||
" effective teaching methods. You are receiving voice transcriptions that may not always perfectly capture the" | ||
" student's intended words due to accents or pronunciation differences. When it seems like a word may have been" | ||
" misinterpreted by the voice transcription, you use contextual understanding to deduce the most likely" | ||
" meaning. Be sure everything you say is in a format suitable for dictation, rather than reading, and remain" | ||
" flexible and patient with the nuances of spoken language." | ||
) | ||
|
||
interface = TKInterface( | ||
model=model, | ||
voice=voice, | ||
system=system, | ||
tone_model=tone_model, | ||
languages=["en-US", "fr-FR"], | ||
assistant_name="Henri", | ||
) | ||
interface.run(greet=True) |
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,32 @@ | ||
from banterbot import AzureNeuralVoiceManager, OpenAIModelManager, TKInterface | ||
|
||
|
||
def run() -> None: | ||
""" | ||
Runs the TKInterface for a custom-made character. | ||
""" | ||
model = OpenAIModelManager.load("gpt-4-turbo") | ||
tone_model = OpenAIModelManager.load("gpt-4-turbo") | ||
voice = AzureNeuralVoiceManager.load("Xiaoxiao") | ||
|
||
# Optional system prompt to set up a custom character prior to initializing BanterBot. | ||
system = ( | ||
"You are Chen Lao Shi, a kind but firm Chinese teacher for English speakers known for your patience and" | ||
" effective teaching methods. You speak with a clear and articulate Mandarin accent and sometimes mix in" | ||
" Chinese words with English for emphasis. You are receiving voice transcriptions that may not always perfectly" | ||
" capture the student's intended words due to accents or pronunciation differences. When it seems like a word" | ||
" may have been misinterpreted by the voice transcription, you use contextual understanding to deduce the most" | ||
" likely meaning. Be sure everything you say is in a format suitable for dictation, rather than reading, and" | ||
" remain flexible and patient with the nuances of spoken language." | ||
) | ||
|
||
interface = TKInterface( | ||
model=model, | ||
voice=voice, | ||
system=system, | ||
tone_model=tone_model, | ||
languages=["en-US", "zh-CN"], | ||
phrase_list=["Chen Lao Shi"], | ||
assistant_name="Chen Lao Shi", | ||
) | ||
interface.run(greet=True) |
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 |
---|---|---|
|
@@ -37,7 +37,7 @@ def run_tests(): | |
return test_suite | ||
|
||
|
||
version = "0.0.14" | ||
version = "0.0.15" | ||
setup( | ||
author="Gabriel S. Cabrera", | ||
author_email="[email protected]", | ||
|