add log
This commit is contained in:
@@ -13,7 +13,7 @@ type LLM interface {
|
||||
|
||||
type llm struct {
|
||||
ApiKey *model.ApiKey
|
||||
Usage *model.Usage
|
||||
Usage *TokenUsage
|
||||
tools any // TODO
|
||||
Messages []any // TODO
|
||||
llm LLM
|
||||
|
||||
@@ -218,6 +218,7 @@ func (o *OpenAICompatible) StreamChat(ctx context.Context, chatReq llm.ChatReque
|
||||
// case output <- &streamResp:
|
||||
// }
|
||||
}
|
||||
fmt.Println("llm usage:", o.tokenUsage.Model, o.tokenUsage.PromptTokens, o.tokenUsage.CompletionTokens, o.tokenUsage.TotalTokens)
|
||||
}()
|
||||
return output, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user