Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
CreatureChat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Public
CreatureChat
Commits
bef62fd1
Commit
bef62fd1
authored
Feb 09, 2025
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sorting of models, on compare LLM page
parent
7505164b
Pipeline
#13332
passed with stages
in 1 minute 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
CompareOutputs.html
src/test/CompareOutputs.html
+11
-7
No files found.
src/test/CompareOutputs.html
View file @
bef62fd1
...
...
@@ -41,7 +41,7 @@
/* Nested Table (Model Outputs) */
.nested
{
display
:
none
;
background-color
:
#222
;
}
.nested
th
{
background-color
:
#1a1a1a
;
}
.nested
td
{
background-color
:
#2a2a2a
;
color
:
#fff
;
}
.nested
td
{
background-color
:
#2a2a2a
;
color
:
#fff
;
vertical-align
:
top
;
}
/* Color Coding for Prompt Files */
.nervous
{
color
:
#f2994a
;
}
/* Warm Orange */
...
...
@@ -97,9 +97,12 @@
});
});
// Convert Set to Array and Sort Models
const
sortedModels
=
Array
.
from
(
availableModels
).
sort
();
// Generate model checkboxes with counts
const
filtersDiv
=
document
.
getElementById
(
"modelFilters"
);
available
Models
.
forEach
(
model
=>
{
sorted
Models
.
forEach
(
model
=>
{
const
sanitizedModel
=
sanitizeClassName
(
model
);
const
count
=
modelCounts
.
get
(
model
)
||
0
;
// Default to 0 if no responses
...
...
@@ -124,7 +127,8 @@
sortedKeys
.
forEach
((
prompt
)
=>
{
const
modelResponses
=
data
[
prompt
];
const
modelCount
=
Object
.
keys
(
modelResponses
).
length
;
const
sortedModelKeys
=
Object
.
keys
(
modelResponses
).
sort
();
const
modelCount
=
sortedModelKeys
.
length
;
// Get correct count
const
row
=
document
.
createElement
(
"tr"
);
row
.
classList
.
add
(
"row"
);
...
...
@@ -137,10 +141,10 @@
nestedRow
.
classList
.
add
(
"nested"
);
nestedRow
.
innerHTML
=
`<td>
<table model-count="
${
modelCount
}
">
<tr>
${
Object
.
keys
(
modelResponses
)
.
map
(
model
=>
`<th class="model-col
${
sanitizeClassName
(
model
)}
">
${
escapeHTML
(
model
)}
</th>`
).
join
(
""
)}
</tr>
<tr>
${
Object
.
keys
(
modelResponses
)
.
map
(
model
=>
`<td class="model-col
${
sanitizeClassName
(
model
)}
">
${
formatText
(
escapeHTML
(
modelResponses
[
model
]))}
</td>`
).
join
(
""
)}
</tr>
<tr>
${
sortedModelKeys
.
map
(
model
=>
`<th class="model-col
${
sanitizeClassName
(
model
)}
" style="width:
${
100
/
modelCount
}
%;
">
${
escapeHTML
(
model
)}
</th>`
).
join
(
""
)}
</tr>
<tr>
${
sortedModelKeys
.
map
(
model
=>
`<td class="model-col
${
sanitizeClassName
(
model
)}
" style="width:
${
100
/
modelCount
}
%;
">
${
formatText
(
escapeHTML
(
modelResponses
[
model
]))}
</td>`
).
join
(
""
)}
</tr>
</table>
</td>`
;
tableBody
.
appendChild
(
nestedRow
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment