Fix 'hang' on empty message from the start

Seems like that empty message marker trick was unnecessary
This commit is contained in:
mintyleaf 2024-12-16 23:23:45 +04:00
parent e459118de6
commit f98775ef5c
2 changed files with 2 additions and 9 deletions

View file

@ -118,7 +118,7 @@ func ModelInference(ctx context.Context, s string, messages []schema.Message, im
var partialRune []byte
err := inferenceModel.PredictStream(ctx, opts, func(reply *proto.Reply) {
msg := reply.GetMessage()
msg := reply.Message
partialRune = append(partialRune, msg...)
tokenUsage.Prompt = int(reply.PromptTokens)