mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
docs: Updated docs to show minimal RAG example and some other minor changes (#1935)
# What does this PR do? Incorporating some feedback into the docs. - **`docs/source/getting_started/index.md`:** - Demo actually does RAG now - Simplified the installation command for dependencies. - Updated demo script examples to align with the latest API changes. - Replaced manual document manipulation with `RAGDocument` for clarity and maintainability. - Introduced new logic for model and embedding selection using the Llama Stack Client SDK. - Enhanced examples to showcase proper agent initialization and logging. - **`docs/source/getting_started/detailed_tutorial.md`:** - Updated the section for listing models to include proper code formatting with `bash`. - Removed and reorganized the "Run the Demos" section for clarity. - Adjusted tab-item structures and added new instructions for demo scripts. - **`docs/_static/css/my_theme.css`:** - Updated heading styles to include `h2`, `h3`, and `h4` for consistent font weight. - Added a new style for `pre` tags to wrap text and break long words, this is particularly useful for rendering long output from generation. ## Test Plan Tested locally. Screenshot for reference: <img width="1250" alt="Screenshot 2025-04-10 at 10 12 12 PM" src="https://github.com/user-attachments/assets/ce1c8986-e072-4c6f-a697-ed0d8fb75b34" /> --------- Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
c1cb6aad11
commit
24d70cedca
3 changed files with 62 additions and 71 deletions
|
@ -173,9 +173,8 @@ You will see the below:
|
|||
Done! You can now use the Llama Stack Client CLI with endpoint http://localhost:8321
|
||||
```
|
||||
|
||||
#### iii. List Available Models
|
||||
List the models
|
||||
```
|
||||
```bash
|
||||
llama-stack-client models list
|
||||
Available Models
|
||||
|
||||
|
@ -190,15 +189,6 @@ Available Models
|
|||
Total models: 2
|
||||
|
||||
```
|
||||
|
||||
## Step 4: Run the Demos
|
||||
|
||||
Note that these demos show the [Python Client SDK](../references/python_sdk_reference/index.md).
|
||||
Other SDKs are also available, please refer to the [Client SDK](../index.md#client-sdks) list for the complete options.
|
||||
|
||||
::::{tab-set}
|
||||
|
||||
:::{tab-item} Basic Inference with the CLI
|
||||
You can test basic Llama inference completion using the CLI.
|
||||
|
||||
```bash
|
||||
|
@ -221,10 +211,16 @@ ChatCompletionResponse(
|
|||
],
|
||||
)
|
||||
```
|
||||
:::
|
||||
|
||||
:::{tab-item} Basic Inference with a Script
|
||||
Alternatively, you can run inference using the Llama Stack client SDK.
|
||||
## Step 4: Run the Demos
|
||||
|
||||
Note that these demos show the [Python Client SDK](../references/python_sdk_reference/index.md).
|
||||
Other SDKs are also available, please refer to the [Client SDK](../index.md#client-sdks) list for the complete options.
|
||||
|
||||
::::{tab-set}
|
||||
|
||||
:::{tab-item} Basic Inference
|
||||
Now you can run inference using the Llama Stack client SDK.
|
||||
|
||||
### i. Create the Script
|
||||
Create a file `inference.py` and add the following code:
|
||||
|
@ -269,7 +265,7 @@ Beauty in the bits
|
|||
:::
|
||||
|
||||
:::{tab-item} Build a Simple Agent
|
||||
Now we can move beyond simple inference and build an agent that can perform tasks using the Llama Stack server.
|
||||
Next we can move beyond simple inference and build an agent that can perform tasks using the Llama Stack server.
|
||||
### i. Create the Script
|
||||
Create a file `agent.py` and add the following code:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue