mirror of
https://github.com/fumiama/deepinfra.git
synced 2026-06-27 08:10:28 +08:00
feat(model): add Cloner to Protocol
This commit is contained in:
@@ -155,3 +155,11 @@ func (opai *OpenAI) User(prompt ...Content) Protocol {
|
||||
func (opai *OpenAI) Assistant(prompt ...Content) Protocol {
|
||||
return opai.normal("assistant", prompt...)
|
||||
}
|
||||
|
||||
func (opai *OpenAI) Clone() Cloner {
|
||||
x := new(OpenAI)
|
||||
*x = *opai
|
||||
x.Choices = nil
|
||||
x.Messages = nil
|
||||
return x
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user