discovery

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOllamaInstalled

func CheckOllamaInstalled() bool

CheckOllamaInstalled checks if the Ollama CLI is installed and runnable.

func GetAnthropicModels

func GetAnthropicModels() []string

GetAnthropicModels returns a hardcoded list of known Anthropic models.

func GetAvailableModels

func GetAvailableModels(providerName string, apiKey string) ([]string, error)

GetAvailableModels retrieves the list of available models for a given provider. For providers like OpenAI and Ollama, it requires the API key or connection. For others, it returns a hardcoded list.

func GetDeepseekModels

func GetDeepseekModels() []string

GetDeepseekModels returns a hardcoded list of known Deepseek models.

func GetGoogleModels

func GetGoogleModels() []string

GetGoogleModels returns a hardcoded list of known Google models.

func GetOpenAIModels

func GetOpenAIModels(apiKey string) ([]string, error)

GetOpenAIModels fetches the list of available models from the OpenAI API.

func GetXAIModels

func GetXAIModels() []string

GetXAIModels returns a hardcoded list of known X.AI models.

Types

type OllamaModel

type OllamaModel struct {
	Name    string `json:"name"`
	ModTime string `json:"modified_at"`
	Size    int64  `json:"size"`
}

OllamaModel represents the structure of a model returned by the Ollama API

func GetOllamaModels

func GetOllamaModels() ([]OllamaModel, error)

GetOllamaModels fetches the list of locally available models from the Ollama API.

Jump to

Keyboard shortcuts

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