Skip to content

Commit

Permalink
Fix yml -> yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dnhkng committed Jan 25, 2025
1 parent 7c55b17 commit ab67096
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ and then add it to glados_config.yaml as the model.
You can find [more models here!](https://ollama.com/library)

## More Personalities or LLM's
Make a copy of the file 'glados_config.yml' and give it a new name, then edit the parameters:
Make a copy of the file 'glados_config.yaml' and give it a new name, then edit the parameters:

model: # the LLM model you want to use, see "Changing the LLM Model"
personality_preprompt:
Expand All @@ -111,7 +111,7 @@ Make a copy of the file 'glados_config.yml' and give it a new name, then edit th

To use these new settings, use the command:

uv run glados start --config new_config.yml
uv run glados start --config new_config.yaml

## Common Issues
1. If you find you are getting stuck in loops, as GLaDOS is hearing herself speak, you have two options:
Expand Down
File renamed without changes.
22 changes: 11 additions & 11 deletions src/glados/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ def download_with_progress(url: str, path: Path, expected_hash: str, max_retries
sys.exit(1)


def say(text: str, config_path: str | Path = "glados_config.yml") -> None:
def say(text: str, config_path: str | Path = "glados_config.yaml") -> None:
"""
Converts text to speech using the GLaDOS text-to-speech system and plays the generated audio.
Parameters:
text (str): The text to be spoken by the GLaDOS voice assistant.
config_path (str | Path, optional): Path to the configuration YAML file.
Defaults to "glados_config.yml".
Defaults to "glados_config.yaml".
Notes:
- Uses a text-to-speech synthesizer to generate audio
Expand All @@ -206,7 +206,7 @@ def say(text: str, config_path: str | Path = "glados_config.yml") -> None:
sd.wait()


def start(config_path: str | Path = "glados_config.yml") -> None:
def start(config_path: str | Path = "glados_config.yaml") -> None:
"""
Start the GLaDOS voice assistant and initialize its listening event loop.
Expand All @@ -215,15 +215,15 @@ def start(config_path: str | Path = "glados_config.yml") -> None:
Parameters:
config_path (str | Path, optional): Path to the configuration YAML file.
Defaults to "glados_config.yml" in the current directory.
Defaults to "glados_config.yaml" in the current directory.
Raises:
FileNotFoundError: If the specified configuration file cannot be found.
ValueError: If the configuration file is invalid or cannot be parsed.
Example:
start() # Uses default configuration file
start("/path/to/custom/config.yml") # Uses a custom configuration file
start("/path/to/custom/config.yaml") # Uses a custom configuration file
"""
glados_config = GladosConfig.from_yaml(str(config_path))
glados = Glados.from_config(glados_config)
Expand Down Expand Up @@ -261,7 +261,7 @@ def main() -> None:
the assistant.
Optional Arguments:
--config (str): Path to configuration file, defaults to 'glados_config.yml'
--config (str): Path to configuration file, defaults to 'glados_config.yaml'
Raises:
SystemExit: If invalid arguments are provided
Expand All @@ -277,8 +277,8 @@ def main() -> None:
start_parser.add_argument(
"--config",
type=str,
default="glados_config.yml",
help="Path to configuration file (default: glados_config.yml)",
default="glados_config.yaml",
help="Path to configuration file (default: glados_config.yaml)",
)

# Say command
Expand All @@ -287,8 +287,8 @@ def main() -> None:
say_parser.add_argument(
"--config",
type=str,
default="glados_config.yml",
help="Path to configuration file (default: glados_config.yml)",
default="glados_config.yaml",
help="Path to configuration file (default: glados_config.yaml)",
)

args = parser.parse_args()
Expand All @@ -304,7 +304,7 @@ def main() -> None:
start(args.config)
else:
# Default to start if no command specified
start("glados_config.yml")
start("glados_config.yaml")


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion src/glados/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def _process_chunk(self, line: dict[str, Any]) -> str | None:

def start() -> None:
"""Set up the LLM server and start GlaDOS."""
glados_config = GladosConfig.from_yaml("glados_config.yml")
glados_config = GladosConfig.from_yaml("glados_config.yaml")
glados = Glados.from_config(glados_config)
glados.start_listen_event_loop()

Expand Down

0 comments on commit ab67096

Please sign in to comment.