Made the NewContext method private

pull/384/head
David Thorpe 3 years ago
parent 8c5ae594ef
commit 9513ed3ba0

@ -24,7 +24,7 @@ var _ Context = (*context)(nil)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// LIFECYCLE // LIFECYCLE
func NewContext(model *model, params whisper.Params) (Context, error) { func newContext(model *model, params whisper.Params) (Context, error) {
context := new(context) context := new(context)
context.model = model context.model = model
context.params = params context.params = params

@ -91,5 +91,5 @@ func (model *model) NewContext() (Context, error) {
params.SetThreads(runtime.NumCPU()) params.SetThreads(runtime.NumCPU())
// Return new context // Return new context
return NewContext(model, params) return newContext(model, params)
} }

Loading…
Cancel
Save