tabby/crates/http-api-bindings
Meng Zhang e171776774 Release 0.5.0-dev
ctranslate2-bindings@0.5.0-dev
http-api-bindings@0.5.0-dev
llama-cpp-bindings@0.5.0-dev
rust-cxx-cmake-bridge@0.5.0-dev
tabby@0.5.0-dev
tabby-common@0.5.0-dev
tabby-download@0.5.0-dev
tabby-inference@0.5.0-dev
tabby-scheduler@0.5.0-dev

Generated by cargo-workspaces
2023-10-24 13:05:33 -07:00
..
src refactor: extract language configuration into individual toml file (#564) 2023-10-16 00:24:44 +00:00
Cargo.toml Release 0.5.0-dev 2023-10-24 13:05:33 -07:00
README.md feat: add support vertex-ai http bindings (#419) 2023-09-09 11:22:58 +00:00

README.md

Examples

export MODEL_ID="code-gecko"
export PROJECT_ID="$(gcloud config get project)"
export API_ENDPOINT="https://us-central1-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/us-central1/publishers/google/models/${MODEL_ID}:predict"
export AUTHORIZATION="Bearer $(gcloud auth print-access-token)"

cargo run --example simple

Usage

export MODEL_ID="code-gecko"
export PROJECT_ID="$(gcloud config get project)"
export API_ENDPOINT="https://us-central1-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/us-central1/publishers/google/models/${MODEL_ID}:predict"
export AUTHORIZATION="Bearer $(gcloud auth print-access-token)"

cargo run serve --device experimental-http --model "{\"kind\": \"vertex-ai\", \"api_endpoint\": \"$API_ENDPOINT\", \"authorization\": \"$AUTHORIZATION\"}"