X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/cb514b662bcf9d90b2cf02789c989f777d774d3f..900ec0e7dad7a913190fcef9016e53495de9bdf8:/model.go diff --git a/model.go b/model.go index 61dbc58..7c85643 100644 --- a/model.go +++ b/model.go @@ -168,6 +168,16 @@ func (c *ModelClient) LimitReached() bool { return c.limit > 0 && c.calls.Load() >= c.limit } +// CallLimit returns the configured call limit, or zero for no limit. +func (c *ModelClient) CallLimit() int64 { + return c.limit +} + +// UsagePath returns the file that records the calls of this client. +func (c *ModelClient) UsagePath() string { + return c.usage.path +} + // Create sends the call and reads its event stream to the end. Over the call // limit it sends nothing and returns errModelCallLimit. func (c *ModelClient) Create(ctx context.Context, request ModelRequest) (ModelResponse, error) {