10000 webui : put DeepSeek R1 CoT in a collapsible <details> element by stduhpf · Pull Request #11364 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

webui : put DeepSeek R1 CoT in a collapsible <details> element #11364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build
  • Loading branch information
ngxson committed Jan 23, 2025
commit 9c4962ff98303d208f3cea22db738b423ddd7ce1
Binary file modified examples/server/public/index.html.gz
Binary file not shown.
10 changes: 5 additions & 5 deletions examples/server/webui/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,16 @@ const StorageUtils = {
},
/**
* can return null if convId does not exist
* @param {string} convId
* @param {string} convId
* @returns {Conversation | null}
*/
getOneConversation(convId) {
return JSON.parse(localStorage.getItem(convId) || 'null');
},
/**
* if convId does not exist, create one
* @param {string} convId
* @param {Message} msg
* @param {string} convId
* @param {Message} msg
*/
appendMsg(convId, msg) {
if (msg.content === null) return;
Expand Down Expand Up @@ -672,7 +672,7 @@ try {

/**
* filter out redundant fields upon sending to API
* @param {Array<APIMessage>} messages
* @param {Array<APIMessage>} messages
* @returns {Array<APIMessage>}
*/
function normalizeMsgsForAPI(messages) {
Expand All @@ -686,7 +686,7 @@ function normalizeMsgsForAPI(messages) {

/**
* recommended for DeepsSeek-R1, filter out content between <think> and </think> tags
* @param {Array<APIMessage>} messages
* @param {Array<APIMessage>} messages
* @returns {Array<APIMessage>}
*/
function filterThoughtFromMsgs(messages) {
Expand Down
Loading
0