mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-04 10:10:36 +00:00
Merge remote-tracking branch 'upstream/main' into api-pkg
Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
commit
d6b915ce0a
48 changed files with 1990 additions and 425 deletions
|
|
@ -221,7 +221,15 @@ models:
|
|||
```
|
||||
A Model is an instance of a "Resource" (see [Concepts](../concepts/)) and is associated with a specific inference provider (in this case, the provider with identifier `ollama`). This is an instance of a "pre-registered" model. While we always encourage the clients to register models before using them, some Stack servers may come up a list of "already known and available" models.
|
||||
|
||||
What's with the `provider_model_id` field? This is an identifier for the model inside the provider's model catalog. Contrast it with `model_id` which is the identifier for the same model for Llama Stack's purposes. For example, you may want to name "llama3.2:vision-11b" as "image_captioning_model" when you use it in your Stack interactions. When omitted, the server will set `provider_model_id` to be the same as `model_id`.
|
||||
What's with the `provider_model_id` field? This is an identifier for the model inside the provider's model catalog. The `model_id` field is provided for configuration purposes but is not used as part of the model identifier.
|
||||
|
||||
**Important:** Models are identified as `provider_id/provider_model_id` in the system and when making API calls. When `provider_model_id` is omitted, the server will set it to be the same as `model_id`.
|
||||
|
||||
Examples:
|
||||
- Config: `model_id: llama3.2`, `provider_id: ollama`, `provider_model_id: null`
|
||||
→ Access as: `ollama/llama3.2`
|
||||
- Config: `model_id: my-llama`, `provider_id: vllm-inference`, `provider_model_id: llama-3-2-3b`
|
||||
→ Access as: `vllm-inference/llama-3-2-3b` (the `model_id` is not used in the identifier)
|
||||
|
||||
If you need to conditionally register a model in the configuration, such as only when specific environment variable(s) are set, this can be accomplished by utilizing a special `__disabled__` string as the default value of an environment variable substitution, as shown below:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,3 +19,4 @@ This section provides an overview of the distributions available in Llama Stack.
|
|||
- **[Starting Llama Stack Server](./starting_llama_stack_server.mdx)** - How to run distributions
|
||||
- **[Importing as Library](./importing_as_library.mdx)** - Use distributions in your code
|
||||
- **[Configuration Reference](./configuration.mdx)** - Configuration file format details
|
||||
- **[Llama Stack UI](./llama_stack_ui.mdx)** - Web-based user interface for interacting with Llama Stack servers
|
||||
|
|
|
|||
109
docs/docs/distributions/llama_stack_ui.mdx
Normal file
109
docs/docs/distributions/llama_stack_ui.mdx
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
---
|
||||
title: Llama Stack UI
|
||||
description: Web-based user interface for interacting with Llama Stack servers
|
||||
sidebar_label: Llama Stack UI
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Llama Stack UI
|
||||
|
||||
The Llama Stack UI is a web-based interface for interacting with Llama Stack servers. Built with Next.js and React, it provides a visual way to work with agents, manage resources, and view logs.
|
||||
|
||||
## Features
|
||||
|
||||
- **Logs & Monitoring**: View chat completions, agent responses, and vector store activity
|
||||
- **Vector Stores**: Create and manage vector databases for RAG (Retrieval-Augmented Generation) workflows
|
||||
- **Prompt Management**: Create and manage reusable prompts
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You need a running Llama Stack server. The UI is a client that connects to the Llama Stack backend.
|
||||
|
||||
If you don't have a Llama Stack server running yet, see the [Starting Llama Stack Server](../getting_started/starting_llama_stack_server.mdx) guide.
|
||||
|
||||
## Running the UI
|
||||
|
||||
### Option 1: Using npx (Recommended for Quick Start)
|
||||
|
||||
The fastest way to get started is using `npx`:
|
||||
|
||||
```bash
|
||||
npx llama-stack-ui
|
||||
```
|
||||
|
||||
This will start the UI server on `http://localhost:8322` (default port).
|
||||
|
||||
### Option 2: Using Docker
|
||||
|
||||
Run the UI in a container:
|
||||
|
||||
```bash
|
||||
docker run -p 8322:8322 llamastack/ui
|
||||
```
|
||||
|
||||
Access the UI at `http://localhost:8322`.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
The UI can be configured using the following environment variables:
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `LLAMA_STACK_BACKEND_URL` | URL of your Llama Stack server | `http://localhost:8321` |
|
||||
| `LLAMA_STACK_UI_PORT` | Port for the UI server | `8322` |
|
||||
|
||||
If the Llama Stack server is running with authentication enabled, you can configure the UI to use it by setting the following environment variables:
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `NEXTAUTH_URL` | NextAuth URL for authentication | `http://localhost:8322` |
|
||||
| `GITHUB_CLIENT_ID` | GitHub OAuth client ID (optional, for authentication) | - |
|
||||
| `GITHUB_CLIENT_SECRET` | GitHub OAuth client secret (optional, for authentication) | - |
|
||||
|
||||
### Setting Environment Variables
|
||||
|
||||
#### For npx:
|
||||
|
||||
```bash
|
||||
LLAMA_STACK_BACKEND_URL=http://localhost:8321 \
|
||||
LLAMA_STACK_UI_PORT=8080 \
|
||||
npx llama-stack-ui
|
||||
```
|
||||
|
||||
#### For Docker:
|
||||
|
||||
```bash
|
||||
docker run -p 8080:8080 \
|
||||
-e LLAMA_STACK_BACKEND_URL=http://localhost:8321 \
|
||||
-e LLAMA_STACK_UI_PORT=8080 \
|
||||
llamastack/ui
|
||||
```
|
||||
|
||||
## Using the UI
|
||||
|
||||
### Managing Resources
|
||||
|
||||
- **Vector Stores**: Create vector databases for RAG workflows, view stored documents and embeddings
|
||||
- **Prompts**: Create and manage reusable prompt templates
|
||||
- **Chat Completions**: View history of chat interactions
|
||||
- **Responses**: Browse detailed agent responses and tool calls
|
||||
|
||||
## Development
|
||||
|
||||
If you want to run the UI from source for development:
|
||||
|
||||
```bash
|
||||
# From the project root
|
||||
cd src/llama_stack_ui
|
||||
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Set environment variables
|
||||
export LLAMA_STACK_BACKEND_URL=http://localhost:8321
|
||||
|
||||
# Start the development server
|
||||
npm run dev
|
||||
```
|
||||
|
||||
The development server will start on `http://localhost:8322` with hot reloading enabled.
|
||||
|
|
@ -57,6 +57,7 @@ const sidebars: SidebarsConfig = {
|
|||
'distributions/importing_as_library',
|
||||
'distributions/configuration',
|
||||
'distributions/starting_llama_stack_server',
|
||||
'distributions/llama_stack_ui',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Self-Hosted Distributions',
|
||||
|
|
|
|||
40
docs/static/llama-stack-spec.yaml
vendored
40
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -2688,7 +2688,8 @@ paths:
|
|||
responses:
|
||||
'200':
|
||||
description: >-
|
||||
A VectorStoreFileContentResponse representing the file contents.
|
||||
File contents, optionally with embeddings and metadata based on query
|
||||
parameters.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
|
|
@ -2723,6 +2724,20 @@ paths:
|
|||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: include_embeddings
|
||||
in: query
|
||||
description: >-
|
||||
Whether to include embedding vectors in the response.
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/bool'
|
||||
- name: include_metadata
|
||||
in: query
|
||||
description: >-
|
||||
Whether to include chunk metadata in the response.
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/bool'
|
||||
deprecated: false
|
||||
/v1/vector_stores/{vector_store_id}/search:
|
||||
post:
|
||||
|
|
@ -9375,6 +9390,8 @@ components:
|
|||
title: VectorStoreFileDeleteResponse
|
||||
description: >-
|
||||
Response from deleting a vector store file.
|
||||
bool:
|
||||
type: boolean
|
||||
VectorStoreContent:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -9386,6 +9403,26 @@ components:
|
|||
text:
|
||||
type: string
|
||||
description: The actual text content
|
||||
embedding:
|
||||
type: array
|
||||
items:
|
||||
type: number
|
||||
description: >-
|
||||
Optional embedding vector for this content chunk
|
||||
chunk_metadata:
|
||||
$ref: '#/components/schemas/ChunkMetadata'
|
||||
description: Optional chunk metadata
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: 'null'
|
||||
- type: boolean
|
||||
- type: number
|
||||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
description: Optional user-defined metadata
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
|
|
@ -9409,6 +9446,7 @@ components:
|
|||
description: Parsed content of the file
|
||||
has_more:
|
||||
type: boolean
|
||||
default: false
|
||||
description: >-
|
||||
Indicates if there are more content pages to fetch
|
||||
next_page:
|
||||
|
|
|
|||
40
docs/static/stainless-llama-stack-spec.yaml
vendored
40
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -2691,7 +2691,8 @@ paths:
|
|||
responses:
|
||||
'200':
|
||||
description: >-
|
||||
A VectorStoreFileContentResponse representing the file contents.
|
||||
File contents, optionally with embeddings and metadata based on query
|
||||
parameters.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
|
|
@ -2726,6 +2727,20 @@ paths:
|
|||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: include_embeddings
|
||||
in: query
|
||||
description: >-
|
||||
Whether to include embedding vectors in the response.
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/bool'
|
||||
- name: include_metadata
|
||||
in: query
|
||||
description: >-
|
||||
Whether to include chunk metadata in the response.
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/bool'
|
||||
deprecated: false
|
||||
/v1/vector_stores/{vector_store_id}/search:
|
||||
post:
|
||||
|
|
@ -10091,6 +10106,8 @@ components:
|
|||
title: VectorStoreFileDeleteResponse
|
||||
description: >-
|
||||
Response from deleting a vector store file.
|
||||
bool:
|
||||
type: boolean
|
||||
VectorStoreContent:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -10102,6 +10119,26 @@ components:
|
|||
text:
|
||||
type: string
|
||||
description: The actual text content
|
||||
embedding:
|
||||
type: array
|
||||
items:
|
||||
type: number
|
||||
description: >-
|
||||
Optional embedding vector for this content chunk
|
||||
chunk_metadata:
|
||||
$ref: '#/components/schemas/ChunkMetadata'
|
||||
description: Optional chunk metadata
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: 'null'
|
||||
- type: boolean
|
||||
- type: number
|
||||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
description: Optional user-defined metadata
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
|
|
@ -10125,6 +10162,7 @@ components:
|
|||
description: Parsed content of the file
|
||||
has_more:
|
||||
type: boolean
|
||||
default: false
|
||||
description: >-
|
||||
Indicates if there are more content pages to fetch
|
||||
next_page:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue