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
2 changes: 1 addition & 1 deletion extensions/inference-cortex-extension/bin/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.9-rc1
1.0.9-rc2
4 changes: 2 additions & 2 deletions web/containers/ModelDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@

const handleChangeStateOpen = useCallback(
(state: boolean) => {
setOpen(state)
setModelDropdownState(state)

Check warning on line 127 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

126-127 lines are not covered with tests
},
[setModelDropdownState]
)
Expand All @@ -134,7 +134,7 @@
configuredModels
.concat(
downloadedModels.filter(
(e) => !configuredModels.some((x) => x.id === e.id)

Check warning on line 137 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

137 line is not covered with tests
)
)
.filter((e) =>
Expand All @@ -147,22 +147,22 @@
'local'
)
}
return true

Check warning on line 150 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

150 line is not covered with tests
})
.sort((a, b) => a.name.localeCompare(b.name))

Check warning on line 152 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

152 line is not covered with tests
.sort((a, b) => {
const aInDownloadedModels = downloadedModels.some(
(item) => item.id === a.id

Check warning on line 155 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

154-155 lines are not covered with tests
)
const bInDownloadedModels = downloadedModels.some(
(item) => item.id === b.id

Check warning on line 158 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

157-158 lines are not covered with tests
)
if (aInDownloadedModels && !bInDownloadedModels) {
return -1
} else if (!aInDownloadedModels && bInDownloadedModels) {
return 1

Check warning on line 163 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

160-163 lines are not covered with tests
} else {
return 0

Check warning on line 165 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

165 line is not covered with tests
}
}),
[configuredModels, searchText, searchFilter, downloadedModels, engineList]
Expand All @@ -184,8 +184,8 @@
setShowEngineListModel((prev) => [
...prev,
...engineList
.filter((x) => (x.engine?.api_key?.length ?? 0) > 0)
.map((e) => e.name),

Check warning on line 188 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

187-188 lines are not covered with tests
])
}, [setShowEngineListModel, engineList])

Expand All @@ -205,8 +205,8 @@

const isLocalEngine = useCallback(
(engine?: string) => {
if (!engine) return false
return engineList.some((t) => t.name === engine && t.type === 'local')

Check warning on line 209 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

208-209 lines are not covered with tests
},
[engineList]
)
Expand Down Expand Up @@ -248,10 +248,10 @@
ctx_len: model?.settings.ctx_len ? defaultContextLength : undefined,
max_tokens: defaultContextLength
? Math.min(
model?.parameters.token_limit ?? 8192,
model?.parameters.max_tokens ?? 8192,
defaultContextLength
)
: model?.parameters.token_limit,
: model?.parameters.max_tokens,
}

const modelParams = {
Expand Down
Loading