Skip to content

Conversation

GoudaCouda
Copy link

@GoudaCouda GoudaCouda commented May 5, 2025

Added a dropdown in the UI header to switch between different system prompt modes (like Conversation, Coder, etc.).

I was getting annoyed when I was trying to get info on something but it would only answer with a couple words and ran me in circles. Instead of needing to change via the txt file every time, this should be much easier.

I added a few just super quick example prompts.

  • Prompt txt files go in code/prompts folder (which you can set in server.py).
  • The server finds these automatically at startup.

UI Changes:

  • Added a <select> dropdown to index.html (in the header).
  • It gets populated by calling the /get_modes API endpoint.

Backend Logic:

  • Moved all the prompt loading/switching logic into SpeechPipelineManager.
  • server.py now just calls methods on the manager via /get_modes and /set_mode API endpoints.
  • Cleaned up old code that loaded code/system_prompt.txt.

I also have a placeholder settings button in there for adding the ability to edit prompts, change models, or voices or such. I wasn't going to leave it in because I didn't do the logic yet, but then the UI looked weird so I just left it.

@KoljaB
Copy link
Owner

KoljaB commented May 5, 2025

Looks very useful, thx a lot, will look into it soon

TTS_START_ENGINE = "orpheus"
TTS_START_ENGINE = "kokoro"
TTS_START_ENGINE = "coqui"
#TTS_START_ENGINE = "coqui"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not comment on unneeded code. If you want to recover it then you should use the commits history instead of commenting on unused rows.

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.

3 participants