forked from spring-ai-alibaba/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.config.ts
More file actions
149 lines (129 loc) · 4.13 KB
/
Copy pathproject.config.ts
File metadata and controls
149 lines (129 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
export interface ProjectConfig {
// Basic information
title: string
tagline: string
description: string
// Author information
author: {
name: string
email: string
website?: string
}
// GitHub repository information (project code repo)
github: {
username: string
repoName: string
}
// Docs/website repository information
docsGithub: {
username: string
repoName: string
}
// Website deployment information
deployment: {
url: string
baseUrl: string
}
// Social links
social?: {
twitter?: string
discord?: string
linkedin?: string
}
// Search configuration
search: {
// Enable vector search functionality
enableVectorSearch: boolean
// Pinecone configuration
pinecone?: {
apiKey: string
environment: string
indexName: string
}
}
}
const projectConfig: ProjectConfig = {
// Basic project information
title: 'Spring AI Alibaba',
tagline: 'Agentic AI Framework for Java Developers. Built on the core concept of DAG Graph, it can easily achieve single agent, multi-agent, and complex workflow orchestration.',
description: 'Spring AI Alibaba 开源项目基于 Spring AI 构建,是阿里云通义系列模型及服务在 Java AI 应用开发领域的最佳实践,提供高层次的 AI API 抽象与云原生基础设施集成方案,帮助开发者快速构建 AI 应用。',
// Author information
author: {
name: 'spring-ai-alibaba-team',
email: 'your.email@example.com',
website: 'https://java2ai.com', // optional
},
// GitHub repository information (project code repo)
github: {
username: 'alibaba',
repoName: 'spring-ai-alibaba',
},
// Docs/website repository information
docsGithub: {
username: 'spring-ai-alibaba',
repoName: 'website',
},
// Website deployment configuration
deployment: {
url: 'https://spring-ai-alibaba.github.io',
baseUrl: '/', // For GitHub Pages, usually '/your-repo-name/'
},
// Social media links (optional)
social: {
twitter: 'https://twitter.com/your-username',
// discord: 'https://discord.gg/your-server',
// linkedin: 'https://linkedin.com/in/your-profile',
},
// Search functionality configuration
search: {
// Enable vector search functionality (requires Pinecone configuration)
enableVectorSearch: true, // Set to true to enable vector search demo
// Pinecone vector database configuration
pinecone: {
apiKey: 'demo-api-key', // Replace with your actual Pinecone API key
environment: 'demo-environment', // Replace with your Pinecone environment
indexName: 'demo-index', // Replace with your index name
},
},
}
// Export configuration and helper functions
export default projectConfig
// Helper function: generate GitHub related links
export const getGitHubUrls = (config: ProjectConfig) => {
const { username, repoName } = config.github
const baseUrl = `https://github.com/${username}/${repoName}`
const { username: docsUsername, repoName: docsRepoName } = config.docsGithub
const docsBaseUrl = `https://github.com/${docsUsername}/${docsRepoName}`
return {
repo: baseUrl,
discussions: `${baseUrl}/discussions`,
issues: `${baseUrl}/issues`,
license: `${baseUrl}/blob/main/LICENSE`,
contributing: `${baseUrl}/blob/main/CONTRIBUTING.md`,
editDocs: `${docsBaseUrl}/tree/main/`,
editBlog: `${docsBaseUrl}/tree/main/blog/`,
docsRepo: docsBaseUrl,
}
}
// Helper function: generate complete author information
export const getAuthorInfo = (config: ProjectConfig) => {
const { name, email, website } = config.author
return {
name,
email,
full: website ? `${name} <${email}> (${website})` : `${name} <${email}>`,
}
}
// Helper function: get search configuration
export const getSearchConfig = (config: ProjectConfig) => {
const { search } = config
const isVectorSearchEnabled = search.enableVectorSearch &&
search.pinecone?.apiKey &&
search.pinecone?.environment &&
search.pinecone?.indexName
return {
enableVectorSearch: search.enableVectorSearch,
isVectorSearchConfigured: isVectorSearchEnabled,
pinecone: search.pinecone,
}
}