mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-04 10:14:00 +08:00
b2f5707676
# Conflicts: # .github/workflows/tool-test-sdks.yaml # api/.env.example # api/README.md # api/commands.py # api/controllers/console/explore/wraps.py # api/controllers/web/workflow.py # api/extensions/ext_commands.py # api/models/model.py # api/pyproject.toml # api/services/feature_service.py # web/README.md # web/app/components/explore/app-card/index.tsx # web/app/components/explore/app-list/index.tsx # web/app/components/explore/sidebar/index.tsx # web/app/signin/components/mail-and-password-auth.tsx # web/i18n/uk-UA/app-overview.json # web/i18n/uk-UA/app.json # web/i18n/uk-UA/billing.json # web/i18n/uk-UA/common.json # web/i18n/uk-UA/dataset-creation.json # web/i18n/uk-UA/dataset-documents.json # web/i18n/uk-UA/dataset-hit-testing.json # web/i18n/uk-UA/dataset-settings.json # web/i18n/uk-UA/dataset.json # web/i18n/uk-UA/explore.json # web/i18n/uk-UA/plugin.json # web/i18n/uk-UA/tools.json # web/next.config.js # web/package.json # web/pnpm-lock.yaml # web/service/common.ts # web/service/explore.ts # web/service/fetch.ts # web/service/use-explore.ts # web/types/feature.ts
170 lines
3.7 KiB
TypeScript
170 lines
3.7 KiB
TypeScript
import type {
|
|
AliyunConfig,
|
|
ArizeConfig,
|
|
DatabricksConfig,
|
|
LangFuseConfig,
|
|
LangSmithConfig,
|
|
MLflowConfig,
|
|
OpikConfig,
|
|
PhoenixConfig,
|
|
TencentConfig,
|
|
TracingProvider,
|
|
WeaveConfig,
|
|
} from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type'
|
|
import type { Dependency } from '@/app/components/plugins/types'
|
|
import type { App, AppModeEnum, AppTemplate, SiteConfig } from '@/types/app'
|
|
|
|
export enum DSLImportMode {
|
|
YAML_CONTENT = 'yaml-content',
|
|
YAML_URL = 'yaml-url',
|
|
}
|
|
|
|
export enum DSLImportStatus {
|
|
COMPLETED = 'completed',
|
|
COMPLETED_WITH_WARNINGS = 'completed-with-warnings',
|
|
PENDING = 'pending',
|
|
FAILED = 'failed',
|
|
}
|
|
|
|
export type AppListResponse = {
|
|
data: App[]
|
|
has_more: boolean
|
|
limit: number
|
|
page: number
|
|
total: number
|
|
recommended_apps: string[] // app recommended apps[]string
|
|
}
|
|
|
|
export type AppDetailResponse = App
|
|
|
|
export type DSLImportResponse = {
|
|
id: string
|
|
status: DSLImportStatus
|
|
app_mode: AppModeEnum
|
|
app_id?: string
|
|
current_dsl_version?: string
|
|
imported_dsl_version?: string
|
|
error: string
|
|
leaked_dependencies: Dependency[]
|
|
}
|
|
|
|
export type AppTemplatesResponse = {
|
|
data: AppTemplate[]
|
|
}
|
|
|
|
export type CreateAppResponse = App
|
|
|
|
export type UpdateAppSiteCodeResponse = { app_id: string } & SiteConfig
|
|
|
|
export type AppDailyMessagesResponse = {
|
|
data: Array<{ date: string, message_count: number }>
|
|
}
|
|
|
|
export type AppDailyConversationsResponse = {
|
|
data: Array<{ date: string, conversation_count: number }>
|
|
}
|
|
|
|
export type WorkflowDailyConversationsResponse = {
|
|
data: Array<{ date: string, runs: number }>
|
|
}
|
|
|
|
export type AppStatisticsResponse = {
|
|
data: Array<{ date: string }>
|
|
}
|
|
|
|
export type AppDailyEndUsersResponse = {
|
|
data: Array<{ date: string, terminal_count: number }>
|
|
}
|
|
|
|
export type AppTokenCostsResponse = {
|
|
data: Array<{ date: string, token_count: number, total_price: number, currency: number }>
|
|
}
|
|
|
|
export type UpdateAppModelConfigResponse = { result: string }
|
|
|
|
export type ApiKeyItemResponse = {
|
|
id: string
|
|
token: string
|
|
last_used_at: string
|
|
created_at: string
|
|
// 二开部分Begin - 密钥额度
|
|
description: string
|
|
accumulated_quota: number
|
|
day_limit_quota: number
|
|
month_limit_quota: number
|
|
month_used_quota: number
|
|
day_used_quota: number
|
|
// 二开部分End - 密钥额度
|
|
}
|
|
|
|
// 二开部分Begin - 密钥额度
|
|
export type ApikeyItemResponseWithQuotaLimitExtend = {
|
|
id: string
|
|
token: string
|
|
last_used_at: string
|
|
created_at: string
|
|
day_limit_quota: number
|
|
month_limit_quota: number
|
|
description: string
|
|
}
|
|
// 二开部分End - 密钥额度
|
|
|
|
export type ApiKeysListResponse = {
|
|
data: ApiKeyItemResponse[]
|
|
}
|
|
|
|
export type CreateApiKeyResponse = {
|
|
id: string
|
|
token: string
|
|
created_at: string
|
|
}
|
|
|
|
export type ValidateOpenAIKeyResponse = {
|
|
result: string
|
|
error?: string
|
|
}
|
|
|
|
export type UpdateOpenAIKeyResponse = ValidateOpenAIKeyResponse
|
|
|
|
export type GenerationIntroductionResponse = {
|
|
introduction: string
|
|
}
|
|
|
|
export type AppVoicesListResponse = [{
|
|
name: string
|
|
value: string
|
|
}]
|
|
|
|
export type TracingStatus = {
|
|
enabled: boolean
|
|
tracing_provider: TracingProvider | null
|
|
}
|
|
|
|
export type TracingConfig = {
|
|
tracing_provider: TracingProvider
|
|
tracing_config: ArizeConfig | PhoenixConfig | LangSmithConfig | LangFuseConfig | DatabricksConfig | MLflowConfig | OpikConfig | WeaveConfig | AliyunConfig | TencentConfig
|
|
}
|
|
|
|
export type WebhookTriggerResponse = {
|
|
id: string
|
|
webhook_id: string
|
|
webhook_url: string
|
|
webhook_debug_url: string
|
|
node_id: string
|
|
created_at: string
|
|
}
|
|
|
|
export type Banner = {
|
|
id: string
|
|
content: {
|
|
'category': string
|
|
'title': string
|
|
'description': string
|
|
'img-src': string
|
|
}
|
|
link: string
|
|
sort: number
|
|
status: string
|
|
created_at: string
|
|
}
|