Documentation ¶
Index ¶
- func CreateChatHandler(options CreateChatHandlerOptions) egoTypes.FHRequestHandler
- func CreateDownloadHandler() egoTypes.FHRequestHandler
- func CreateGetApiKeySettingsHandler() egoTypes.FHRequestHandler
- func CreateGetSettingsHandler() egoTypes.FHRequestHandler
- func CreateUpdateSettingsHandler() egoTypes.FHRequestHandler
- type ChatRequest
- type ChatResponse
- type CreateChatHandlerOptions
- type GetApiKeySettingsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChatHandler ¶
func CreateChatHandler(options CreateChatHandlerOptions) egoTypes.FHRequestHandler
CreateChatHandler returns a fasthttp request handler that does a chat conversation using the given options.
func CreateDownloadHandler ¶ added in v0.8.0
func CreateDownloadHandler() egoTypes.FHRequestHandler
func CreateGetApiKeySettingsHandler ¶
func CreateGetApiKeySettingsHandler() egoTypes.FHRequestHandler
CreateGetApiKeySettingsHandler returns a handler function for getting API key settings.
func CreateGetSettingsHandler ¶
func CreateGetSettingsHandler() egoTypes.FHRequestHandler
CreateGetSettingsHandler returns a fasthttp request handler that retrieves the UI settings file.
func CreateUpdateSettingsHandler ¶
func CreateUpdateSettingsHandler() egoTypes.FHRequestHandler
CreateUpdateSettingsHandler returns a fasthttp request handler that updates the UI settings file.
Types ¶
type ChatRequest ¶
type ChatRequest struct { Conversation []string `json:"conversation"` // Conversation represents the conversation history of the chat request SystemPrompt string `json:"systemPrompt,omitempty"` // system prompt Temperature *float64 `json:"temperature"` // Temperature represents the temperature to use for generating the response }
ChatRequest represents a chat request data structure
type ChatResponse ¶
type ChatResponse struct { Answer string `json:"answer"` // Answer represents the answer to the chat request Time string `json:"time"` // Time represents the time at which the chat response is generated }
ChatResponse represents a chat response data structure
type CreateChatHandlerOptions ¶
type CreateChatHandlerOptions struct { CustomSystemPrompt string // CustomSystemPrompt represents the custom system prompt to use for generating the response DefaultTemperature float64 // DefaultTemperature represents the default temperature to use for generating the response NoAdditionalInfo bool // NoAdditionalInfo specifies whether to include additional information in the response NoSystemInfo bool // NoSystemInfo specifies whether to include system information in the response NoTime bool // NoTime specifies whether to include time in the response }
CreateChatHandlerOptions represents options for creating a chat handler
Click to show internal directories.
Click to hide internal directories.