mirror of
https://github.com/voideditor/void
synced 2026-05-24 01:48:25 +00:00
add dummy models
This commit is contained in:
parent
9e583960ae
commit
d809839530
3 changed files with 18 additions and 12 deletions
|
|
@ -106,7 +106,7 @@ class VoidConfigStateService extends Disposable implements IVoidConfigStateServi
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log('NEW STATE I', newState)
|
||||
// console.log('NEW STATE I', JSON.stringify(newState, null, 2))
|
||||
|
||||
await this._storeVoidConfigState(newState)
|
||||
this._setState(newState)
|
||||
|
|
@ -120,7 +120,7 @@ class VoidConfigStateService extends Disposable implements IVoidConfigStateServi
|
|||
[featureName]: newVal
|
||||
}
|
||||
}
|
||||
console.log('NEW STATE II', newState)
|
||||
// console.log('NEW STATE II', JSON.stringify(newState, null, 2))
|
||||
|
||||
await this._storeVoidConfigState(newState)
|
||||
this._setState(newState)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,16 @@ export const voidProviderDefaults = {
|
|||
} as const
|
||||
|
||||
|
||||
export const dummyModelData = {
|
||||
anthropic: ['claude 3.5'],
|
||||
openAI: ['gpt 4o'],
|
||||
ollama: ['llama 3.2'],
|
||||
openRouter: ['qwen 2.5'],
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const voidInitModelOptions = {
|
||||
anthropic: () => ({
|
||||
// model: 'claude-3-5-sonnet-20240620',
|
||||
|
|
|
|||
|
|
@ -4,15 +4,12 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { useCallback, useEffect, useRef } from 'react'
|
||||
import { FeatureName, featureNames, ProviderName, providerNames } from '../../../../../../../platform/void/common/voidConfigTypes.js'
|
||||
import { dummyModelData, FeatureName, featureNames, ProviderName, providerNames } from '../../../../../../../platform/void/common/voidConfigTypes.js'
|
||||
import { useConfigState, useService } from '../util/services.js'
|
||||
import ErrorBoundary from './ErrorBoundary.js'
|
||||
import { VoidSelectBox } from './inputs.js'
|
||||
import { SelectBox } from '../../../../../../../base/browser/ui/selectBox/selectBox.js'
|
||||
|
||||
|
||||
|
||||
|
||||
export const ModelSelectionOfFeature = ({ featureName }: { featureName: FeatureName }) => {
|
||||
|
||||
const voidConfigService = useService('configStateService')
|
||||
|
|
@ -31,12 +28,11 @@ export const ModelSelectionOfFeature = ({ featureName }: { featureName: FeatureN
|
|||
|
||||
const isDummy = modelOptions.length === 0
|
||||
if (isDummy) {
|
||||
modelOptions.push(
|
||||
{ text: 'claude 3.5 (anthropic)', value: ['dummy', 'dummy'] as [string, string] },
|
||||
{ text: 'gpt 4o (openai)', value: ['dummy', 'dummy'] as [string, string] },
|
||||
{ text: 'llama 3.2 (ollama)', value: ['dummy', 'dummy'] as [string, string] },
|
||||
{ text: 'qwen 2.5 (openrouter)', value: ['dummy', 'dummy'] as [string, string] },
|
||||
)
|
||||
for (const [providerName, models] of Object.entries(dummyModelData)) {
|
||||
for (let model of models) {
|
||||
modelOptions.push({ text: `${model} (${providerName})`, value: ['dummy', 'dummy'] })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return <>
|
||||
|
|
|
|||
Loading…
Reference in a new issue