response

package
v0.0.0-...-1c246ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServicePromGPT

type ServicePromGPT struct {
	Model       string  `json:"model"`
	Temperature float64 `json:"temperature"`
	Usage       Usage   `json:"usage"`
	Content     string  `json:"content"`
}

type ServicePromGPTResponse

type ServicePromGPTResponse struct {
	Code    int            `json:"code"`
	Message string         `json:"message"`
	Payload ServicePromGPT `json:"payload"`
}

type Token

type Token struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type TokenResponse

type TokenResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Payload Token
}

func NewTokenResponse

func NewTokenResponse(token string, refreshToken string) *TokenResponse

type Usage

type Usage struct {
	CompletionTokens int `json:"completion_tokens"`
	PromptTokens     int `json:"prompt_tokens"`
	TotalTokens      int `json:"total_tokens"`
}

type UserAuth

type UserAuth struct {
	AuthURL string `json:"auth_url"`
}

type UserAuthResponse

type UserAuthResponse struct {
	Code    int      `json:"code"`
	Message string   `json:"message"`
	Payload UserAuth `json:"payload"`
}

func NewAuthResponse

func NewAuthResponse(authUrl string) *UserAuthResponse

type UserMe

type UserMe struct {
	Issuer     string    `json:"issuer"`
	UserID     string    `json:"user_id"`
	Email      string    `json:"email"`
	Name       string    `json:"name"`
	Picture    string    `json:"picture"`
	ExpiresAt  time.Time `json:"expires_at"`
	TokenLimit int       `json:"token_limit"`
	TokenUsage int       `json:"token_usage"`
	Warning    bool      `json:"warning"`
}

type UserMeResponse

type UserMeResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Payload UserMe `json:"payload"`
}

func NewUserMeResponse

func NewUserMeResponse(v authguard.JwtClaims, tokenInfo core.UserTokenUsage) *UserMeResponse

type UserPromGPT

type UserPromGPT struct {
	Content string `json:"content"`
}

type UserPromGPTResponse

type UserPromGPTResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Payload UserPromGPT `json:"payload"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL