File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 8
8
"strings"
9
9
"time"
10
10
11
+ "github.com/0xJacky/Nginx-UI/api"
11
12
"github.com/0xJacky/Nginx-UI/internal/llm"
12
13
"github.com/0xJacky/Nginx-UI/settings"
13
14
"github.com/gin-gonic/gin"
@@ -46,10 +47,7 @@ func MakeChatCompletionRequest(c *gin.Context) {
46
47
}
47
48
48
49
// SSE server
49
- c .Writer .Header ().Set ("Content-Type" , "text/event-stream; charset=utf-8" )
50
- c .Writer .Header ().Set ("Cache-Control" , "no-cache" )
51
- c .Writer .Header ().Set ("Connection" , "keep-alive" )
52
- c .Writer .Header ().Set ("Access-Control-Allow-Origin" , "*" )
50
+ api .SetSSEHeaders (c )
53
51
54
52
openaiClient , err := llm .GetClient ()
55
53
if err != nil {
Original file line number Diff line number Diff line change 1
1
import { autoAnimatePlugin } from '@formkit/auto-animate/vue'
2
2
import { createCurdConfig } from '@uozi-admin/curd'
3
+ import { setRequestConfig } from '@uozi-admin/request'
3
4
import { createPinia } from 'pinia'
4
5
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
5
6
import { createApp } from 'vue'
@@ -24,6 +25,10 @@ function setupTranslations() {
24
25
} , { } )
25
26
}
26
27
28
+ setRequestConfig ( {
29
+ baseURL : './api' ,
30
+ } )
31
+
27
32
pinia . use ( piniaPluginPersistedstate )
28
33
29
34
app . use ( pinia )
You can’t perform that action at this time.
0 commit comments