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
7505164b
Commit
7505164b
authored
Feb 09, 2025
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added # of responses to compare LLM page, and added Llama 3.1 8b model output.
parent
845b7535
Pipeline
#13331
passed with stages
in 1 minute 56 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
BehaviorOutputs.json
src/test/BehaviorOutputs.json
+0
-0
CompareOutputs.html
src/test/CompareOutputs.html
+17
-9
No files found.
src/test/BehaviorOutputs.json
View file @
7505164b
This diff is collapsed.
Click to expand it.
src/test/CompareOutputs.html
View file @
7505164b
...
@@ -87,26 +87,34 @@
...
@@ -87,26 +87,34 @@
const
data
=
await
response
.
json
();
const
data
=
await
response
.
json
();
const
tableBody
=
document
.
querySelector
(
"#outputTable tbody"
);
const
tableBody
=
document
.
querySelector
(
"#outputTable tbody"
);
// Collect unique model names
// Count responses per model
let
modelCounts
=
new
Map
();
Object
.
values
(
data
).
forEach
(
modelResponses
=>
{
Object
.
values
(
data
).
forEach
(
modelResponses
=>
{
Object
.
keys
(
modelResponses
).
forEach
(
model
=>
availableModels
.
add
(
model
));
Object
.
keys
(
modelResponses
).
forEach
(
model
=>
{
availableModels
.
add
(
model
);
modelCounts
.
set
(
model
,
(
modelCounts
.
get
(
model
)
||
0
)
+
1
);
});
});
});
// Generate model checkboxes
// Generate model checkboxes
with counts
const
filtersDiv
=
document
.
getElementById
(
"modelFilters"
);
const
filtersDiv
=
document
.
getElementById
(
"modelFilters"
);
availableModels
.
forEach
(
model
=>
{
availableModels
.
forEach
(
model
=>
{
const
sanitizedModel
=
sanitizeClassName
(
model
);
const
sanitizedModel
=
sanitizeClassName
(
model
);
const
count
=
modelCounts
.
get
(
model
)
||
0
;
// Default to 0 if no responses
// Create checkbox
const
checkbox
=
document
.
createElement
(
"input"
);
const
checkbox
=
document
.
createElement
(
"input"
);
checkbox
.
type
=
"checkbox"
;
checkbox
.
type
=
"checkbox"
;
checkbox
.
checked
=
true
;
checkbox
.
checked
=
true
;
checkbox
.
id
=
sanitizedModel
;
checkbox
.
id
=
sanitizedModel
;
checkbox
.
onchange
=
updateModelVisibility
;
checkbox
.
onchange
=
updateModelVisibility
;
// Create label with count
const
label
=
document
.
createElement
(
"label"
);
const
label
=
document
.
createElement
(
"label"
);
label
.
htmlFor
=
sanitizedModel
;
label
.
htmlFor
=
sanitizedModel
;
label
.
appendChild
(
checkbox
);
label
.
appendChild
(
checkbox
);
label
.
appendChild
(
document
.
createTextNode
(
" "
+
model
));
label
.
appendChild
(
document
.
createTextNode
(
`
${
model
}
(
${
count
}
)`
));
// Append count
filtersDiv
.
appendChild
(
label
);
filtersDiv
.
appendChild
(
label
);
});
});
...
@@ -128,13 +136,13 @@
...
@@ -128,13 +136,13 @@
const
nestedRow
=
document
.
createElement
(
"tr"
);
const
nestedRow
=
document
.
createElement
(
"tr"
);
nestedRow
.
classList
.
add
(
"nested"
);
nestedRow
.
classList
.
add
(
"nested"
);
nestedRow
.
innerHTML
=
`<td>
nestedRow
.
innerHTML
=
`<td>
<table model-count="
${
modelCount
}
">
<table model-count="
${
modelCount
}
">
<tr>
${
Object
.
keys
(
modelResponses
).
map
(
model
=>
<tr>
${
Object
.
keys
(
modelResponses
).
map
(
model
=>
`<th class="model-col
${
sanitizeClassName
(
model
)}
">
${
escapeHTML
(
model
)}
</th>`
).
join
(
""
)}
</tr>
`<th class="model-col
${
sanitizeClassName
(
model
)}
">
${
escapeHTML
(
model
)}
</th>`
).
join
(
""
)}
</tr>
<tr>
${
Object
.
keys
(
modelResponses
).
map
(
model
=>
<tr>
${
Object
.
keys
(
modelResponses
).
map
(
model
=>
`<td class="model-col
${
sanitizeClassName
(
model
)}
">
${
formatText
(
escapeHTML
(
modelResponses
[
model
]))}
</td>`
).
join
(
""
)}
</tr>
`<td class="model-col
${
sanitizeClassName
(
model
)}
">
${
formatText
(
escapeHTML
(
modelResponses
[
model
]))}
</td>`
).
join
(
""
)}
</tr>
</table>
</table>
</td>`
;
</td>`
;
tableBody
.
appendChild
(
nestedRow
);
tableBody
.
appendChild
(
nestedRow
);
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
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