(totalTokens int32)
| 681 | } |
| 682 | |
| 683 | func 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. |
| 693 | func doHTTPRequest(_ context.Context, httpReq *http.Request, provider string) ([]byte, error) { |
no outgoing calls
no test coverage detected