mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-10-23 09:00:37 +00:00
Allow to set a SetLibrarySearchPath in the golang bindings (#981)
This is used to identify the path where all the various implementations are
This commit is contained in:
committed by
GitHub
parent
8953b7f6a6
commit
b004c53a7b
@@ -24,7 +24,8 @@ var DefaultModelOptions ModelOptions = ModelOptions{
|
||||
}
|
||||
|
||||
type ModelOptions struct {
|
||||
Threads int
|
||||
Threads int
|
||||
LibrarySearchPath string
|
||||
}
|
||||
type ModelOption func(p *ModelOptions)
|
||||
|
||||
@@ -100,6 +101,13 @@ func SetThreads(c int) ModelOption {
|
||||
}
|
||||
}
|
||||
|
||||
// SetLibrarySearchPath sets the dynamic libraries used by gpt4all for the various ggml implementations.
|
||||
func SetLibrarySearchPath(t string) ModelOption {
|
||||
return func(p *ModelOptions) {
|
||||
p.LibrarySearchPath = t
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new PredictOptions object with the given options.
|
||||
func NewModelOptions(opts ...ModelOption) ModelOptions {
|
||||
p := DefaultModelOptions
|
||||
|
Reference in New Issue
Block a user