mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
This is yet another of those large PRs (hopefully we will have less and less of them as things mature fast). This one introduces substantial improvements and some simplifications to the stack. Most important bits: * Agents reference implementation now has support for session / turn persistence. The default implementation uses sqlite but there's also support for using Redis. * We have re-architected the structure of the Stack APIs to allow for more flexible routing. The motivating use cases are: - routing model A to ollama and model B to a remote provider like Together - routing shield A to local impl while shield B to a remote provider like Bedrock - routing a vector memory bank to Weaviate while routing a keyvalue memory bank to Redis * Support for provider specific parameters to be passed from the clients. A client can pass data using `x_llamastack_provider_data` parameter which can be type-checked and provided to the Adapter implementations.
32 lines
915 B
Bash
Executable file
32 lines
915 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the terms described in the LICENSE file in
|
|
# the root directory of this source tree.
|
|
|
|
PYTHONPATH=${PYTHONPATH:-}
|
|
THIS_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
|
|
|
|
set -euo pipefail
|
|
|
|
missing_packages=()
|
|
|
|
check_package() {
|
|
if ! pip show "$1" &>/dev/null; then
|
|
missing_packages+=("$1")
|
|
fi
|
|
}
|
|
|
|
if [ ${#missing_packages[@]} -ne 0 ]; then
|
|
echo "Error: The following package(s) are not installed:"
|
|
printf " - %s\n" "${missing_packages[@]}"
|
|
echo "Please install them using:"
|
|
echo "pip install ${missing_packages[*]}"
|
|
exit 1
|
|
fi
|
|
|
|
stack_dir=$(dirname $(dirname $THIS_DIR))
|
|
models_dir=$(dirname $stack_dir)/llama-models
|
|
PYTHONPATH=$PYTHONPATH:$stack_dir:$models_dir python -m docs.openapi_generator.generate $(dirname $THIS_DIR)/resources
|