mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
Merge branch 'feat/plugins' of github.com:langgenius/dify into feat/plugins
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user