diff --git a/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts b/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts index d23afca303d..a61301eb413 100644 --- a/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts +++ b/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts @@ -151,7 +151,7 @@ When('I open the Agent v2 API Reference', async function (this: DifyWorld) { const apiReferenceLink = page.getByRole('link', { name: 'API Reference' }) await expect(apiReferenceLink).toBeVisible() - await expect(apiReferenceLink).toHaveAttribute('href', /\/use-dify\/publish\/developing-with-apis/) + await expect(apiReferenceLink).toHaveAttribute('href', /\/api-reference\/guides\/get-started/) await expect(apiReferenceLink).toHaveAttribute('target', '_blank') const [apiReferencePage] = await Promise.all([ @@ -167,7 +167,7 @@ Then('the Agent v2 API Reference should open in a new tab', async function (this if (!apiReferencePage) throw new Error('No Agent v2 API Reference page was opened.') - await expect(apiReferencePage).toHaveURL(/developing-with-apis/) + await expect(apiReferencePage).toHaveURL(/\/api-reference\/guides\/get-started/) await apiReferencePage.close() this.agentBuilder.accessPoint.apiReferencePage = undefined }) diff --git a/web/app/components/app/overview/customize/__tests__/index.spec.tsx b/web/app/components/app/overview/customize/__tests__/index.spec.tsx index 5fa2d10a3e3..94eb30a1c50 100644 --- a/web/app/components/app/overview/customize/__tests__/index.spec.tsx +++ b/web/app/components/app/overview/customize/__tests__/index.spec.tsx @@ -298,7 +298,7 @@ describe('CustomizeModal', () => { }) const way2Link = getAnchorButton(/way2\.operation/i) - expect(way2Link).toHaveAttribute('href', expect.stringContaining('/use-dify/publish/developing-with-apis')) + expect(way2Link).toHaveAttribute('href', expect.stringContaining('/api-reference/guides/get-started')) expect(way2Link).toHaveAttribute('target', '_blank') expect(way2Link).toHaveAttribute('rel', 'noopener noreferrer') }) diff --git a/web/app/components/app/overview/customize/index.tsx b/web/app/components/app/overview/customize/index.tsx index 98b67db112c..0bb679ec4ac 100644 --- a/web/app/components/app/overview/customize/index.tsx +++ b/web/app/components/app/overview/customize/index.tsx @@ -45,7 +45,7 @@ const CustomizeModal: FC = ({ const docLink = useDocLink() const isChatApp = mode === AppModeEnum.CHAT || mode === AppModeEnum.ADVANCED_CHAT const repository = sourceCodeRepository ?? (isChatApp ? 'webapp-conversation' : 'webapp-text-generator') - const apiDocLink = docLink('/use-dify/publish/developing-with-apis') + const apiDocLink = docLink('/api-reference/guides/get-started') return ( !open && onClose()}> diff --git a/web/app/components/integrations/__tests__/page.spec.tsx b/web/app/components/integrations/__tests__/page.spec.tsx index b8ceb670520..fb10eeb73be 100644 --- a/web/app/components/integrations/__tests__/page.spec.tsx +++ b/web/app/components/integrations/__tests__/page.spec.tsx @@ -613,7 +613,7 @@ describe('IntegrationsPage', () => { expect(screen.getAllByText('MCP')).toHaveLength(2) expect(screen.getByText('common.mcpPage.description')).toBeInTheDocument() - expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/build/mcp') + expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/tools#mcp') expect(screen.queryByText('common.toolsPage.description')).not.toBeInTheDocument() }) @@ -622,7 +622,7 @@ describe('IntegrationsPage', () => { expect(screen.getAllByText('common.settings.swaggerAPIAsTool')).toHaveLength(2) expect(screen.getByText('common.swaggerAPIAsToolPage.description')).toBeInTheDocument() - expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/tools#custom-tool') + expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/tools#swagger-api') expect(screen.queryByText('common.toolsPage.description')).not.toBeInTheDocument() }) @@ -665,7 +665,7 @@ describe('IntegrationsPage', () => { expect(screen.getAllByText('workflow.common.workflowAsTool')).toHaveLength(2) expect(screen.getByText('common.workflowAsToolPage.description')).toBeInTheDocument() - expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/tools#workflow-tool') + expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/tools#workflow') expect(screen.queryByText('common.toolsPage.description')).not.toBeInTheDocument() }) diff --git a/web/app/components/integrations/page.tsx b/web/app/components/integrations/page.tsx index d1fdd9335c9..2fed7e3be63 100644 --- a/web/app/components/integrations/page.tsx +++ b/web/app/components/integrations/page.tsx @@ -36,18 +36,18 @@ type IntegrationsPageProps = { section?: IntegrationSection } -const headerDescriptionDocPaths: Partial> = { +const headerDescriptionDocPaths = { 'provider': '/use-dify/workspace/model-providers', 'data-source': '/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin#data-source-plugin-types', 'builtin': '/use-dify/workspace/tools', - 'custom-tool': '/use-dify/workspace/tools#custom-tool', - 'workflow-tool': '/use-dify/workspace/tools#workflow-tool', - 'mcp': '/use-dify/build/mcp', + 'custom-tool': '/use-dify/workspace/tools#swagger-api', + 'workflow-tool': '/use-dify/workspace/tools#workflow', + 'mcp': '/use-dify/workspace/tools#mcp', 'custom-endpoint': '/develop-plugin/dev-guides-and-walkthroughs/endpoint', 'trigger': '/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin', 'extension': '/use-dify/workspace/api-extension/api-extension', 'agent-strategy': '/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin', -} +} satisfies Partial> type DescriptionWithLearnMoreProps = { children: ReactNode @@ -150,7 +150,7 @@ export default function IntegrationsPage({ const headerDescriptionWithLink = headerDescription && headerDescriptionDocPath ? ( {headerDescription} diff --git a/web/app/components/tools/mcp/create-card.tsx b/web/app/components/tools/mcp/create-card.tsx index 58faa5368f5..f641dd8dea6 100644 --- a/web/app/components/tools/mcp/create-card.tsx +++ b/web/app/components/tools/mcp/create-card.tsx @@ -80,7 +80,7 @@ const NewMCPCard = ({ handleCreate }: Props) => { showModal, } = useMCPCreateAction({ handleCreate }) - const linkUrl = useMemo(() => docLink('/use-dify/build/mcp'), [docLink]) + const linkUrl = useMemo(() => docLink('/use-dify/workspace/tools#mcp'), [docLink]) return ( <> diff --git a/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsx b/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsx index d462d8d296f..dccfdbcc263 100644 --- a/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsx +++ b/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsx @@ -154,7 +154,7 @@ describe('CustomCreateCard', () => { render() const docLink = screen.getByText('tools.swaggerAPIAsToolTip').closest('a') - expect(docLink).toHaveAttribute('href', 'https://docs.dify.ai/en/cloud/use-dify/workspace/tools#custom-tool') + expect(docLink).toHaveAttribute('href', 'https://docs.dify.ai/en/cloud/use-dify/workspace/tools#swagger-api') expect(docLink).toHaveAttribute('target', '_blank') expect(docLink).toHaveAttribute('rel', 'noopener noreferrer') }) diff --git a/web/app/components/tools/provider/__tests__/empty.spec.tsx b/web/app/components/tools/provider/__tests__/empty.spec.tsx index 55dbf965a71..16510e848c7 100644 --- a/web/app/components/tools/provider/__tests__/empty.spec.tsx +++ b/web/app/components/tools/provider/__tests__/empty.spec.tsx @@ -84,7 +84,7 @@ describe('Empty', () => { expect(screen.getByRole('link', { name: /tools\.workflowToolEmpty\.goToStudio/i })).toHaveAttribute('href', '/apps') expect(screen.getByRole('link', { name: /tools\.workflowToolEmpty\.learnMore/i })).toHaveAttribute('target', '_blank') - expect(screen.getByRole('link', { name: /tools\.workflowToolEmpty\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/tools#workflow-tool') + expect(screen.getByRole('link', { name: /tools\.workflowToolEmpty\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/tools#workflow') }) }) diff --git a/web/app/components/tools/provider/custom-create-card.tsx b/web/app/components/tools/provider/custom-create-card.tsx index b4ce4968492..0107b7ef110 100644 --- a/web/app/components/tools/provider/custom-create-card.tsx +++ b/web/app/components/tools/provider/custom-create-card.tsx @@ -1,6 +1,5 @@ 'use client' import type { CustomCollectionBackend } from '../types' -import type { DocPathWithoutLang } from '@/types/doc-paths' import { Button } from '@langgenius/dify-ui/button' import { toast } from '@langgenius/dify-ui/toast' import { useState } from 'react' @@ -91,7 +90,7 @@ const Contribute = ({ onRefreshData }: Props) => { className="min-w-0" title={t('createSwaggerAPIAsTool', { ns: 'tools' })} linkText={t('swaggerAPIAsToolTip', { ns: 'tools' })} - linkUrl={`${docLink('/use-dify/workspace/tools' as DocPathWithoutLang)}#custom-tool`} + linkUrl={docLink('/use-dify/workspace/tools#swagger-api')} onCreate={() => setIsShowEditCustomCollectionModal(true)} /> )} diff --git a/web/app/components/tools/provider/empty.tsx b/web/app/components/tools/provider/empty.tsx index b15e8787fbe..4f0181a8066 100644 --- a/web/app/components/tools/provider/empty.tsx +++ b/web/app/components/tools/provider/empty.tsx @@ -1,5 +1,4 @@ 'use client' -import type { DocPathWithoutLang } from '@/types/doc-paths' import { cn } from '@langgenius/dify-ui/cn' import { RiArrowRightLine, RiArrowRightUpLine } from '@remixicon/react' import { useTranslation } from 'react-i18next' @@ -95,7 +94,7 @@ const Empty = ({ { it('should keep explicit product docs path without adding another product prefix', () => { const { result } = renderHook(() => useDocLink()) - const url = result.current('/cloud/use-dify/build/mcp' as DocPathWithoutLang) - expect(url).toBe(`${defaultDocBaseUrl}/en/cloud/use-dify/build/mcp`) + const url = result.current('/cloud/use-dify/getting-started/introduction' as DocPathWithoutLang) + expect(url).toBe(`${defaultDocBaseUrl}/en/cloud/use-dify/getting-started/introduction`) }) }) @@ -122,11 +122,11 @@ describe('useDocLink', () => { const pathMap: DocPathMap = { 'zh-Hans': '/use-dify/getting-started/introduction', - 'en-US': '/use-dify/build/mcp', + 'en-US': '/use-dify/workspace/tools#mcp', } const { result } = renderHook(() => useDocLink()) - const url = result.current('/use-dify/build/mcp', pathMap) + const url = result.current('/use-dify/workspace/tools#mcp', pathMap) expect(url).toBe(`${defaultDocBaseUrl}/zh/cloud/use-dify/getting-started/introduction`) }) @@ -138,12 +138,12 @@ describe('useDocLink', () => { const pathMap: DocPathMap = { 'zh-Hans': '/use-dify/getting-started/introduction', - 'en-US': '/use-dify/build/mcp', + 'en-US': '/use-dify/workspace/tools#mcp', } const { result } = renderHook(() => useDocLink()) - const url = result.current('/use-dify/build/mcp', pathMap) - expect(url).toBe(`${defaultDocBaseUrl}/ja/cloud/use-dify/build/mcp`) + const url = result.current('/use-dify/workspace/tools#mcp', pathMap) + expect(url).toBe(`${defaultDocBaseUrl}/ja/cloud/use-dify/workspace/tools#mcp`) }) it('should handle undefined pathMap', () => { @@ -158,16 +158,16 @@ describe('useDocLink', () => { mockConfig.IS_CLOUD_EDITION = true const { result } = renderHook(() => useDocLink()) - const url = result.current('/use-dify/build/mcp') - expect(url).toBe(`${defaultDocBaseUrl}/en/cloud/use-dify/build/mcp`) + const url = result.current('/use-dify/workspace/tools#mcp') + expect(url).toBe(`${defaultDocBaseUrl}/en/cloud/use-dify/workspace/tools#mcp`) }) it('should add self-host product prefix for product docs available in both editions outside cloud edition', () => { mockConfig.IS_CLOUD_EDITION = false const { result } = renderHook(() => useDocLink()) - const url = result.current('/use-dify/build/mcp') - expect(url).toBe(`${defaultDocBaseUrl}/en/self-host/use-dify/build/mcp`) + const url = result.current('/use-dify/workspace/tools#mcp') + expect(url).toBe(`${defaultDocBaseUrl}/en/self-host/use-dify/workspace/tools#mcp`) }) it('should use the existing cloud docs path for cloud-only product docs outside cloud edition', () => { @@ -254,8 +254,8 @@ describe('useDocLink', () => { }) }) - describe('API reference path translations', () => { - it('should translate API reference path for Chinese locale', () => { + describe('API reference path handling', () => { + it('should add language prefix for Chinese API reference paths', () => { vi.mocked(useTranslation).mockReturnValue({ i18n: { language: 'zh-Hans' }, } as ReturnType) @@ -263,10 +263,10 @@ describe('useDocLink', () => { const { result } = renderHook(() => useDocLink()) const url = result.current('/api-reference/annotations/create-annotation') - expect(url).toBe(`${defaultDocBaseUrl}/api-reference/标注管理/创建标注`) + expect(url).toBe(`${defaultDocBaseUrl}/zh/api-reference/annotations/create-annotation`) }) - it('should translate API reference path for Japanese locale when translation exists', () => { + it('should add language prefix for Japanese API reference paths', () => { vi.mocked(useTranslation).mockReturnValue({ i18n: { language: 'ja-JP' }, } as ReturnType) @@ -274,7 +274,7 @@ describe('useDocLink', () => { const { result } = renderHook(() => useDocLink()) const url = result.current('/api-reference/applications/get-app-info') - expect(url).toBe(`${defaultDocBaseUrl}/api-reference/アプリケーション設定/アプリケーションの基本情報を取得`) + expect(url).toBe(`${defaultDocBaseUrl}/ja/api-reference/applications/get-app-info`) }) it('should not translate API reference path for English locale', () => { @@ -285,22 +285,10 @@ describe('useDocLink', () => { const { result } = renderHook(() => useDocLink()) const url = result.current('/api-reference/annotations/create-annotation') - expect(url).toBe(`${defaultDocBaseUrl}/api-reference/annotations/create-annotation`) + expect(url).toBe(`${defaultDocBaseUrl}/en/api-reference/annotations/create-annotation`) }) - it('should keep original path when no translation exists for non-English locale', () => { - vi.mocked(useTranslation).mockReturnValue({ - i18n: { language: 'zh-Hans' }, - } as ReturnType) - vi.mocked(getDocLanguage).mockReturnValue('zh') - - const { result } = renderHook(() => useDocLink()) - // This path has no Japanese translation - const url = result.current('/api-reference/annotations/create-annotation') - expect(url).toBe(`${defaultDocBaseUrl}/api-reference/标注管理/创建标注`) - }) - - it('should remove language prefix when translation is applied', () => { + it('should keep the API reference slug unchanged for non-English locale', () => { vi.mocked(useTranslation).mockReturnValue({ i18n: { language: 'zh-Hans' }, } as ReturnType) @@ -308,9 +296,29 @@ describe('useDocLink', () => { const { result } = renderHook(() => useDocLink()) const url = result.current('/api-reference/annotations/create-annotation') - // Should NOT have /zh/ prefix when translated - expect(url).not.toContain('/zh/') - expect(url).toBe(`${defaultDocBaseUrl}/api-reference/标注管理/创建标注`) + expect(url).toBe(`${defaultDocBaseUrl}/zh/api-reference/annotations/create-annotation`) + }) + + it('should keep language prefix for API reference paths', () => { + vi.mocked(useTranslation).mockReturnValue({ + i18n: { language: 'zh-Hans' }, + } as ReturnType) + vi.mocked(getDocLanguage).mockReturnValue('zh') + + const { result } = renderHook(() => useDocLink()) + const url = result.current('/api-reference/annotations/create-annotation') + expect(url).toBe(`${defaultDocBaseUrl}/zh/api-reference/annotations/create-annotation`) + }) + + it('should use the current knowledge API guide path directly', () => { + vi.mocked(useTranslation).mockReturnValue({ + i18n: { language: 'zh-Hans' }, + } as ReturnType) + vi.mocked(getDocLanguage).mockReturnValue('zh') + + const { result } = renderHook(() => useDocLink()) + const url = result.current('/api-reference/guides/knowledge') + expect(url).toBe(`${defaultDocBaseUrl}/zh/api-reference/guides/knowledge`) }) it('should not translate non-API-reference paths', () => { @@ -335,9 +343,9 @@ describe('useDocLink', () => { it('should handle multiple calls with same hook instance', () => { const { result } = renderHook(() => useDocLink()) const url1 = result.current('/use-dify/getting-started/introduction') - const url2 = result.current('/use-dify/build/mcp') + const url2 = result.current('/use-dify/workspace/tools#mcp') expect(url1).toBe(`${defaultDocBaseUrl}/en/cloud/use-dify/getting-started/introduction`) - expect(url2).toBe(`${defaultDocBaseUrl}/en/cloud/use-dify/build/mcp`) + expect(url2).toBe(`${defaultDocBaseUrl}/en/cloud/use-dify/workspace/tools#mcp`) }) }) }) diff --git a/web/context/i18n.ts b/web/context/i18n.ts index a8f7dfa5959..4a16ed5745b 100644 --- a/web/context/i18n.ts +++ b/web/context/i18n.ts @@ -4,7 +4,7 @@ import { useCallback } from 'react' import { useTranslation } from '#i18n' import { IS_CLOUD_EDITION } from '@/config' import { getDocLanguage, getLanguage, getPricingPageLanguage } from '@/i18n-config/language' -import { apiReferencePathTranslations, docPathProductAvailability } from '@/types/doc-paths' +import { docPathProductAvailability } from '@/types/doc-paths' export const useLocale = () => { const { i18n } = useTranslation() @@ -72,18 +72,9 @@ export const useDocLink = (baseUrl?: string): ((path?: DocPathWithoutLang, pathM const docLanguage = getDocLanguage(locale) const pathUrl = path || '' let targetPath = (pathMap) ? pathMap[locale] || pathUrl : pathUrl - let languagePrefix = `/${docLanguage}` + const languagePrefix = `/${docLanguage}` - if (targetPath.startsWith('/api-reference/')) { - languagePrefix = '' - if (docLanguage !== 'en') { - const translatedPath = apiReferencePathTranslations[targetPath]?.[docLanguage] - if (translatedPath) { - targetPath = translatedPath - } - } - } - else if (!targetPath) { + if (!targetPath) { targetPath = getDocHomePath() } else { diff --git a/web/features/agent-v2/agent-detail/access/components/service-api-access-card.tsx b/web/features/agent-v2/agent-detail/access/components/service-api-access-card.tsx index 28d3b72cd13..ea545dfdabc 100644 --- a/web/features/agent-v2/agent-detail/access/components/service-api-access-card.tsx +++ b/web/features/agent-v2/agent-detail/access/components/service-api-access-card.tsx @@ -89,7 +89,7 @@ export function ServiceApiAccessCard({ { const docLink = useDocLink() - return docLink('/api-reference/knowledge-bases/list-knowledge-bases') + return docLink('/api-reference/guides/knowledge') } diff --git a/web/scripts/gen-doc-paths.ts b/web/scripts/gen-doc-paths.ts index 5eb3c29db17..907fabe6a9b 100644 --- a/web/scripts/gen-doc-paths.ts +++ b/web/scripts/gen-doc-paths.ts @@ -26,6 +26,7 @@ type NavObject = { tabs?: NavItem[] menu?: NavItem[] versions?: NavItem[] + root?: string openapi?: string [key: string]: unknown } @@ -51,14 +52,8 @@ type OpenAPISpec = { [key: string]: unknown } -type Redirect = { - source: string - destination: string -} - type DocsJson = { navigation?: NavItem - redirects?: Redirect[] [key: string]: unknown } @@ -204,6 +199,9 @@ function extractPaths(item: NavItem | undefined, paths: Set = new Set()) } if (typeof item === 'object') { + if (item.root) + paths.add(item.root) + // Handle pages array if (item.pages) extractPaths(item.pages, paths) @@ -318,7 +316,6 @@ function generateTypeDefinitions( groups: Record>, productAvailability: ProductAvailability, apiReferencePaths: string[], - apiPathTranslations: Record, ): string { const lines: string[] = [ '// GENERATE BY script', @@ -363,13 +360,13 @@ function generateTypeDefinitions( // Generate API reference type (English paths only) if (apiReferencePaths.length > 0) { const sortedPaths = [...apiReferencePaths].sort() - lines.push('// API Reference paths (English, use apiReferencePathTranslations for other languages)') - lines.push('type ApiReferencePath =') + lines.push('// API Reference endpoint paths') + lines.push('type ApiEndpointReferencePath =') for (const p of sortedPaths) { lines.push(` | '${p}'`) } lines.push('') - typeNames.push('ApiReferencePath') + typeNames.push('ApiEndpointReferencePath') } // Generate base combined type @@ -398,23 +395,6 @@ function generateTypeDefinitions( lines.push('}') lines.push('') - // Generate API reference path translations map - lines.push('// API Reference path translations (English -> other languages)') - lines.push('export const apiReferencePathTranslations: Record = {') - const sortedEnPaths = Object.keys(apiPathTranslations).sort() - for (const enPath of sortedEnPaths) { - const translations = apiPathTranslations[enPath] - const parts: string[] = [] - if (translations!.zh) - parts.push(`zh: '${translations!.zh}'`) - if (translations!.ja) - parts.push(`ja: '${translations!.ja}'`) - if (parts.length > 0) - lines.push(` '${enPath}': { ${parts.join(', ')} },`) - } - lines.push('}') - lines.push('') - return lines.join('\n') } @@ -438,52 +418,19 @@ async function main(): Promise { console.log(`Found ${openApiPaths.size} OpenAPI specs to process`) - // Fetch OpenAPI specs and extract API reference paths with endpoint keys - // Group by OpenAPI file name (without language prefix) to match endpoints across languages - const endpointMapsByLang: Record> = { - en: new Map(), - zh: new Map(), - ja: new Map(), - } + // Fetch English OpenAPI specs and extract API reference paths. + // API reference URLs are language-prefixed by useDocLink at runtime. + const enApiPaths: string[] = [] for (const openapiPath of openApiPaths) { - // Determine language from path const langMatch = /^(en|zh|ja)\//.exec(openapiPath) - if (!langMatch) + if (langMatch?.[1] !== 'en') continue - const lang = langMatch[1] - // Get file name without language prefix (e.g., "api-reference/openapi_knowledge.json") - const fileKey = openapiPath.replace(/^(en|zh|ja)\//, '') - console.log(`Fetching OpenAPI spec: ${openapiPath}`) const pathMap = await fetchOpenAPIAndExtractPaths(openapiPath) - endpointMapsByLang[lang!]!.set(fileKey, pathMap) - } - - // Build English paths and mapping to other languages - const enApiPaths: string[] = [] - const apiPathTranslations: Record = {} - - // Iterate through English endpoint maps - for (const [fileKey, enPathMap] of endpointMapsByLang.en!) { - const zhPathMap = endpointMapsByLang.zh!.get(fileKey) - const jaPathMap = endpointMapsByLang.ja!.get(fileKey) - - for (const [endpointKey, enPath] of enPathMap) { + for (const enPath of pathMap.values()) enApiPaths.push(enPath) - - const zhPath = zhPathMap?.get(endpointKey) - const jaPath = jaPathMap?.get(endpointKey) - - if (zhPath || jaPath) { - apiPathTranslations[enPath] = {} - if (zhPath) - apiPathTranslations[enPath].zh = zhPath - if (jaPath) - apiPathTranslations[enPath].ja = jaPath - } - } } // Deduplicate English API paths @@ -491,8 +438,6 @@ async function main(): Promise { console.log(`Extracted ${uniqueEnApiPaths.length} unique English API reference paths`) - console.log(`Generated ${Object.keys(apiPathTranslations).length} API path translations`) - // Group by section const { groups, productAvailability } = groupPathsBySection(allPaths) @@ -500,7 +445,11 @@ async function main(): Promise { console.log(`Found ${Object.keys(productAvailability).length} product-aware paths`) // Generate TypeScript - const tsContent = generateTypeDefinitions(groups, productAvailability, uniqueEnApiPaths, apiPathTranslations) + const tsContent = generateTypeDefinitions( + groups, + productAvailability, + uniqueEnApiPaths, + ) // Write to file await writeFile(OUTPUT_PATH, tsContent, 'utf-8') diff --git a/web/types/doc-paths.ts b/web/types/doc-paths.ts index 42e8f048d4b..002faadca48 100644 --- a/web/types/doc-paths.ts +++ b/web/types/doc-paths.ts @@ -1,8 +1,8 @@ // GENERATE BY script // DON NOT EDIT IT MANUALLY // -// Generated from: https://raw.githubusercontent.com/langgenius/dify-docs/feat/audience-products/docs.json -// Generated at: 2026-06-17T04:42:51.293Z +// Generated from: https://raw.githubusercontent.com/langgenius/dify-docs/refs/heads/main/docs.json +// Generated at: 2026-07-09T10:55:53.618Z // Language prefixes export type DocLanguage = 'en' | 'zh' | 'ja' @@ -13,14 +13,12 @@ type CloudPath = | '/cloud/use-dify/build/additional-features' | '/cloud/use-dify/build/agent' | '/cloud/use-dify/build/chatbot' - | '/cloud/use-dify/build/mcp' | '/cloud/use-dify/build/orchestrate-node' | '/cloud/use-dify/build/predefined-error-handling-logic' | '/cloud/use-dify/build/shortcut-key' | '/cloud/use-dify/build/text-generator' | '/cloud/use-dify/build/version-control' | '/cloud/use-dify/build/workflow-chatflow' - | '/cloud/use-dify/build/workflow-collaboration' | '/cloud/use-dify/debug/error-type' | '/cloud/use-dify/debug/history-and-logs' | '/cloud/use-dify/debug/step-run' @@ -44,7 +42,6 @@ type CloudPath = | '/cloud/use-dify/knowledge/knowledge-pipeline/upload-files' | '/cloud/use-dify/knowledge/knowledge-request-rate-limit' | '/cloud/use-dify/knowledge/manage-knowledge/introduction' - | '/cloud/use-dify/knowledge/manage-knowledge/maintain-dataset-via-api' | '/cloud/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents' | '/cloud/use-dify/knowledge/metadata' | '/cloud/use-dify/knowledge/readme' @@ -85,7 +82,6 @@ type CloudPath = | '/cloud/use-dify/nodes/variable-aggregator' | '/cloud/use-dify/nodes/variable-assigner' | '/cloud/use-dify/publish/README' - | '/cloud/use-dify/publish/developing-with-apis' | '/cloud/use-dify/publish/publish-mcp' | '/cloud/use-dify/publish/publish-to-marketplace' | '/cloud/use-dify/publish/webapp/chatflow-webapp' @@ -110,8 +106,8 @@ type UseDifyPath = | '/use-dify/build/additional-features' | '/use-dify/build/agent' | '/use-dify/build/chatbot' - | '/use-dify/build/mcp' | '/use-dify/build/new-agent/build' + | '/use-dify/build/new-agent/overview' | '/use-dify/build/orchestrate-node' | '/use-dify/build/predefined-error-handling-logic' | '/use-dify/build/shortcut-key' @@ -142,7 +138,6 @@ type UseDifyPath = | '/use-dify/knowledge/knowledge-pipeline/upload-files' | '/use-dify/knowledge/knowledge-request-rate-limit' | '/use-dify/knowledge/manage-knowledge/introduction' - | '/use-dify/knowledge/manage-knowledge/maintain-dataset-via-api' | '/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents' | '/use-dify/knowledge/metadata' | '/use-dify/knowledge/readme' @@ -183,7 +178,6 @@ type UseDifyPath = | '/use-dify/nodes/variable-aggregator' | '/use-dify/nodes/variable-assigner' | '/use-dify/publish/README' - | '/use-dify/publish/developing-with-apis' | '/use-dify/publish/publish-mcp' | '/use-dify/publish/publish-to-marketplace' | '/use-dify/publish/webapp/chatflow-webapp' @@ -234,9 +228,42 @@ type LearnPath = type QuickStartPath = | '/quick-start' +// ApiReference paths +type ApiReferencePath = + | '/api-reference/guides/agent' + | '/api-reference/guides/chat' + | '/api-reference/guides/chatflow' + | '/api-reference/guides/completion' + | '/api-reference/guides/end-user-identity' + | '/api-reference/guides/errors' + | '/api-reference/guides/get-started' + | '/api-reference/guides/human-input-flow' + | '/api-reference/guides/knowledge' + | '/api-reference/guides/streaming' + | '/api-reference/guides/workflow' + // Cli paths type CliPath = - | '/cli/coming-soon' + | '/cli/authenticate' + | '/cli/common-tasks' + | '/cli/install' + | '/cli/integrate-agents/auth-for-agent-deployments' + | '/cli/integrate-agents/error-handling-and-retries-for-agents' + | '/cli/integrate-agents/install-the-difyctl-skill' + | '/cli/integrate-agents/overview' + | '/cli/overview' + | '/cli/quick-start' + | '/cli/reference/apps' + | '/cli/reference/auth-and-contexts' + | '/cli/reference/command-index' + | '/cli/reference/environment-variables' + | '/cli/reference/global-flags' + | '/cli/reference/help' + | '/cli/reference/output-formats-and-exit-codes' + | '/cli/reference/skills' + | '/cli/reference/version' + | '/cli/reference/workspaces' + | '/cli/troubleshooting' // DevelopPlugin paths type DevelopPluginPath = @@ -299,8 +326,8 @@ type SelfHostPath = | '/self-host/use-dify/build/additional-features' | '/self-host/use-dify/build/agent' | '/self-host/use-dify/build/chatbot' - | '/self-host/use-dify/build/mcp' | '/self-host/use-dify/build/new-agent/build' + | '/self-host/use-dify/build/new-agent/overview' | '/self-host/use-dify/build/orchestrate-node' | '/self-host/use-dify/build/predefined-error-handling-logic' | '/self-host/use-dify/build/shortcut-key' @@ -330,7 +357,6 @@ type SelfHostPath = | '/self-host/use-dify/knowledge/knowledge-pipeline/readme' | '/self-host/use-dify/knowledge/knowledge-pipeline/upload-files' | '/self-host/use-dify/knowledge/manage-knowledge/introduction' - | '/self-host/use-dify/knowledge/manage-knowledge/maintain-dataset-via-api' | '/self-host/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents' | '/self-host/use-dify/knowledge/metadata' | '/self-host/use-dify/knowledge/readme' @@ -371,7 +397,6 @@ type SelfHostPath = | '/self-host/use-dify/nodes/variable-aggregator' | '/self-host/use-dify/nodes/variable-assigner' | '/self-host/use-dify/publish/README' - | '/self-host/use-dify/publish/developing-with-apis' | '/self-host/use-dify/publish/publish-mcp' | '/self-host/use-dify/publish/publish-to-marketplace' | '/self-host/use-dify/publish/webapp/chatflow-webapp' @@ -406,8 +431,8 @@ type DeployPath = | '/deploy/troubleshooting/storage-and-migration' | '/deploy/troubleshooting/weaviate-v4-migration' -// API Reference paths (English, use apiReferencePathTranslations for other languages) -type ApiReferencePath = +// API Reference endpoint paths +type ApiEndpointReferencePath = | '/api-reference/annotations/configure-annotation-reply' | '/api-reference/annotations/create-annotation' | '/api-reference/annotations/delete-annotation' @@ -418,15 +443,11 @@ type ApiReferencePath = | '/api-reference/applications/get-app-meta' | '/api-reference/applications/get-app-parameters' | '/api-reference/applications/get-app-webapp-settings' - | '/api-reference/chatflows/get-next-suggested-questions' - | '/api-reference/chatflows/get-workflow-run-detail' - | '/api-reference/chatflows/list-workflow-logs' - | '/api-reference/chatflows/send-chat-message' - | '/api-reference/chatflows/stop-chat-message-generation' - | '/api-reference/chatflows/stream-workflow-events' - | '/api-reference/chats/get-next-suggested-questions' - | '/api-reference/chats/send-chat-message' - | '/api-reference/chats/stop-chat-message-generation' + | '/api-reference/audio/convert-audio-to-text' + | '/api-reference/audio/convert-text-to-audio' + | '/api-reference/chat-messages/get-next-suggested-questions' + | '/api-reference/chat-messages/send-chat-message' + | '/api-reference/chat-messages/stop-chat-message-generation' | '/api-reference/chunks/create-child-chunk' | '/api-reference/chunks/create-chunks' | '/api-reference/chunks/delete-child-chunk' @@ -436,8 +457,8 @@ type ApiReferencePath = | '/api-reference/chunks/list-chunks' | '/api-reference/chunks/update-child-chunk' | '/api-reference/chunks/update-chunk' - | '/api-reference/completions/send-completion-message' - | '/api-reference/completions/stop-completion-message-generation' + | '/api-reference/completion-messages/send-completion-message' + | '/api-reference/completion-messages/stop-completion-message-generation' | '/api-reference/conversations/delete-conversation' | '/api-reference/conversations/list-conversation-messages' | '/api-reference/conversations/list-conversation-variables' @@ -452,6 +473,7 @@ type ApiReferencePath = | '/api-reference/documents/get-document' | '/api-reference/documents/get-document-indexing-status' | '/api-reference/documents/list-documents' + | '/api-reference/documents/update-document' | '/api-reference/documents/update-document-by-file' | '/api-reference/documents/update-document-by-text' | '/api-reference/documents/update-document-status-in-batch' @@ -487,14 +509,12 @@ type ApiReferencePath = | '/api-reference/tags/get-knowledge-base-tags' | '/api-reference/tags/list-knowledge-tags' | '/api-reference/tags/update-knowledge-tag' - | '/api-reference/tts/convert-audio-to-text' - | '/api-reference/tts/convert-text-to-audio' - | '/api-reference/workflows/get-workflow-run-detail' - | '/api-reference/workflows/list-workflow-logs' - | '/api-reference/workflows/run-workflow' - | '/api-reference/workflows/run-workflow-by-id' - | '/api-reference/workflows/stop-workflow-task' - | '/api-reference/workflows/stream-workflow-events' + | '/api-reference/workflow-runs/get-workflow-run-detail' + | '/api-reference/workflow-runs/list-workflow-logs' + | '/api-reference/workflow-runs/run-workflow' + | '/api-reference/workflow-runs/run-workflow-by-id' + | '/api-reference/workflow-runs/stop-workflow-task' + | '/api-reference/workflow-runs/stream-workflow-events' // Base path without language prefix type DocPathWithoutLangBase = @@ -503,11 +523,12 @@ type DocPathWithoutLangBase = | HomePath | LearnPath | QuickStartPath + | ApiReferencePath | CliPath | DevelopPluginPath | SelfHostPath | DeployPath - | ApiReferencePath + | ApiEndpointReferencePath // Combined path without language prefix (supports optional #anchor) export type DocPathWithoutLang = @@ -532,15 +553,15 @@ export const docPathProductAvailability: Record '/use-dify/build/additional-features': ['cloud', 'self-host'], '/use-dify/build/agent': ['cloud', 'self-host'], '/use-dify/build/chatbot': ['cloud', 'self-host'], - '/use-dify/build/mcp': ['cloud', 'self-host'], '/use-dify/build/new-agent/build': ['self-host'], + '/use-dify/build/new-agent/overview': ['self-host'], '/use-dify/build/orchestrate-node': ['cloud', 'self-host'], '/use-dify/build/predefined-error-handling-logic': ['cloud', 'self-host'], '/use-dify/build/shortcut-key': ['cloud', 'self-host'], '/use-dify/build/text-generator': ['cloud', 'self-host'], '/use-dify/build/version-control': ['cloud', 'self-host'], '/use-dify/build/workflow-chatflow': ['cloud', 'self-host'], - '/use-dify/build/workflow-collaboration': ['cloud', 'self-host'], + '/use-dify/build/workflow-collaboration': ['self-host'], '/use-dify/debug/error-type': ['cloud', 'self-host'], '/use-dify/debug/history-and-logs': ['cloud', 'self-host'], '/use-dify/debug/step-run': ['cloud', 'self-host'], @@ -564,7 +585,6 @@ export const docPathProductAvailability: Record '/use-dify/knowledge/knowledge-pipeline/upload-files': ['cloud', 'self-host'], '/use-dify/knowledge/knowledge-request-rate-limit': ['cloud'], '/use-dify/knowledge/manage-knowledge/introduction': ['cloud', 'self-host'], - '/use-dify/knowledge/manage-knowledge/maintain-dataset-via-api': ['cloud', 'self-host'], '/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents': ['cloud', 'self-host'], '/use-dify/knowledge/metadata': ['cloud', 'self-host'], '/use-dify/knowledge/readme': ['cloud', 'self-host'], @@ -605,7 +625,6 @@ export const docPathProductAvailability: Record '/use-dify/nodes/variable-aggregator': ['cloud', 'self-host'], '/use-dify/nodes/variable-assigner': ['cloud', 'self-host'], '/use-dify/publish/README': ['cloud', 'self-host'], - '/use-dify/publish/developing-with-apis': ['cloud', 'self-host'], '/use-dify/publish/publish-mcp': ['cloud', 'self-host'], '/use-dify/publish/publish-to-marketplace': ['cloud', 'self-host'], '/use-dify/publish/webapp/chatflow-webapp': ['cloud', 'self-host'], @@ -625,94 +644,3 @@ export const docPathProductAvailability: Record '/use-dify/workspace/team-members-management': ['cloud', 'self-host'], '/use-dify/workspace/tools': ['cloud', 'self-host'], } - -// API Reference path translations (English -> other languages) -export const apiReferencePathTranslations: Record = { - '/api-reference/annotations/configure-annotation-reply': { zh: '/api-reference/标注管理/配置标注回复', ja: '/api-reference/アノテーション管理/アノテーション返信を設定' }, - '/api-reference/annotations/create-annotation': { zh: '/api-reference/标注管理/创建标注', ja: '/api-reference/アノテーション管理/アノテーションを作成' }, - '/api-reference/annotations/delete-annotation': { zh: '/api-reference/标注管理/删除标注', ja: '/api-reference/アノテーション管理/アノテーションを削除' }, - '/api-reference/annotations/get-annotation-reply-job-status': { zh: '/api-reference/标注管理/查询标注回复配置任务状态', ja: '/api-reference/アノテーション管理/アノテーション返信の初期設定タスクステータスを取得' }, - '/api-reference/annotations/list-annotations': { zh: '/api-reference/标注管理/获取标注列表', ja: '/api-reference/アノテーション管理/アノテーションリストを取得' }, - '/api-reference/annotations/update-annotation': { zh: '/api-reference/标注管理/更新标注', ja: '/api-reference/アノテーション管理/アノテーションを更新' }, - '/api-reference/applications/get-app-info': { zh: '/api-reference/应用配置/获取应用基本信息', ja: '/api-reference/アプリケーション設定/アプリケーションの基本情報を取得' }, - '/api-reference/applications/get-app-meta': { zh: '/api-reference/应用配置/获取应用元数据', ja: '/api-reference/アプリケーション設定/アプリケーションのメタ情報を取得' }, - '/api-reference/applications/get-app-parameters': { zh: '/api-reference/应用配置/获取应用参数', ja: '/api-reference/アプリケーション設定/アプリケーションのパラメータ情報を取得' }, - '/api-reference/applications/get-app-webapp-settings': { zh: '/api-reference/应用配置/获取应用-webapp-设置', ja: '/api-reference/アプリケーション設定/アプリの-webapp-設定を取得' }, - '/api-reference/chatflows/get-next-suggested-questions': { zh: '/api-reference/对话流/获取下一轮建议问题列表', ja: '/api-reference/チャットフロー/次の推奨質問を取得' }, - '/api-reference/chatflows/get-workflow-run-detail': { zh: '/api-reference/对话流/获取工作流执行情况', ja: '/api-reference/チャットフロー/ワークフロー実行詳細を取得' }, - '/api-reference/chatflows/list-workflow-logs': { zh: '/api-reference/对话流/获取工作流日志', ja: '/api-reference/チャットフロー/ワークフローログ一覧を取得' }, - '/api-reference/chatflows/send-chat-message': { zh: '/api-reference/对话流/发送对话消息', ja: '/api-reference/チャットフロー/チャットメッセージを送信' }, - '/api-reference/chatflows/stop-chat-message-generation': { zh: '/api-reference/对话流/停止响应', ja: '/api-reference/チャットフロー/生成を停止' }, - '/api-reference/chatflows/stream-workflow-events': { zh: '/api-reference/对话流/流式获取工作流事件', ja: '/api-reference/チャットフロー/ワークフローイベントをストリーム' }, - '/api-reference/chats/get-next-suggested-questions': { zh: '/api-reference/对话消息/获取下一轮建议问题列表', ja: '/api-reference/チャットメッセージ/次の推奨質問を取得' }, - '/api-reference/chats/send-chat-message': { zh: '/api-reference/对话消息/发送对话消息', ja: '/api-reference/チャットメッセージ/チャットメッセージを送信' }, - '/api-reference/chats/stop-chat-message-generation': { zh: '/api-reference/对话消息/停止响应', ja: '/api-reference/チャットメッセージ/生成を停止' }, - '/api-reference/chunks/create-child-chunk': { zh: '/api-reference/分段/创建子分段', ja: '/api-reference/チャンク/子チャンクを作成' }, - '/api-reference/chunks/create-chunks': { zh: '/api-reference/分段/向文档添加分段', ja: '/api-reference/チャンク/ドキュメントにチャンクを追加' }, - '/api-reference/chunks/delete-child-chunk': { zh: '/api-reference/分段/删除子分段', ja: '/api-reference/チャンク/子チャンクを削除' }, - '/api-reference/chunks/delete-chunk': { zh: '/api-reference/分段/删除文档中的分段', ja: '/api-reference/チャンク/ドキュメント内のチャンクを削除' }, - '/api-reference/chunks/get-chunk': { zh: '/api-reference/分段/获取文档中的分段详情', ja: '/api-reference/チャンク/ドキュメント内のチャンク詳細を取得' }, - '/api-reference/chunks/list-child-chunks': { zh: '/api-reference/分段/获取子分段', ja: '/api-reference/チャンク/子チャンク一覧を取得' }, - '/api-reference/chunks/list-chunks': { zh: '/api-reference/分段/从文档获取分段', ja: '/api-reference/チャンク/チャンク一覧を取得' }, - '/api-reference/chunks/update-child-chunk': { zh: '/api-reference/分段/更新子分段', ja: '/api-reference/チャンク/子チャンクを更新' }, - '/api-reference/chunks/update-chunk': { zh: '/api-reference/分段/更新文档中的分段', ja: '/api-reference/チャンク/ドキュメント内のチャンクを更新' }, - '/api-reference/completions/send-completion-message': { zh: '/api-reference/文本生成/发送消息', ja: '/api-reference/完了メッセージ/完了メッセージを送信' }, - '/api-reference/completions/stop-completion-message-generation': { zh: '/api-reference/文本生成/停止响应', ja: '/api-reference/完了メッセージ/生成を停止' }, - '/api-reference/conversations/delete-conversation': { zh: '/api-reference/会话管理/删除会话', ja: '/api-reference/会話管理/会話を削除' }, - '/api-reference/conversations/list-conversation-messages': { zh: '/api-reference/会话管理/获取会话历史消息', ja: '/api-reference/会話管理/会話履歴メッセージ一覧を取得' }, - '/api-reference/conversations/list-conversation-variables': { zh: '/api-reference/会话管理/获取对话变量', ja: '/api-reference/会話管理/会話変数の取得' }, - '/api-reference/conversations/list-conversations': { zh: '/api-reference/会话管理/获取会话列表', ja: '/api-reference/会話管理/会話一覧を取得' }, - '/api-reference/conversations/rename-conversation': { zh: '/api-reference/会话管理/重命名会话', ja: '/api-reference/会話管理/会話の名前を変更' }, - '/api-reference/conversations/update-conversation-variable': { zh: '/api-reference/会话管理/更新对话变量', ja: '/api-reference/会話管理/会話変数を更新' }, - '/api-reference/documents/create-document-by-file': { zh: '/api-reference/文档/从文件创建文档', ja: '/api-reference/ドキュメント/ファイルからドキュメントを作成' }, - '/api-reference/documents/create-document-by-text': { zh: '/api-reference/文档/从文本创建文档', ja: '/api-reference/ドキュメント/テキストからドキュメントを作成' }, - '/api-reference/documents/delete-document': { zh: '/api-reference/文档/删除文档', ja: '/api-reference/ドキュメント/ドキュメントを削除' }, - '/api-reference/documents/download-document': { zh: '/api-reference/文档/下载文档', ja: '/api-reference/ドキュメント/ドキュメントをダウンロード' }, - '/api-reference/documents/download-documents-as-zip': { zh: '/api-reference/文档/批量下载文档(zip)', ja: '/api-reference/ドキュメント/ドキュメントを一括ダウンロード(zip)' }, - '/api-reference/documents/get-document': { zh: '/api-reference/文档/获取文档详情', ja: '/api-reference/ドキュメント/ドキュメント詳細を取得' }, - '/api-reference/documents/get-document-indexing-status': { zh: '/api-reference/文档/获取文档嵌入状态(进度)', ja: '/api-reference/ドキュメント/ドキュメント埋め込みステータス(進捗)を取得' }, - '/api-reference/documents/list-documents': { zh: '/api-reference/文档/获取知识库的文档列表', ja: '/api-reference/ドキュメント/ナレッジベースのドキュメントリストを取得' }, - '/api-reference/documents/update-document-by-file': { zh: '/api-reference/文档/用文件更新文档', ja: '/api-reference/ドキュメント/ファイルでドキュメントを更新' }, - '/api-reference/documents/update-document-by-text': { zh: '/api-reference/文档/用文本更新文档', ja: '/api-reference/ドキュメント/テキストでドキュメントを更新' }, - '/api-reference/documents/update-document-status-in-batch': { zh: '/api-reference/文档/批量更新文档状态', ja: '/api-reference/ドキュメント/ドキュメントステータスを一括更新' }, - '/api-reference/end-users/get-end-user-info': { zh: '/api-reference/终端用户/获取终端用户', ja: '/api-reference/エンドユーザー/エンドユーザー取得' }, - '/api-reference/feedback/list-app-feedbacks': { zh: '/api-reference/消息反馈/获取应用的消息反馈', ja: '/api-reference/メッセージフィードバック/アプリのフィードバック一覧を取得' }, - '/api-reference/feedback/submit-message-feedback': { zh: '/api-reference/消息反馈/提交消息反馈', ja: '/api-reference/メッセージフィードバック/メッセージフィードバックを送信' }, - '/api-reference/files/download-file': { zh: '/api-reference/文件操作/下载文件', ja: '/api-reference/ファイル操作/ファイルをダウンロード' }, - '/api-reference/files/upload-file': { zh: '/api-reference/文件操作/上传文件', ja: '/api-reference/ファイル操作/ファイルをアップロード' }, - '/api-reference/human-input/get-human-input-form': { zh: '/api-reference/人工介入/获取人工介入表单', ja: '/api-reference/人間の入力/人間の入力フォームを取得' }, - '/api-reference/human-input/submit-human-input-form': { zh: '/api-reference/人工介入/提交人工介入表单', ja: '/api-reference/人間の入力/人間の入力フォームを送信' }, - '/api-reference/knowledge-bases/create-an-empty-knowledge-base': { zh: '/api-reference/知识库/创建空知识库', ja: '/api-reference/データセット/空のナレッジベースを作成' }, - '/api-reference/knowledge-bases/delete-knowledge-base': { zh: '/api-reference/知识库/删除知识库', ja: '/api-reference/データセット/ナレッジベースを削除' }, - '/api-reference/knowledge-bases/get-knowledge-base': { zh: '/api-reference/知识库/获取知识库详情', ja: '/api-reference/データセット/ナレッジベース詳細を取得' }, - '/api-reference/knowledge-bases/list-knowledge-bases': { zh: '/api-reference/知识库/获取知识库列表', ja: '/api-reference/データセット/ナレッジベースリストを取得' }, - '/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-/-test-retrieval': { zh: '/api-reference/知识库/从知识库检索分段-/-测试检索', ja: '/api-reference/データセット/ナレッジベースからチャンクを取得-/-テスト検索' }, - '/api-reference/knowledge-bases/update-knowledge-base': { zh: '/api-reference/知识库/更新知识库', ja: '/api-reference/データセット/ナレッジベースを更新' }, - '/api-reference/knowledge-pipeline/list-datasource-plugins': { zh: '/api-reference/知识流水线/获取数据源插件列表', ja: '/api-reference/ナレッジパイプライン/データソースプラグインリストを取得' }, - '/api-reference/knowledge-pipeline/run-datasource-node': { zh: '/api-reference/知识流水线/执行数据源节点', ja: '/api-reference/ナレッジパイプライン/データソースノードを実行' }, - '/api-reference/knowledge-pipeline/run-pipeline': { zh: '/api-reference/知识流水线/运行流水线', ja: '/api-reference/ナレッジパイプライン/パイプラインを実行' }, - '/api-reference/knowledge-pipeline/upload-pipeline-file': { zh: '/api-reference/知识流水线/上传流水线文件', ja: '/api-reference/ナレッジパイプライン/パイプラインファイルをアップロード' }, - '/api-reference/metadata/create-metadata-field': { zh: '/api-reference/元数据/创建元数据字段', ja: '/api-reference/メタデータ/メタデータフィールドを作成' }, - '/api-reference/metadata/delete-metadata-field': { zh: '/api-reference/元数据/删除元数据字段', ja: '/api-reference/メタデータ/メタデータフィールドを削除' }, - '/api-reference/metadata/get-built-in-metadata-fields': { zh: '/api-reference/元数据/获取内置元数据字段', ja: '/api-reference/メタデータ/組み込みメタデータフィールドを取得' }, - '/api-reference/metadata/list-metadata-fields': { zh: '/api-reference/元数据/获取元数据字段列表', ja: '/api-reference/メタデータ/メタデータフィールドリストを取得' }, - '/api-reference/metadata/update-built-in-metadata-field': { zh: '/api-reference/元数据/更新内置元数据字段', ja: '/api-reference/メタデータ/組み込みメタデータフィールドを更新' }, - '/api-reference/metadata/update-document-metadata-in-batch': { zh: '/api-reference/元数据/批量更新文档元数据', ja: '/api-reference/メタデータ/ドキュメントメタデータを一括更新' }, - '/api-reference/metadata/update-metadata-field': { zh: '/api-reference/元数据/更新元数据字段', ja: '/api-reference/メタデータ/メタデータフィールドを更新' }, - '/api-reference/models/get-available-models': { zh: '/api-reference/模型/获取可用模型', ja: '/api-reference/モデル/利用可能なモデルを取得' }, - '/api-reference/tags/create-knowledge-tag': { zh: '/api-reference/标签/创建知识库标签', ja: '/api-reference/タグ管理/ナレッジベースタグを作成' }, - '/api-reference/tags/create-tag-binding': { zh: '/api-reference/标签/绑定标签到知识库', ja: '/api-reference/タグ管理/タグをデータセットにバインド' }, - '/api-reference/tags/delete-knowledge-tag': { zh: '/api-reference/标签/删除知识库标签', ja: '/api-reference/タグ管理/ナレッジベースタグを削除' }, - '/api-reference/tags/delete-tag-binding': { zh: '/api-reference/标签/解除标签与知识库的绑定', ja: '/api-reference/タグ管理/タグとデータセットのバインドを解除' }, - '/api-reference/tags/get-knowledge-base-tags': { zh: '/api-reference/标签/获取知识库绑定的标签', ja: '/api-reference/タグ管理/ナレッジベースにバインドされたタグを取得' }, - '/api-reference/tags/list-knowledge-tags': { zh: '/api-reference/标签/获取知识库标签列表', ja: '/api-reference/タグ管理/ナレッジベースタグリストを取得' }, - '/api-reference/tags/update-knowledge-tag': { zh: '/api-reference/标签/修改知识库标签', ja: '/api-reference/タグ管理/ナレッジベースタグを変更' }, - '/api-reference/tts/convert-audio-to-text': { zh: '/api-reference/语音与文字转换/语音转文字', ja: '/api-reference/音声・テキスト変換/音声をテキストに変換' }, - '/api-reference/tts/convert-text-to-audio': { zh: '/api-reference/语音与文字转换/文字转语音', ja: '/api-reference/音声・テキスト変換/テキストを音声に変換' }, - '/api-reference/workflows/get-workflow-run-detail': { zh: '/api-reference/工作流/获取工作流执行情况', ja: '/api-reference/ワークフロー/ワークフロー実行詳細を取得' }, - '/api-reference/workflows/list-workflow-logs': { zh: '/api-reference/工作流/获取工作流日志', ja: '/api-reference/ワークフロー/ワークフローログ一覧を取得' }, - '/api-reference/workflows/run-workflow': { zh: '/api-reference/工作流/执行工作流', ja: '/api-reference/ワークフロー/ワークフローを実行' }, - '/api-reference/workflows/run-workflow-by-id': { zh: '/api-reference/工作流/按-id-执行工作流', ja: '/api-reference/ワークフロー/id-でワークフローを実行' }, - '/api-reference/workflows/stop-workflow-task': { zh: '/api-reference/工作流/停止工作流任务', ja: '/api-reference/ワークフロー/ワークフロータスクを停止' }, - '/api-reference/workflows/stream-workflow-events': { zh: '/api-reference/工作流/流式获取工作流事件', ja: '/api-reference/ワークフロー/ワークフローイベントをストリーム' }, -}