Skip to content

Commit

Permalink
test: correct test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Nov 26, 2024
1 parent ea1600d commit 1108e6c
Show file tree
Hide file tree
Showing 2 changed files with 200 additions and 47 deletions.
22 changes: 15 additions & 7 deletions extensions/inference-cortex-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
super.onLoad()

this.queue.add(() => this.clean())

// Run the process watchdog
const systemInfo = await systemInformation()
this.queue.add(() => executeOnMain(NODE, 'run', systemInfo))
Expand Down Expand Up @@ -180,12 +180,20 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
'engineVariant',
systemInfo.gpuSetting
)
return ky
.post(
`${CORTEX_API_URL}/v1/engines/${InferenceEngine.cortex_llamacpp}/default?version=${CORTEX_ENGINE_VERSION}&variant=${variant}`,
{ json: {} }
)
.then(() => {})
return (
ky
// Fallback support for legacy API
.post(
`${CORTEX_API_URL}/v1/engines/${InferenceEngine.cortex_llamacpp}/default?version=${CORTEX_ENGINE_VERSION}&variant=${variant}`,
{
json: {
version: CORTEX_ENGINE_VERSION,
variant,
},
}
)
.then(() => {})
)
}

/**
Expand Down
Loading

0 comments on commit 1108e6c

Please sign in to comment.