Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrOk = 2000 ErrUnknown = 5000 ErrInput = 4000 ErrAuthFailed = 4011 ErrRefreshFailed = 4012 )
View Source
const (
OpenAiMessageEnding = "[DONE]"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeReqFromClient ¶
type AuthorizeReqToOAuth ¶
type AuthorizeReqToOAuth struct { ClientInfo AuthorizeReqFromClient }
type ChatReqFromClient ¶
type ClientInfo ¶
type CommonResp ¶
type OpenAiChoice ¶
type OpenAiChoice struct { Index int `json:"index"` Delta *OpenAiMessage `json:"delta"` Logprobs interface{} `json:"logprobs"` FinishReason string `json:"finish_reason"` }
type OpenAiMessage ¶
type OpenAiReqFromClient ¶
type OpenAiReqFromClient struct { ModelId int SessionId string Messages []OpenAiMessage }
type OpenAiReqToOpenAi ¶
type OpenAiReqToOpenAi struct { Model string `json:"model"` Messages []OpenAiMessage `json:"messages"` Stream bool `json:"stream"` }
type OpenAiResp ¶
type QuickRefreshReq ¶
type QuickRefreshReq struct {
Action string `json:"action"`
}
type RefreshReqToOAuth ¶
type RefreshReqToOAuth struct { ClientInfo RefreshToken string `json:"refreshToken"` }
type RespFromOAuth ¶
type VerifyResp ¶
type VerifyResp struct { CommonResp Models []*dal.Model `json:"models"` }
Click to show internal directories.
Click to hide internal directories.