1
0
mirror of https://github.com/fumiama/deepinfra.git synced 2026-06-30 01:30:29 +08:00

fix: protocol restriction

This commit is contained in:
源文雨
2025-02-22 01:16:25 +09:00
parent ed1290950d
commit 5a9f7c9000
2 changed files with 6 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ func (ollm *OLLaMA) OutputRaw() string {
return ollm.Message.Content
}
func (ollm *OLLaMA) System(prompt string) *OLLaMA {
func (ollm *OLLaMA) System(prompt string) Protocol {
ollm.Messages = make([]Message, 1, 8)
ollm.Messages[0] = Message{
Role: "system",
@@ -70,7 +70,7 @@ func (ollm *OLLaMA) System(prompt string) *OLLaMA {
return ollm
}
func (ollm *OLLaMA) User(prompt string) *OLLaMA {
func (ollm *OLLaMA) User(prompt string) Protocol {
ollm.Messages = append(ollm.Messages, Message{
Role: "user",
Content: prompt,
@@ -78,7 +78,7 @@ func (ollm *OLLaMA) User(prompt string) *OLLaMA {
return ollm
}
func (ollm *OLLaMA) Assistant(prompt string) *OLLaMA {
func (ollm *OLLaMA) Assistant(prompt string) Protocol {
ollm.Messages = append(ollm.Messages, Message{
Role: "assistant",
Content: prompt,