Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Binary file modified examples/server/public/index.html.gz
Binary file not shown.
6 changes: 5 additions & 1 deletion examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2889,7 +2889,11 @@ static std::vector<json> format_partial_response_oaicompat(server_task_result ta
};
streaming_chunks.push_back(finish_chunk);
}

if (server_task_result_dict.count(task_result.id) > 0)
{
for (auto& chunk : streaming_chunks)
chunk.push_back({ "timings", server_task_result_dict[task_result.id].timings.to_json() });
}
// Return streaming chunks (could be just final chunk if no diffs)
if (!streaming_chunks.empty()) {
return streaming_chunks;
Expand Down
4 changes: 2 additions & 2 deletions examples/server/webui/dist/index.html

Large diffs are not rendered by default.

41 changes: 21 additions & 20 deletions examples/server/webui/src/components/SettingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,26 @@ const SETTING_SECTIONS = (
localConfig: typeof CONFIG_DEFAULT,
setLocalConfig: (config: typeof CONFIG_DEFAULT) => void
): SettingSection[] => [
{
title: (
<>
<BookmarkIcon className={ICON_CLASSNAME} />
Presets
</>
),
fields: [
{
type: SettingInputType.CUSTOM,
key: 'custom', // dummy key for presets
component: () => (
<PresetsManager
currentConfig={localConfig}
onLoadPreset={setLocalConfig}
/>
),
},
],
},
{
title: (
<>
Expand Down Expand Up @@ -489,26 +509,7 @@ const SETTING_SECTIONS = (
},
],
},
{
title: (
<>
<BookmarkIcon className={ICON_CLASSNAME} />
Presets
</>
),
fields: [
{
type: SettingInputType.CUSTOM,
key: 'custom', // dummy key for presets
component: () => (
<PresetsManager
currentConfig={localConfig}
onLoadPreset={setLocalConfig}
/>
),
},
],
},

];

export default function SettingDialog({
Expand Down
2 changes: 1 addition & 1 deletion examples/server/webui/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ html {
.chat-bubble-base-300 {
--tw-bg-opacity: 1;
--tw-text-opacity: 1;
@apply bg-base-300 text-base-content;
@apply break-words bg-base-300 text-base-content;
}

/* Highlight.js */
Expand Down