llama.cpp
00d5c142 - ui: share conversations to Hugging Face datasets as agent traces (#32608)

Commit
1 day ago
ui: share conversations to Hugging Face datasets as agent traces (#32608) * ui: add @ggml-org/llama-huggingface, a Hugging Face account as a package A package in ui/lib that gives an app running in the browser, with no server of its own, a Hugging Face account. Its plain entry holds "Sign in with Hugging Face" (OAuth with PKCE and dynamic client registration) and the Hub calls: who the account is, its datasets, and committing a trace file to one. Its Svelte entry holds the account as state (HfAccount) and the components that show it, built on Llama UI: the account panel and the dialog that shares a trace. It knows no app: the app says who it is and hands over what to share. Llama Chat compiles it from source, like the other packages, so the llama-server image builds (.devops) and the asset staging (scripts/ui-assets.cmake) copy its sources next to the other packages'. CI checks and tests it. Assisted-by: Claude (Opus 5.5 Medium) * ui: share conversations to Hugging Face datasets as agent traces A conversation's menu and each message get a Share action. It uploads the conversation, or the branch up to that message, to a Hugging Face dataset as a JSONL trace, which the Hub shows in its trace viewer. The sign-in is part of the share: the dialog (@ggml-org/llama-huggingface) asks for it with "Sign in with Hugging Face" (contribute-repos: the app creates datasets and writes only to the ones it created) or with a pasted access token. It then shows the datasets the account can add to as tiles, with a tile to create a new one (public unless the private option is ticked); with none to add to, it asks for the name of a new dataset. A pasted token reaches every dataset of the account; a sign-in reaches the ones this browser shared to. Once shared, the dialog shows the trace as a file with the first messages of the conversation fading out below it, and every action in one place at the bottom right. Once signed in, Settings > General shows the account with its Sign out; before that it shows nothing. The builds we release have the sharing: the prebuilt UI llama-server downloads, the llama-server images and the npm package. A build of your own has it only when asked for. VITE_PUBLIC_HUGGING_FACE=true bundles the package's sign-in, upload and dialogs; without it the package's Svelte entry resolves to an inert stand-in, which CI checks against the bundle built with it. The dev server, the tests and Storybook have it. -DLLAMA_UI_HUGGING_FACE=ON adds it to llama-server's UI built from source (it builds again when the option changes), and the Docker images take the variable as a build argument. The conversation menu is now one component, ConversationActions, used by the sidebar row, the search results and the chat tabs, so each offers the same actions. Llama Chat and its llama-chat alias go to 0.4.0. Assisted-by: Claude (Opus 5.5 Medium)
Author
Parents
Loading