mirror of
https://github.com/langgenius/dify.git
synced 2026-09-24 23:22:26 +08:00
chore: knip fix (#34481)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
autofix-ci[bot]
parent
985b41c40b
commit
36e840cd87
@@ -65,17 +65,6 @@ export type PromptVariable = {
|
||||
json_schema?: string | Record<string, any>
|
||||
}
|
||||
|
||||
export type CompletionParams = {
|
||||
max_tokens: number
|
||||
temperature: number
|
||||
top_p: number
|
||||
presence_penalty: number
|
||||
frequency_penalty: number
|
||||
stop?: string[]
|
||||
}
|
||||
|
||||
export type ModelId = 'gpt-3.5-turbo' | 'text-davinci-003'
|
||||
|
||||
export type PromptConfig = {
|
||||
prompt_template: string
|
||||
prompt_variables: PromptVariable[]
|
||||
@@ -159,11 +148,6 @@ export type ModelConfig = {
|
||||
dataSets: any[]
|
||||
agentConfig: AgentConfig
|
||||
}
|
||||
export type DatasetConfigItem = {
|
||||
enable: boolean
|
||||
value: number
|
||||
}
|
||||
|
||||
export type DatasetConfigs = {
|
||||
retrieval_model: RETRIEVE_TYPE
|
||||
reranking_model: {
|
||||
@@ -197,74 +181,6 @@ export type DatasetConfigs = {
|
||||
metadata_model_config?: NodeModelConfig
|
||||
}
|
||||
|
||||
export type DebugRequestBody = {
|
||||
inputs: Inputs
|
||||
query: string
|
||||
completion_params: CompletionParams
|
||||
model_config: ModelConfig
|
||||
}
|
||||
|
||||
export type DebugResponse = {
|
||||
id: string
|
||||
answer: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export type DebugResponseStream = {
|
||||
id: string
|
||||
data: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export type FeedBackRequestBody = {
|
||||
message_id: string
|
||||
rating: 'like' | 'dislike'
|
||||
content?: string
|
||||
from_source: 'api' | 'log'
|
||||
}
|
||||
|
||||
export type FeedBackResponse = {
|
||||
message_id: string
|
||||
rating: 'like' | 'dislike'
|
||||
}
|
||||
|
||||
// Log session list
|
||||
export type LogSessionListQuery = {
|
||||
keyword?: string
|
||||
start?: string // format datetime(YYYY-mm-dd HH:ii)
|
||||
end?: string // format datetime(YYYY-mm-dd HH:ii)
|
||||
page: number
|
||||
limit: number // default 20. 1-100
|
||||
}
|
||||
|
||||
export type LogSessionListResponse = {
|
||||
data: {
|
||||
id: string
|
||||
conversation_id: string
|
||||
query: string // user's query question
|
||||
message: string // prompt send to LLM
|
||||
answer: string
|
||||
created_at: string
|
||||
}[]
|
||||
total: number
|
||||
page: number
|
||||
}
|
||||
|
||||
// log session detail and debug
|
||||
export type LogSessionDetailResponse = {
|
||||
id: string
|
||||
conversation_id: string
|
||||
model_provider: string
|
||||
query: string
|
||||
inputs: Record<string, string | number | object>[]
|
||||
message: string
|
||||
message_tokens: number // number of tokens in message
|
||||
answer: string
|
||||
answer_tokens: number // number of tokens in answer
|
||||
provider_response_latency: number // used time in ms
|
||||
from_source: 'api' | 'log'
|
||||
}
|
||||
|
||||
export type SavedMessage = {
|
||||
id: string
|
||||
answer: string
|
||||
|
||||
Reference in New Issue
Block a user