From 359effd534a19192d0195330a5375bc5a683ae47 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Sat, 23 Nov 2024 09:01:55 -0800 Subject: [PATCH] Update DirectClient docs for 0.0.55 --- docs/source/distributions/importing_as_library.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/source/distributions/importing_as_library.md b/docs/source/distributions/importing_as_library.md index 573779f82..815660fd4 100644 --- a/docs/source/distributions/importing_as_library.md +++ b/docs/source/distributions/importing_as_library.md @@ -28,15 +28,9 @@ print("\nChat completion response:") print(response) ``` -If you've created a [custom distribution](https://llama-stack.readthedocs.io/en/latest/distributions/building_distro.html), you can also import it with the `from_config` constructor: +If you've created a [custom distribution](https://llama-stack.readthedocs.io/en/latest/distributions/building_distro.html), you can also use the run.yaml configuration file directly: ```python -import yaml - -with open(config_path, "r") as f: - config_dict = yaml.safe_load(f) - -run_config = parse_and_maybe_upgrade_config(config_dict) - -client = await LlamaStackDirectClient.from_config(run_config) +client = await LlamaStackDirectClient.from_config(config_path) +await client.initialize() ```