Documentation ¶
Index ¶
- Variables
- func AskAI(guiApp fyne.App, client *api.Client, inputForPrompt string) (api.GenerateResponse, error)
- func AskAIToTranslate(guiApp fyne.App, client *api.Client, inputForPrompt string, ...) (api.GenerateResponse, error)
- func AskAIWithContext(guiApp fyne.App, client *api.Client, msgContext []int, inputForPrompt string) (api.GenerateResponse, error)
- func AskAIWithPromptMsg(guiApp fyne.App, client *api.Client, prompt PromptMsg, inputForPrompt string) (api.GenerateResponse, error)
- func AskAiWithPromptAndContext(guiApp fyne.App, client *api.Client, msgContext []int, prompt PromptMsg) (api.GenerateResponse, error)
- func AskAiWithStringAndContext(guiApp fyne.App, client *api.Client, msgContext []int, prompt string) (api.GenerateResponse, error)
- func CheckOllamaConnection(guiApp fyne.App, ollamaClient *ollamaApi.Client, ollamaURL *string) *ollamaApi.Client
- func ConnectToOllama() *ollama.Client
- func ConnectToOllamaWithURL(rawURL string) *ollama.Client
- func FindModel(ctx context.Context, client *ollama.Client, model string) (bool, error)
- func InstallOrUpdateOllama()
- func InstallOrUpdateOllamaWindow(guiApp fyne.App, ollamaClient *ollamaApi.Client)
- func PullModel(guiApp fyne.App, client *api.Client, pf api.PullProgressFunc, update bool) error
- type Language
- type ModelName
- type PromptMsg
- type PromptText
Constants ¶
This section is empty.
Variables ¶
View Source
var MemoryUsage = map[ModelName]bytesize.ByteSize{ CodeLlama: 5077 * bytesize.MB, CodeLlama13b: 9055 * bytesize.MB, CodeGemma: 6489 * bytesize.MB, DeepSeekCoder: 1478 * bytesize.MB, DeepSeekCoderV2: 9462 * bytesize.MB, Gemma: 6490 * bytesize.MB, Gemma2b: 2321 * bytesize.MB, Gemma2: 6683 * bytesize.MB, Gemma22B: 2321 * bytesize.MB, Llama3: 4980 * bytesize.MB, Llama3Dot1: 6354 * bytesize.MB, Mistral: 4615 * bytesize.MB, Phi3: 3269 * bytesize.MB, }
MemoryUsage Memory usage in MB
View Source
var PromptToText = map[PromptMsg]PromptText{ CorrectGrammar: { // contains filtered or unexported fields }, MakeItFriendly: { // contains filtered or unexported fields }, MakeItAList: { // contains filtered or unexported fields }, MakeItProfessional: { // contains filtered or unexported fields }, MakeHeadline: { // contains filtered or unexported fields }, MakeASummary: { // contains filtered or unexported fields }, MakeExplanation: { // contains filtered or unexported fields }, MakeExpanded: { // contains filtered or unexported fields }, TryAgain: { // contains filtered or unexported fields }, MakeItFriendlyRedo: { // contains filtered or unexported fields }, MakeItProfessionalRedo: { // contains filtered or unexported fields }, MakeItAListRedo: { // contains filtered or unexported fields }, }
Functions ¶
func AskAIToTranslate ¶
func AskAIWithContext ¶ added in v0.1.0
func AskAIWithPromptMsg ¶
func AskAiWithPromptAndContext ¶ added in v0.1.0
func AskAiWithStringAndContext ¶ added in v0.0.9
func CheckOllamaConnection ¶ added in v0.1.0
func ConnectToOllama ¶
func ConnectToOllamaWithURL ¶ added in v0.0.9
func InstallOrUpdateOllama ¶ added in v0.0.9
func InstallOrUpdateOllama()
func InstallOrUpdateOllamaWindow ¶ added in v0.1.0
Types ¶
type Language ¶
type Language string
const ( Arabic Language = "Arabic" Chinese Language = "Chinese" English Language = "English" French Language = "French" German Language = "German" Italian Language = "Italian" Japanese Language = "Japanese" Portuguese Language = "Portuguese" Russian Language = "Russian" Spanish Language = "Spanish" Turkish Language = "Turkish" )
type ModelName ¶
type ModelName int
const ( Llama3Dot1 ModelName = iota // llama3.1:latest CodeLlama // codellama:latest CodeLlama13b // codellama:13b CodeGemma // codegemma:7b DeepSeekCoder // deepseek-coder:latest DeepSeekCoderV2 // deepseek-coder-v2:latest Gemma // gemma:latest Gemma2b // gemma:2b Gemma2 // gemma2:latest Gemma22B // gemma2:2b Llama3 // llama3:latest Llava // llava:latest Mistral // mistral:latest Phi3 // phi3:latest )
func GetActiveModel ¶ added in v0.1.0
func GetActiveModel(guiApp fyne.App) ModelName
func StringToModel ¶ added in v0.1.0
type PromptMsg ¶
type PromptMsg int
const ( CorrectGrammar PromptMsg = iota // Correct Grammar MakeItAList // Make it a List MakeItFriendly // Make it Friendly MakeItProfessional // Make it Professional MakeASummary // Make a Summary MakeExplanation // Explain it like I'm 5 MakeExpanded // Expand on the text MakeHeadline // Make a Headline TryAgain // Try Again MakeItFriendlyRedo // Make it Friendly MakeItProfessionalRedo // Make it Professional MakeItAListRedo // Make it a List )
func (PromptMsg) PromptExtraToText ¶
func (PromptMsg) PromptToText ¶
type PromptText ¶
type PromptText struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.