1
0
mirror of https://github.com/fumiama/deepinfra.git synced 2026-07-01 18:20:28 +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

@@ -76,7 +76,7 @@ func (opai *OpenAI) OutputRaw() string {
return opai.Choices[len(opai.Choices)-1].Message.Content
}
func (opai *OpenAI) System(prompt string) *OpenAI {
func (opai *OpenAI) System(prompt string) Protocol {
opai.Messages = make([]Message, 1, 8)
opai.Messages[0] = Message{
Role: "system",
@@ -85,7 +85,7 @@ func (opai *OpenAI) System(prompt string) *OpenAI {
return opai
}
func (opai *OpenAI) User(prompt string) *OpenAI {
func (opai *OpenAI) User(prompt string) Protocol {
opai.Messages = append(opai.Messages, Message{
Role: "user",
Content: prompt,
@@ -93,7 +93,7 @@ func (opai *OpenAI) User(prompt string) *OpenAI {
return opai
}
func (opai *OpenAI) Assistant(prompt string) *OpenAI {
func (opai *OpenAI) Assistant(prompt string) Protocol {
opai.Messages = append(opai.Messages, Message{
Role: "assistant",
Content: prompt,