chore: bump llama.cpp to b5509 (#5120)

This commit is contained in:
Louis 2025-05-27 23:29:41 +07:00 committed by GitHub
parent 26154941ca
commit eb0e21e5d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 26 additions and 15 deletions

View File

@ -15,7 +15,7 @@ export default defineConfig([
`http://127.0.0.1:${process.env.CORTEX_API_PORT ?? '39291'}`
),
PLATFORM: JSON.stringify(process.platform),
CORTEX_ENGINE_VERSION: JSON.stringify('b5488'),
CORTEX_ENGINE_VERSION: JSON.stringify('b5509'),
DEFAULT_REMOTE_ENGINES: JSON.stringify(engines),
DEFAULT_REMOTE_MODELS: JSON.stringify(models),
DEFAULT_REQUEST_PAYLOAD_TRANSFORM: JSON.stringify(
@ -38,7 +38,7 @@ export default defineConfig([
file: 'dist/node/index.cjs.js',
},
define: {
CORTEX_ENGINE_VERSION: JSON.stringify('b5488'),
CORTEX_ENGINE_VERSION: JSON.stringify('b5509'),
},
},
])

View File

@ -2,7 +2,7 @@
set BIN_PATH=./bin
set SHARED_PATH=./../../electron/shared
set /p CORTEX_VERSION=<./bin/version.txt
set ENGINE_VERSION=b5488
set ENGINE_VERSION=b5509
@REM Download llama.cpp binaries
set DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win

View File

@ -2,7 +2,7 @@
# Read CORTEX_VERSION
CORTEX_VERSION=$(cat ./bin/version.txt)
ENGINE_VERSION=b5488
ENGINE_VERSION=b5509
CORTEX_RELEASE_URL="https://github.com/menloresearch/cortex.cpp/releases/download"
ENGINE_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION}/llama-${ENGINE_VERSION}-bin
CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION}

View File

@ -19,7 +19,7 @@ export default defineConfig([
CORTEX_SOCKET_URL: JSON.stringify(
`ws://127.0.0.1:${process.env.CORTEX_API_PORT ?? '39291'}`
),
CORTEX_ENGINE_VERSION: JSON.stringify('b5488'),
CORTEX_ENGINE_VERSION: JSON.stringify('b5509'),
},
},
{

View File

@ -1,7 +1,7 @@
@echo off
set CORTEX_VERSION=1.0.13-rc6
set ENGINE_VERSION=b5488
set ENGINE_VERSION=b5509
set ENGINE_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win
set ENGINE_DOWNLOAD_GGML_URL=https://github.com/ggml-org/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win
set CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION%

View File

@ -15,7 +15,7 @@ download() {
# Read CORTEX_VERSION
CORTEX_VERSION=1.0.13-rc6
ENGINE_VERSION=b5488
ENGINE_VERSION=b5509
CORTEX_RELEASE_URL="https://github.com/menloresearch/cortex.cpp/releases/download"
ENGINE_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION}/llama-${ENGINE_VERSION}-bin
CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/${ENGINE_VERSION}

View File

@ -71,9 +71,11 @@ const DropdownModelProvider = ({ model }: DropdownModelProviderProps) => {
title={displayModel}
className="font-medium cursor-pointer flex items-center gap-1.5 relative z-20 max-w-38"
>
{provider && (
<div className="shrink-0">
<ProvidersAvatar provider={provider as ProviderObject} />
<ProvidersAvatar provider={provider} />
</div>
)}
<span
className={cn(
'text-main-view-fg/80 truncate leading-normal',
@ -84,11 +86,8 @@ const DropdownModelProvider = ({ model }: DropdownModelProviderProps) => {
</span>
</button>
</DropdownMenuTrigger>
{currentModel?.settings && (
<ModelSetting
model={currentModel as Model}
provider={provider as ProviderObject}
/>
{currentModel?.settings && provider && (
<ModelSetting model={currentModel as Model} provider={provider} />
)}
</div>
<DropdownMenuContent

View File

@ -25,6 +25,7 @@ import { getTools } from '@/services/mcp'
import { MCPTool } from '@/types/completion'
import { listen } from '@tauri-apps/api/event'
import { SystemEvent } from '@/types/events'
import { stopModel } from '@/services/models'
export const useChat = () => {
const { prompt, setPrompt } = usePrompt()
@ -174,6 +175,17 @@ export const useChat = () => {
}
}
}
// TODO: Remove this check when integrating new llama.cpp extension
if (
accumulatedText.length === 0 &&
toolCalls.length === 0 &&
activeThread.model?.id &&
provider.provider === 'llama.cpp'
) {
await stopModel(activeThread.model.id, 'cortex')
throw new Error('No response received from the model')
}
// Create a final content object for adding to the thread
const finalContent = newAssistantThreadContent(
activeThread.id,