Skip to content

Commit 359effd

Browse files
committed
Update DirectClient docs for 0.0.55
1 parent 707da55 commit 359effd

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

docs/source/distributions/importing_as_library.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@ print("\nChat completion response:")
2828
print(response)
2929
```
3030

31-
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:
31+
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:
3232

3333
```python
34-
import yaml
35-
36-
with open(config_path, "r") as f:
37-
config_dict = yaml.safe_load(f)
38-
39-
run_config = parse_and_maybe_upgrade_config(config_dict)
40-
41-
client = await LlamaStackDirectClient.from_config(run_config)
34+
client = await LlamaStackDirectClient.from_config(config_path)
35+
await client.initialize()
4236
```

0 commit comments

Comments
 (0)