X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/9b1705c5647864ef482078e1e169d6dfeade98b6..581a88014e0acaf9e91de6d0a7037f9077bfe288:/responses.go diff --git a/responses.go b/responses.go index 9d6b75f..ebffaa3 100644 --- a/responses.go +++ b/responses.go @@ -57,7 +57,6 @@ type Client struct { cacheKey string usage *usageLog http *http.Client - clock func() time.Time } // Request is one model call. Input holds the input items in order, such as @@ -179,8 +178,7 @@ func newClient(url string, auth authorizer, cacheKey, usagePath string) *Client usage: &usageLog{ path: usagePath, }, - http: &http.Client{}, - clock: time.Now, + http: &http.Client{}, } } @@ -216,7 +214,7 @@ func (c *Client) Create(ctx context.Context, request Request) (Response, error) } record := usageRecord{ - Date: c.clock().Format(time.RFC3339Nano), + Date: time.Now().Format(time.RFC3339Nano), Model: request.Model, }