Signed-off-by: yyh <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: CodingOnStar <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Coding On Star <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: -LAN- <[email protected]> Co-authored-by: statxc <[email protected]>
34 lines
875 B
TypeScript
34 lines
875 B
TypeScript
import type { ModelItem, PreferredProviderTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
|
import type { CommonResponse } from '@/models/common'
|
|
import { type } from '@orpc/contract'
|
|
import { base } from '../base'
|
|
|
|
export const modelProvidersModelsContract = base
|
|
.route({
|
|
path: '/workspaces/current/model-providers/{provider}/models',
|
|
method: 'GET',
|
|
})
|
|
.input(type<{
|
|
params: {
|
|
provider: string
|
|
}
|
|
}>())
|
|
.output(type<{
|
|
data: ModelItem[]
|
|
}>())
|
|
|
|
export const changePreferredProviderTypeContract = base
|
|
.route({
|
|
path: '/workspaces/current/model-providers/{provider}/preferred-provider-type',
|
|
method: 'POST',
|
|
})
|
|
.input(type<{
|
|
params: {
|
|
provider: string
|
|
}
|
|
body: {
|
|
preferred_provider_type: PreferredProviderTypeEnum
|
|
}
|
|
}>())
|
|
.output(type<CommonResponse>())
|