tycoding 1 rok temu
rodzic
commit
46367841c9

+ 2 - 2
langchat-aigc/src/main/java/cn/tycoding/langchat/aigc/mapper/AigcMessageMapper.java

@@ -43,7 +43,7 @@ public interface AigcMessageMapper extends BaseMapper<AigcMessage> {
         GROUP BY
             month
         ORDER BY
-            month DESC;
+            month ASC;
     """)
     List<Dict> getReqChart();
 
@@ -59,7 +59,7 @@ public interface AigcMessageMapper extends BaseMapper<AigcMessage> {
         GROUP BY
             month
         ORDER BY
-            month DESC;
+            month ASC;
     """)
     List<Dict> getTokenChart();
 

+ 4 - 0
langchat-server/src/main/resources/application-dev.yml

@@ -34,4 +34,8 @@ langchat:
       port: 19530
       collection-name: test3
       dimension: 384
+  web-search:
+    google:
+      api-key: <KEY>
+      csi: <CSI>
 

+ 1 - 1
langchat-ui/src/layout/index.vue

@@ -259,7 +259,7 @@
   }
 
   .layout-content-main {
-    //margin: 0 10px 10px;
+    margin: 0 10px 10px;
     position: relative;
     padding-top: 64px;
   }

+ 1 - 1
langchat-ui/src/views/dashboard/components/AiReqChart.vue

@@ -54,7 +54,7 @@
           },
         },
       ],
-      grid: { left: '1%', right: '1%', top: '2  %', bottom: 0, containLabel: true },
+      grid: { left: '1%', right: '2%', top: '4%', bottom: '4%', containLabel: true },
       series: [
         {
           smooth: true,

+ 1 - 1
langchat-ui/src/views/dashboard/components/AiTokenChart.vue

@@ -54,7 +54,7 @@
           },
         },
       ],
-      grid: { left: '1%', right: '1%', top: '2  %', bottom: 0, containLabel: true },
+      grid: { left: '1%', right: '2%', top: '4%', bottom: '4%', containLabel: true },
       series: [
         {
           smooth: true,

+ 15 - 18
langchat-ui/src/views/dashboard/components/VisiTab.vue

@@ -1,22 +1,19 @@
-<template>
-  <div class="mt-4">
-    <NRow :gutter="24">
-      <NCol :span="24">
-        <n-card content-style="padding: 0;" :bordered="false">
-          <n-tabs type="line" size="large" :tabs-padding="20" pane-style="padding: 20px;">
-            <n-tab-pane name="AI请求量统计">
-              <AiReqChart />
-            </n-tab-pane>
-            <n-tab-pane name="Token消耗量统计">
-              <AiTokenChart />
-            </n-tab-pane>
-          </n-tabs>
-        </n-card>
-      </NCol>
-    </NRow>
-  </div>
-</template>
 <script lang="ts" setup>
   import AiReqChart from './AiReqChart.vue';
   import AiTokenChart from './AiTokenChart.vue';
 </script>
+
+<template>
+  <div class="mt-4 w-full">
+    <n-card content-style="padding: 0;" :bordered="false">
+      <n-tabs type="line" size="large" :tabs-padding="20" pane-style="padding: 10px">
+        <n-tab-pane name="AI请求量统计">
+          <AiReqChart />
+        </n-tab-pane>
+        <n-tab-pane name="Token消耗量统计">
+          <AiTokenChart />
+        </n-tab-pane>
+      </n-tabs>
+    </n-card>
+  </div>
+</template>