Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework LLM output parser + add narrator #475

Merged
merged 8 commits into from
Jan 17, 2025

Conversation

Leidtier
Copy link
Contributor

  • split off the part of a sentence that is relevant to an LLM into sentence_content
  • added is_narration bool identifier to sentence_content
  • extended formatting of sentences in assistant_message to treat sentences flagged as is_narration correctly
  • added output_parser.py with abstract class output_parser as well subclasses clean_sentence_parser, change_character_parser, narration_parser, sentence_end_parser and actions_parser
  • reworked process_response() in ChatManager to use the the output parsers
  • parsers are put into a chain/pipeline and get applied to the LLM output, each parser decides on it's own if it should cut the output and prepare the sentence
  • added config value narration_handling with options Cut narration, Respective character speaks its narrations and Use narrator
  • added config value narrator_voice
  • removed maximum sentence length restriction from generation and instead introduced abbreviation of the subtitle text before sending it to the game

Leidtier and others added 8 commits January 14, 2025 21:03
- split off the part of a `sentence` that is relevant to an LLM into `sentence_content`
- added `is_narration` bool identifier to `sentence_content`
- extended formatting of sentences in `assistant_message` to treat sentences flagged as `is_narration` correctly
- added `output_parser.py` with abstract class `output_parser` as well subclasses `clean_sentence_parser`, `change_character_parser`, `narration_parser`, `sentence_end_parser` and `actions_parser`
- reworked `process_response()` in `ChatManager` to use the the output parsers
- parsers are put into a chain/pipeline and get applied to the LLM output, each parser decides on it's own if it should cut the output and prepare the sentence
- added config value `narration_handling` with options *Cut narration*, *Respective character speaks its narrations* and *Use narrator*
- added config value `narrator_voice`
- removed maximum sentence length restriction from generation and instead introduced abbreviation of the subtitle text before sending it to the game
… now variables

config value to set them is still missing
@art-from-the-machine art-from-the-machine merged commit 9878bc3 into art-from-the-machine:main Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants