Compare commits
5 Commits
0f5ae1c4d4
...
306c20aa7f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
306c20aa7f | ||
|
|
24d5d10ecb | ||
|
|
4a9a9ec238 | ||
|
|
08aa1d8382 | ||
|
|
1b3045dfd4 |
@@ -34,6 +34,10 @@ public class WebApplication implements ApplicationRunner, ApplicationContextAwar
|
||||
return context.getBean(clazz);
|
||||
}
|
||||
|
||||
public static <T> T getBean(String name, Class<T> clazz) {
|
||||
return context.getBean(name, clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
}
|
||||
|
||||
@@ -150,9 +150,11 @@ public class EmbeddingNodes {
|
||||
@LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "qa_split", nodeName = "使用Q/A格式分段", nodeType = NodeTypeEnum.COMMON)
|
||||
public void qaSplit(NodeComponent node) {
|
||||
EmbeddingContext context = node.getContextBean(EmbeddingContext.class);
|
||||
// language=TEXT
|
||||
context.getDocuments().addAll(llmSplit(
|
||||
"""
|
||||
对用户输入的文本,生成多组高质量的问答对。请遵循以下指南:
|
||||
|
||||
1. 问题部分:
|
||||
为同一个主题创建尽可能多的不同表述的问题,确保问题的多样性。
|
||||
每个问题应考虑用户可能的多种问法,例如:
|
||||
@@ -167,7 +169,7 @@ public class EmbeddingNodes {
|
||||
答案应直接基于给定文本,确保准确性和一致性。
|
||||
包含相关的细节,如日期、名称、职位等具体信息,必要时提供背景信息以增强理解。
|
||||
3. 格式:
|
||||
使用"问:"标记问题集合的开始,所有问题应在一个段落内,问题之间用空格分隔。
|
||||
使用"问:"标记问题的开始,问题文本应在一个段落内完成。
|
||||
使用"答:"标记答案的开始,答案应清晰分段,便于阅读。
|
||||
问答对之间用“---”分隔,以提高可读性。
|
||||
4. 内容要求:
|
||||
@@ -175,6 +177,8 @@ public class EmbeddingNodes {
|
||||
避免添加文本中未提及的信息,确保信息的真实性。
|
||||
一个问题搭配一个答案,避免一组问答对中同时涉及多个问题。
|
||||
如果文本信息不足以回答某个方面,可以在答案中说明 "根据给定信息无法确定",并尽量提供相关的上下文。
|
||||
除了问答对本身,避免输出任何与问答对无关的提示性、引导性、解释性的文本。
|
||||
|
||||
格式样例:
|
||||
问:苹果通常是什么颜色的?
|
||||
答:红色。
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ChartTool {
|
||||
""") String request
|
||||
) {
|
||||
log.info("Enter method: mermaid[request]. request:{}", request);
|
||||
ChatClient.Builder builder = WebApplication.getBean(ChatClient.Builder.class);
|
||||
ChatClient.Builder builder = WebApplication.getBean("chat", ChatClient.Builder.class);
|
||||
ChatClient client = builder.build();
|
||||
return client.prompt()
|
||||
// language=TEXT
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!--suppress CssUnknownTarget, HtmlUnknownTarget -->
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
@@ -13,6 +14,15 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'LXGWWenKai';
|
||||
src: url('fonts/LXGWNeoXiHei.ttf') format('truetype');
|
||||
}
|
||||
|
||||
*:not(.fa,.fas) {
|
||||
font-family: LXGWWenKai, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', serif !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
BIN
service-web/client/public/fonts/LXGWNeoXiHei.ttf
Normal file
BIN
service-web/client/public/fonts/LXGWNeoXiHei.ttf
Normal file
Binary file not shown.
4
service-web/client/src/index.scss
Normal file
4
service-web/client/src/index.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
// 改写一些amis中控制不到的全局CSS
|
||||
button.btn-deleted:hover {
|
||||
color: #dc2626 !important;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import {createRoot} from 'react-dom/client'
|
||||
import {createHashRouter, RouterProvider} from 'react-router'
|
||||
|
||||
import './index.scss'
|
||||
import './components/Registry.ts'
|
||||
|
||||
import {routes} from './route.tsx'
|
||||
|
||||
@@ -217,7 +217,7 @@ const Feedback: React.FC = () => {
|
||||
disabledOn: '${status === \'ANALYSIS_PROCESSING\'}',
|
||||
type: 'action',
|
||||
label: '删除',
|
||||
className: 'text-danger hover:text-red-600',
|
||||
className: 'text-danger btn-deleted',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'ajax',
|
||||
|
||||
@@ -142,7 +142,7 @@ const DataDetail: React.FC = () => {
|
||||
{
|
||||
type: 'action',
|
||||
label: '删除',
|
||||
className: 'text-danger hover:text-red-600',
|
||||
className: 'text-danger btn-deleted',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'ajax',
|
||||
|
||||
@@ -87,7 +87,7 @@ const DataDetail: React.FC = () => {
|
||||
{
|
||||
type: 'action',
|
||||
label: '删除',
|
||||
className: 'text-danger hover:text-red-600',
|
||||
className: 'text-danger btn-deleted',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'ajax',
|
||||
|
||||
@@ -188,7 +188,7 @@ const Knowledge: React.FC = () => {
|
||||
{
|
||||
type: 'action',
|
||||
label: '删除',
|
||||
className: 'text-danger hover:text-red-600',
|
||||
className: 'text-danger btn-deleted',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'ajax',
|
||||
|
||||
@@ -169,7 +169,7 @@ const tableDetailDialog = (variable: string, targetList: any) => {
|
||||
|
||||
const overviewYarnJob = (cluster: string, search: string, queue: string | undefined, yarnQueue: string) => {
|
||||
return {
|
||||
className: 'text-base leading-none',
|
||||
className: 'text-sm leading-none',
|
||||
type: 'table-view',
|
||||
border: false,
|
||||
padding: '0 10px 0 15px',
|
||||
|
||||
@@ -91,7 +91,7 @@ function Table() {
|
||||
columns: [
|
||||
{
|
||||
label: 'Flink job id',
|
||||
width: 195,
|
||||
width: 200,
|
||||
fixed: 'left',
|
||||
type: 'wrapper',
|
||||
size: 'none',
|
||||
|
||||
@@ -99,7 +99,7 @@ function Version() {
|
||||
columns: [
|
||||
{
|
||||
label: 'Flink job id',
|
||||
width: 195,
|
||||
width: 200,
|
||||
fixed: 'left',
|
||||
type: 'wrapper',
|
||||
size: 'none',
|
||||
|
||||
Reference in New Issue
Block a user