CoolFace
Apppublic

dvc890/go-chatgpt-api

sourceHugging Faceupdated 3y agoView on Hugging Face
1likes
constant.go36 linesDownload Raw Back to platform
1package platform2 3import "github.com/linweiyuan/go-chatgpt-api/api"4 5//goland:noinspection SpellCheckingInspection6const (7	apiUrl = "https://api.openai.com"8 9	apiListModels             = apiUrl + "/v1/models"10	apiRetrieveModel          = apiUrl + "/v1/models/%s"11	apiCreateCompletions      = apiUrl + "/v1/completions"12	apiCreataeChatCompletions = apiUrl + "/v1/chat/completions"13	apiCreateEdit             = apiUrl + "/v1/edits"14	apiCreateImage            = apiUrl + "/v1/images/generations"15	apiCreateEmbeddings       = apiUrl + "/v1/embeddings"16	apiListFiles              = apiUrl + "/v1/files"17	apiCreateModeration       = apiUrl + "/v1/moderations"18 19	apiGetCreditGrants = apiUrl + "/dashboard/billing/credit_grants"20	apiGetSubscription = apiUrl + "/dashboard/billing/subscription"21	apiGetApiKeys      = apiUrl + "/dashboard/user/api_keys"22 23	platformAuthClientID      = "DRivsnm2Mu42T3KOpqdtwB3NYviHYzwD"24	platformAuthAudience      = "https://api.openai.com/v1"25	platformAuthRedirectURL   = "https://platform.openai.com/auth/callback"26	platformAuthScope         = "openid profile email offline_access"27	platformAuthResponseType  = "code"28	platformAuthGrantType     = "authorization_code"29	platformAuth0Url          = api.Auth0Url + "/authorize?"30	getTokenUrl               = api.Auth0Url + "/oauth/token"31	auth0Client               = "eyJuYW1lIjoiYXV0aDAtc3BhLWpzIiwidmVyc2lvbiI6IjEuMjEuMCJ9" // '{"name":"auth0-spa-js","version":"1.21.0"}'32	auth0LogoutUrl            = api.Auth0Url + "/v2/logout?returnTo=https%3A%2F%2Fplatform.openai.com%2Floggedout&client_id=" + platformAuthClientID + "&auth0Client=" + auth0Client33	dashboardLoginUrl         = "https://api.openai.com/dashboard/onboarding/login"34	getSessionKeyErrorMessage = "Failed to get session key."35)36