MCPcopy Create free account
hub / github.com/coderabbit214/document-ai / Usage

Struct Usage

pkg/openai/common.go:15–19  ·  view source on GitHub ↗

Usage Represents the total token usage per request to OpenAI.

Source from the content-addressed store, hash-verified

13
14// Usage Represents the total token usage per request to OpenAI.
15type Usage struct {
16 PromptTokens int `json:"prompt_tokens"`
17 CompletionTokens int `json:"completion_tokens"`
18 TotalTokens int `json:"total_tokens"`
19}
20
21func Send(suffix string, reqBytes []byte) (body []byte, err error) {
22 req, err := http.NewRequest(http.MethodPost, Api+suffix, bytes.NewBuffer(reqBytes))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected