Skip to content

Commit

Permalink
fix: update completion handler and main for chat message support
Browse files Browse the repository at this point in the history
  • Loading branch information
teilomillet committed Jan 2, 2025
1 parent a8602ad commit fbc68c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/hapax/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
version = flag.Bool("version", false, "Print version and exit")
)

const Version = "v0.0.16"
const Version = "v0.0.20"

func main() {
flag.Parse()
Expand Down
8 changes: 8 additions & 0 deletions server/handlers/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ func (h *CompletionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

// Add debug logging
logger.Debug("Received completion request",
zap.String("request_type", requestType),
zap.Int("messages_count", len(completionReq.Messages)),
zap.Any("messages", completionReq.Messages),
zap.String("input", completionReq.Input),
)

// Convert request to messages format
var messages []gollm.PromptMessage

Expand Down

0 comments on commit fbc68c9

Please sign in to comment.