MCPcopy Create free account
hub / github.com/bytebase/bytebase / newAIChatUsage

Function newAIChatUsage

backend/api/v1/ai_service.go:683–690  ·  view source on GitHub ↗
(totalTokens int32)

Source from the content-addressed store, hash-verified

681}
682
683func newAIChatUsage(totalTokens int32) *v1pb.AIChatUsage {
684 if totalTokens <= 0 {
685 return nil
686 }
687 return &v1pb.AIChatUsage{
688 TotalTokens: totalTokens,
689 }
690}
691
692// doHTTPRequest executes an HTTP request and returns the response body.
693func doHTTPRequest(_ context.Context, httpReq *http.Request, provider string) ([]byte, error) {

Callers 3

chatOpenAIMethod · 0.85
chatClaudeMethod · 0.85
chatGeminiMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected