X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/02cdaff8be27f37f44db8892bb12554f2d702323..b94f6248bfaa989d4da6b0980648be20bf5a07d2:/model.go diff --git a/model.go b/model.go index bd1258b..3f3eccd 100644 --- a/model.go +++ b/model.go @@ -54,7 +54,7 @@ func modelEndpoint(config Config, dir string) (string, ModelAuthorizer, error) { return modelAPIURL, ModelAPIKey(key), nil } - return modelChatGPTURL, newChatGPTAuth(filepath.Join(dir, tokenFileName), authIssuer), nil + return modelChatGPTURL, newChatGPTAuth(filepath.Join(dir, chatgptTokenFileName), chatgptIssuer), nil } // newModelClient returns a client for the Responses endpoint at url. It records @@ -202,7 +202,7 @@ func (c *ModelClient) Create(ctx context.Context, request ModelRequest) (ModelRe return ModelResponse{}, fmt.Errorf("authorize model call: %w", err) } - _, chatgpt := c.auth.(*chatgptAuth) + _, chatgpt := c.auth.(*ChatGPTAuth) if chatgpt { httpRequest.Header.Set("session_id", c.cacheKey) }