Documentation ¶
Index ¶
- Variables
- func BingCompleteChatHandler(c *gin.Context)
- func BingGenerateImageHandler(c *gin.Context)
- func BingImageCreateHandler(c *gin.Context)
- func BingImageUploadHandler(c *gin.Context)
- func BingStreamChatHandler(c *gin.Context)
- func GeminiCompleteChatHandler(c *gin.Context)
- func GeminiStreamChatHandler(c *gin.Context)
- func KimiCompleteChatHandler(c *gin.Context)
- func KimiStreamChatHandler(c *gin.Context)
- func ModelBasedDispatcher() gin.HandlerFunc
- type CreateConversationResponse
- type CreateConversationResult
- type GeminiChatStreamRequest
- type GeminiOpenAIChatCompletionRequest
- type GeminiOpenAIMessage
- type ImageUploadRequest
- type KimiChatStreamRequest
- type KimiOpenAIChatCompletionRequest
- type KimiOpenAIMessage
- type OpenAIChatCompletionRequest
- type OpenAIMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultCookies map[string]string Proxy string DefaultRefreshToken string DefaultAPIKey string )
View Source
var HandlerMap = map[string]gin.HandlerFunc{ "Creative": BingCompleteChatHandler, "Balanced": BingCompleteChatHandler, "Precise": BingCompleteChatHandler, "gpt-3.5-turbo": BingCompleteChatHandler, "kimi": KimiCompleteChatHandler, "gemini-pro": GeminiCompleteChatHandler, }
Functions ¶
func BingCompleteChatHandler ¶
func BingImageCreateHandler ¶
func BingImageUploadHandler ¶
func BingStreamChatHandler ¶
func GeminiStreamChatHandler ¶
func KimiCompleteChatHandler ¶
func KimiStreamChatHandler ¶
func ModelBasedDispatcher ¶
func ModelBasedDispatcher() gin.HandlerFunc
Types ¶
type CreateConversationResponse ¶
type CreateConversationResponse struct { ConversationId string `json:"conversationId"` ClientId string `json:"clientId"` Result CreateConversationResult `json:"result"` SecAccessToken string `json:"secAccessToken"` ConversationSignature string `json:"conversationSignature"` BearerToken string `json:"bearerToken"` }
type GeminiChatStreamRequest ¶
type GeminiOpenAIChatCompletionRequest ¶
type GeminiOpenAIChatCompletionRequest struct { Model string `json:"model"` Messages []GeminiOpenAIMessage `json:"messages"` Stream bool `json:"stream"` ToolChoice *interface{} `json:"tool_choice"` APIKey string `json:"refreshToken"` }
type GeminiOpenAIMessage ¶
type GeminiOpenAIMessage struct { Role string `json:"role"` Content interface{} `json:"content"` }
type ImageUploadRequest ¶
type ImageUploadRequest struct { Cookies string `form:"cookies"` File *multipart.FileHeader `form:"file"` }
type KimiChatStreamRequest ¶
type KimiOpenAIChatCompletionRequest ¶
type KimiOpenAIChatCompletionRequest struct { Model string `json:"model"` Messages []KimiOpenAIMessage `json:"messages"` Stream bool `json:"stream"` ToolChoice *interface{} `json:"tool_choice"` RefreshToken string `json:"refreshToken"` UseSearch *bool `json:"useSearch"` }
type KimiOpenAIMessage ¶
type KimiOpenAIMessage struct { Role string `json:"role"` Content interface{} `json:"content"` }
type OpenAIChatCompletionRequest ¶
type OpenAIChatCompletionRequest struct { Model string `json:"model"` Messages []OpenAIMessage `json:"messages"` Stream bool `json:"stream"` ToolChoice *interface{} `json:"tool_choice"` Conversation CreateConversationResponse `json:"conversation"` RefreshToken string `json:"refreshToken"` // Kimi UseSearch *bool `json:"useSearch"` // Kimi APIKey string `json:"apiKey"` // Gemini }
type OpenAIMessage ¶
type OpenAIMessage struct { Role string `json:"role"` Content interface{} `json:"content"` }
Click to show internal directories.
Click to hide internal directories.