mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-12 12:26:54 +08:00
Model Runtime (#1858)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: Garfield Dai <dai.hai@foxmail.com> Co-authored-by: chenhe <guchenhe@gmail.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn>
This commit is contained in:
@@ -2,6 +2,7 @@ import type { IOnAnnotationReply, IOnCompleted, IOnData, IOnError, IOnMessageEnd
|
||||
import { get, post, ssePost } from './base'
|
||||
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 = {
|
||||
prompt: string
|
||||
@@ -65,9 +66,9 @@ export const generateRule = (body: Record<string, any>) => {
|
||||
export const fetchModelParams = (providerName: string, modelId: string) => {
|
||||
return get(`workspaces/current/model-providers/${providerName}/models/parameter-rules`, {
|
||||
params: {
|
||||
model_name: modelId,
|
||||
model: modelId,
|
||||
},
|
||||
})
|
||||
}) as Promise<{ data: ModelParameterRule[] }>
|
||||
}
|
||||
|
||||
export const fetchPromptTemplate = ({
|
||||
|
||||
Reference in New Issue
Block a user