@@ -7,12 +7,12 @@ import (
77 "time"
88
99 "connectrpc.com/connect"
10+ "github.com/missingstudio/studio/backend/core/chat"
1011 "github.com/missingstudio/studio/backend/core/connection"
1112 "github.com/missingstudio/studio/backend/internal/constants"
1213 "github.com/missingstudio/studio/backend/internal/providers"
1314 "github.com/missingstudio/studio/backend/internal/providers/base"
1415 "github.com/missingstudio/studio/backend/internal/router"
15- "github.com/missingstudio/studio/backend/models"
1616 "github.com/missingstudio/studio/common/errors"
1717 llmv1 "github.com/missingstudio/studio/protos/pkg/llm/v1"
1818)
@@ -86,13 +86,13 @@ func (s *V1Handler) ChatCompletions(
8686 return connect .NewResponse (chatCompletionResponseSchema ), nil
8787}
8888
89- func (s * V1Handler ) createChatCompletionRequestSchema (req * llmv1.ChatCompletionRequest ) (* models .ChatCompletionRequest , error ) {
89+ func (s * V1Handler ) createChatCompletionRequestSchema (req * llmv1.ChatCompletionRequest ) (* chat .ChatCompletionRequest , error ) {
9090 payload , err := json .Marshal (req )
9191 if err != nil {
9292 return nil , err
9393 }
9494
95- data := & models .ChatCompletionRequest {}
95+ data := & chat .ChatCompletionRequest {}
9696 err = json .Unmarshal (payload , data )
9797 if err != nil {
9898 return nil , err
@@ -101,7 +101,7 @@ func (s *V1Handler) createChatCompletionRequestSchema(req *llmv1.ChatCompletionR
101101 return data , nil
102102}
103103
104- func (s * V1Handler ) createChatCompletionResponseSchema (resp * models .ChatCompletionResponse ) (* llmv1.ChatCompletionResponse , error ) {
104+ func (s * V1Handler ) createChatCompletionResponseSchema (resp * chat .ChatCompletionResponse ) (* llmv1.ChatCompletionResponse , error ) {
105105 payload , err := json .Marshal (resp )
106106 if err != nil {
107107 return nil , err
@@ -116,7 +116,7 @@ func (s *V1Handler) createChatCompletionResponseSchema(resp *models.ChatCompleti
116116 return data , nil
117117}
118118
119- func (s * V1Handler ) sendMetrics (provider string , latency time.Duration , response * models .ChatCompletionResponse ) {
119+ func (s * V1Handler ) sendMetrics (provider string , latency time.Duration , response * chat .ChatCompletionResponse ) {
120120 ingesterdata := make (map [string ]any )
121121 ingesterdata ["provider" ] = provider
122122 ingesterdata ["latency" ] = latency
0 commit comments