mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
# What does this PR do? ## Test Plan # What does this PR do? ## Test Plan # What does this PR do? ## Test Plan
12 lines
319 B
TypeScript
12 lines
319 B
TypeScript
import LlamaStackClient from "llama-stack-client";
|
|
import { getAuthToken } from "./auth";
|
|
|
|
export function getClient() {
|
|
const token = getAuthToken();
|
|
|
|
return new LlamaStackClient({
|
|
baseURL:
|
|
typeof window !== "undefined" ? `${window.location.origin}/api` : "/api",
|
|
apiKey: token || undefined,
|
|
});
|
|
}
|