mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-27 23:40:24 +00:00
chat completion, testing
# What does this PR do? ## Test Plan # What does this PR do? ## Test Plan
This commit is contained in:
parent
8feb1827c8
commit
ecd8f2113a
27 changed files with 6729 additions and 38 deletions
8
llama_stack/ui/lib/truncate-text.ts
Normal file
8
llama_stack/ui/lib/truncate-text.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export function truncateText(
|
||||
text: string | null | undefined,
|
||||
maxLength: number = 50,
|
||||
): string {
|
||||
if (!text) return "N/A";
|
||||
if (text.length <= maxLength) return text;
|
||||
return text.substring(0, maxLength) + "...";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue