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 88 "strings"
99 "time"
1010
11+ "github.com/0xJacky/Nginx-UI/api"
1112 "github.com/0xJacky/Nginx-UI/internal/llm"
1213 "github.com/0xJacky/Nginx-UI/settings"
1314 "github.com/gin-gonic/gin"
@@ -46,10 +47,7 @@ func MakeChatCompletionRequest(c *gin.Context) {
4647 }
4748
4849 // 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 )
5351
5452 openaiClient , err := llm .GetClient ()
5553 if err != nil {
Original file line number Diff line number Diff line change 11import { autoAnimatePlugin } from '@formkit/auto-animate/vue'
22import { createCurdConfig } from '@uozi-admin/curd'
3+ import { setRequestConfig } from '@uozi-admin/request'
34import { createPinia } from 'pinia'
45import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
56import { createApp } from 'vue'
@@ -24,6 +25,10 @@ function setupTranslations() {
2425 } , { } )
2526}
2627
28+ setRequestConfig ( {
29+ baseURL : './api' ,
30+ } )
31+
2732pinia . use ( piniaPluginPersistedstate )
2833
2934app . use ( pinia )
You can’t perform that action at this time.
0 commit comments