Skip to content

Commit

Permalink
refactor: text_embedding result to list[int]
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Nov 22, 2024
1 parent 5b6c71c commit 33e51cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/types/entities/model_entities/text_embedding.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ type TextEmbeddingResult struct {
}

type GetTextEmbeddingNumTokensResponse struct {
NumTokens int `json:"num_tokens" validate:"required"`
NumTokens []int `json:"num_tokens" validate:"required"`
}
1 change: 1 addition & 0 deletions internal/types/exception/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func (e *genericError) Error() string {
}

func (e *genericError) ToResponse() *entities.Response {
// TODO: using struct instead, currently, for compatibility with old code
errorMsg := parser.MarshalJson(e)

return entities.NewDaemonErrorResponse(e.code, errorMsg)
Expand Down

0 comments on commit 33e51cd

Please sign in to comment.