feat(box): 实现 AI 对话窗口并添加网络 API 调用

- 新增 LMApi 类实现 API 调用获取 AI 回复
- 修改 LocalWindow 类,添加系统提示信息- 更新 Main 类,引入 Markdown处理库
- 在 build.gradle 中添加相关依赖
This commit is contained in:
tzdwindows 7
2025-02-09 12:06:50 +08:00
parent 022446eb32
commit db5d4b06c6
6 changed files with 150 additions and 30 deletions

View File

@@ -24,28 +24,22 @@ repositories {
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
// https://mvnrepository.com/artifact/org.commonmark/commonmark
implementation 'org.commonmark:commonmark:0.24.0'
// https://mvnrepository.com/artifact/org.commonjava.googlecode.markdown4j/markdown4j
implementation 'org.commonjava.googlecode.markdown4j:markdown4j:2.2-cj-1.1'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation 'com.google.code.gson:gson:2.8.9'
}
application {
mainClass = 'com.axis.innovators.box.Main'
}
shadowJar {
archiveBaseName = 'app'
archiveClassifier = ''
archiveVersion = ''
}
launch4j {
mainClassName = 'com.axis.innovators.box.Main'
outfile = version + '.exe'
icon = "${projectDir}/logo.ico"
jar = shadowJar.archiveFile.get()
bundledJrePath = 'jre'
}
tasks.named('launch4j') {
dependsOn shadowJar
jar {
manifest {
attributes 'Main-Class': 'com.axis.innovators.box.Main'
}
}
test {