MCPcopy Create free account

hub / github.com/dariubs/goAI / functions

Functions50 in github.com/dariubs/goAI

↓ 7 callersFunctionregister
register registers a provider factory
client.go:46
↓ 1 callersMethodchat
chat sends a prompt to the LLM and returns the response
client.go:28
↓ 1 callersFunctiondefaultOptions
defaultOptions returns default options
options.go:20
MethodChat
Chat sends a prompt to the LLM and returns the response The context can be used to set timeouts or cancel the request. Example: ctx, cancel := conte
client.go:98
MethodError
Error implements the error interface
errors.go:17
FunctionListProviders
ListProviders returns a list of all registered provider names
client.go:107
FunctionNew
New creates a new LLM client Example: client := goai.New("openai", "gpt-4o", goai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), )
client.go:58
MethodUnwrap
Unwrap returns the underlying error
errors.go:25
FunctionWithAPIKey
WithAPIKey sets the API key for the provider Example: client := goai.New("openai", "gpt-4o", goai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), )
options.go:34
FunctionWithEndpoint
WithEndpoint sets a custom API endpoint Example: client := goai.New("openai", "gpt-4o", goai.WithAPIKey(apiKey), goai.WithEndpoint("https://api.opena
options.go:47
FunctionWithMaxTokens
WithMaxTokens sets the maximum number of tokens in the response Example: client := goai.New("openai", "gpt-4o", goai.WithAPIKey(apiKey), goai.WithMax
options.go:73
FunctionWithTemperature
WithTemperature sets the temperature for response generation Temperature controls randomness: 0.0 is deterministic, higher values are more random. E
options.go:88
FunctionWithTimeout
WithTimeout sets the timeout for API requests Example: client := goai.New("openai", "gpt-4o", goai.WithAPIKey(apiKey), goai.WithTimeout(30*time.Secon
options.go:60
Methodchat
chat sends a prompt to Mistral and returns the response
mistral.go:43
Methodchat
chat sends a prompt to Perplexity and returns the response
perplexity.go:43
Methodchat
chat sends a prompt to Ollama and returns the response
ollama.go:41
Methodchat
chat sends a prompt to Anthropic and returns the response
anthropic.go:43
Methodchat
chat sends a prompt to xAI and returns the response
xai.go:43
Methodchat
chat sends a prompt to Google Gemini and returns the response
google.go:44
Methodchat
chat sends a prompt to OpenAI and returns the response
openai.go:43
Functioninit
()
mistral.go:13
Functioninit
()
perplexity.go:13
Functioninit
()
ollama.go:13
Functioninit
()
anthropic.go:13
Functioninit
()
xai.go:13
Functioninit
()
google.go:13
Functioninit
()
openai.go:13
Methodmodel
model returns the model identifier
mistral.go:147
Methodmodel
model returns the model identifier
perplexity.go:147
Methodmodel
model returns the model identifier
ollama.go:143
Methodmodel
model returns the model identifier
anthropic.go:146
Methodmodel
model returns the model identifier
xai.go:147
Methodmodel
model returns the model identifier
google.go:154
Methodmodel
model returns the model identifier
client.go:34
Methodmodel
model returns the model identifier
openai.go:147
Methodname
name returns the provider name
mistral.go:142
Methodname
name returns the provider name
perplexity.go:142
Methodname
name returns the provider name
ollama.go:138
Methodname
name returns the provider name
anthropic.go:141
Methodname
name returns the provider name
xai.go:142
Methodname
name returns the provider name
google.go:149
Methodname
name returns the provider name
client.go:31
Methodname
name returns the provider name
openai.go:142
FunctionnewAnthropicProvider
newAnthropicProvider creates a new Anthropic provider
anthropic.go:25
FunctionnewGoogleProvider
newGoogleProvider creates a new Google provider
google.go:25
FunctionnewMistralProvider
newMistralProvider creates a new Mistral provider
mistral.go:25
FunctionnewOllamaProvider
newOllamaProvider creates a new Ollama provider
ollama.go:24
FunctionnewOpenAIProvider
newOpenAIProvider creates a new OpenAI provider
openai.go:25
FunctionnewPerplexityProvider
newPerplexityProvider creates a new Perplexity provider
perplexity.go:25
FunctionnewXAIProvider
newXAIProvider creates a new xAI provider
xai.go:25