Documentation
¶
Index ¶
- Constants
- func ImageData(files ...string) (response []string, err error)
- type ModelEntity
- type OllamaApiOptions
- type OllamaCLIResponse
- func (instance *OllamaCLIResponse) GetContext() []int
- func (instance *OllamaCLIResponse) GetError() (err error)
- func (instance *OllamaCLIResponse) GetPromptResponse() (response string)
- func (instance *OllamaCLIResponse) GetPromptResponseFormatted(format string) (response interface{})
- func (instance *OllamaCLIResponse) GetResponse() (response interface{})
- func (instance *OllamaCLIResponse) GetResponseAsMap() (response map[string]interface{})
- func (instance *OllamaCLIResponse) GetUid() string
- func (instance *OllamaCLIResponse) HasError() bool
- func (instance *OllamaCLIResponse) Map() map[string]interface{}
- func (instance *OllamaCLIResponse) SetError(err error) *OllamaCLIResponse
- func (instance *OllamaCLIResponse) SetResponse(value interface{}) *OllamaCLIResponse
- func (instance *OllamaCLIResponse) String() string
- func (instance *OllamaCLIResponse) Usage() map[string]interface{}
- type OllamaOptions
Constants ¶
View Source
const ( OllamaExec = "ollama" OllamaRoot = "{{dir_user}}/.ollama/" OllamaHost = "http://127.0.0.1:11434/" DefaultModel = "llama3.2" DefaultModelTools = "llama3.2" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ModelEntity ¶
type ModelEntity struct {
Name string `json:"name"`
Version string `json:"version"`
Id string `json:"id"`
Size string `json:"size"`
Modified string `json:"last_update"`
}
ModelEntity represents a model with its name, version, unique identifier, size, and last modification date.
func NewModelEntity ¶
func NewModelEntity(args ...interface{}) (instance *ModelEntity, err error)
func (*ModelEntity) FullName ¶
func (instance *ModelEntity) FullName() (response string)
type OllamaApiOptions ¶
type OllamaApiOptions struct {
Host string `json:"host"` // url
}
type OllamaCLIResponse ¶
type OllamaCLIResponse struct {
// contains filtered or unexported fields
}
func NewOllamaCLIResponse ¶
func NewOllamaCLIResponse() (instance *OllamaCLIResponse)
func NewOllamaCLIResponseError ¶
func NewOllamaCLIResponseError(err error) (instance *OllamaCLIResponse)
func (*OllamaCLIResponse) GetContext ¶
func (instance *OllamaCLIResponse) GetContext() []int
func (*OllamaCLIResponse) GetError ¶
func (instance *OllamaCLIResponse) GetError() (err error)
func (*OllamaCLIResponse) GetPromptResponse ¶
func (instance *OllamaCLIResponse) GetPromptResponse() (response string)
func (*OllamaCLIResponse) GetPromptResponseFormatted ¶
func (instance *OllamaCLIResponse) GetPromptResponseFormatted(format string) (response interface{})
func (*OllamaCLIResponse) GetResponse ¶
func (instance *OllamaCLIResponse) GetResponse() (response interface{})
func (*OllamaCLIResponse) GetResponseAsMap ¶
func (instance *OllamaCLIResponse) GetResponseAsMap() (response map[string]interface{})
func (*OllamaCLIResponse) GetUid ¶
func (instance *OllamaCLIResponse) GetUid() string
func (*OllamaCLIResponse) HasError ¶
func (instance *OllamaCLIResponse) HasError() bool
func (*OllamaCLIResponse) Map ¶
func (instance *OllamaCLIResponse) Map() map[string]interface{}
func (*OllamaCLIResponse) SetError ¶
func (instance *OllamaCLIResponse) SetError(err error) *OllamaCLIResponse
func (*OllamaCLIResponse) SetResponse ¶
func (instance *OllamaCLIResponse) SetResponse(value interface{}) *OllamaCLIResponse
func (*OllamaCLIResponse) String ¶
func (instance *OllamaCLIResponse) String() string
func (*OllamaCLIResponse) Usage ¶
func (instance *OllamaCLIResponse) Usage() map[string]interface{}
type OllamaOptions ¶
type OllamaOptions struct {
DriverOptions *llm_commons.LLMDriverOptions `json:"-"`
Api *OllamaApiOptions `json:"api"`
}
func NewOllamaOptions ¶
func NewOllamaOptions() (instance *OllamaOptions)
func (*OllamaOptions) Map ¶
func (instance *OllamaOptions) Map() (response map[string]interface{})
func (*OllamaOptions) String ¶
func (instance *OllamaOptions) String() (response string)
Click to show internal directories.
Click to hide internal directories.