mirror of
https://github.com/langgenius/dify.git
synced 2026-01-08 23:34:11 +00:00
Some checks failed
autofix.ci / autofix (push) Has been cancelled
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Has been cancelled
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Has been cancelled
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Has been cancelled
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Has been cancelled
Main CI Pipeline / Check Changed Files (push) Has been cancelled
Main CI Pipeline / API Tests (push) Has been cancelled
Main CI Pipeline / Web Tests (push) Has been cancelled
Main CI Pipeline / Style Check (push) Has been cancelled
Main CI Pipeline / VDB Tests (push) Has been cancelled
Main CI Pipeline / DB Migration Test (push) Has been cancelled
39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
import type {
|
|
AgentLogDetailRequest,
|
|
AgentLogDetailResponse,
|
|
ChatMessagesRequest,
|
|
ChatMessagesResponse,
|
|
LogMessageAnnotationsRequest,
|
|
LogMessageAnnotationsResponse,
|
|
LogMessageFeedbacksRequest,
|
|
LogMessageFeedbacksResponse,
|
|
WorkflowRunDetailResponse,
|
|
} from '@/models/log'
|
|
import type { NodeTracingListResponse } from '@/types/workflow'
|
|
import { get, post } from './base'
|
|
|
|
// (Chat Application) Message list in one session
|
|
export const fetchChatMessages = ({ url, params }: { url: string, params: ChatMessagesRequest }): Promise<ChatMessagesResponse> => {
|
|
return get<ChatMessagesResponse>(url, { params })
|
|
}
|
|
|
|
export const updateLogMessageFeedbacks = ({ url, body }: { url: string, body: LogMessageFeedbacksRequest }): Promise<LogMessageFeedbacksResponse> => {
|
|
return post<LogMessageFeedbacksResponse>(url, { body })
|
|
}
|
|
|
|
export const updateLogMessageAnnotations = ({ url, body }: { url: string, body: LogMessageAnnotationsRequest }): Promise<LogMessageAnnotationsResponse> => {
|
|
return post<LogMessageAnnotationsResponse>(url, { body })
|
|
}
|
|
|
|
export const fetchRunDetail = (url: string): Promise<WorkflowRunDetailResponse> => {
|
|
return get<WorkflowRunDetailResponse>(url)
|
|
}
|
|
|
|
export const fetchTracingList = ({ url }: { url: string }): Promise<NodeTracingListResponse> => {
|
|
return get<NodeTracingListResponse>(url)
|
|
}
|
|
|
|
export const fetchAgentLogDetail = ({ appID, params }: { appID: string, params: AgentLogDetailRequest }): Promise<AgentLogDetailResponse> => {
|
|
return get<AgentLogDetailResponse>(`/apps/${appID}/agent/logs`, { params })
|
|
}
|