Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins

This commit is contained in:
Yi
2024-11-01 14:56:11 +08:00
54 changed files with 402 additions and 635 deletions

View File

@ -13,9 +13,7 @@ export const updateAnnotationStatus = (appId: string, action: AnnotationEnableSt
if (embeddingModel) {
body = {
...body,
embedding_model_plugin_id: embeddingModel.plugin_id,
embedding_provider_name: embeddingModel.embedding_provider_name,
embedding_model_name: embeddingModel.embedding_model_name,
...embeddingModel,
}
}

View File

@ -3,13 +3,13 @@ import type { IOnCompleted, IOnData, IOnError, IOnFile, IOnMessageEnd, IOnMessag
import type { ChatPromptConfig, CompletionPromptConfig } from '@/models/debug'
import type { ModelModeType } from '@/types/app'
import type { ModelParameterRule } from '@/app/components/header/account-setting/model-provider-page/declarations'
export type AutomaticRes = {
export interface AutomaticRes {
prompt: string
variables: string[]
opening_statement: string
error?: string
}
export type CodeGenRes = {
export interface CodeGenRes {
code: string
language: string[]
error?: string
@ -82,8 +82,8 @@ export const generateRuleCode = (body: Record<string, any>) => {
})
}
export const fetchModelParams = (pluginID: string, providerName: string, modelId: string) => {
return get(`workspaces/current/model-providers/${pluginID}/${providerName}/models/parameter-rules`, {
export const fetchModelParams = (providerName: string, modelId: string) => {
return get(`workspaces/current/model-providers/${providerName}/models/parameter-rules`, {
params: {
model: modelId,
},