mirror of
https://github.com/fumiama/deepinfra.git
synced 2026-06-28 08:40:29 +08:00
feat(model): add Cloner to Protocol
This commit is contained in:
@@ -188,3 +188,12 @@ func (opai *GenAI) Assistant(prompt ...Content) Protocol {
|
||||
})
|
||||
return opai
|
||||
}
|
||||
|
||||
func (opai *GenAI) Clone() Cloner {
|
||||
x := new(GenAI)
|
||||
*x = *opai
|
||||
x.SystemInstruction = nil
|
||||
x.Contents = nil
|
||||
x.Candidates = nil
|
||||
return x
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user