Skip to content

Commit

Permalink
Merge pull request #25 from otiai10/develop
Browse files Browse the repository at this point in the history
Add shorthand func to construct assistant message
  • Loading branch information
otiai10 committed Jul 9, 2023
2 parents cbc5236 + 141255c commit 55062f1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chatgpt/chatgpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,12 @@ func System(message string) Message {
},
}
}

func Assistant(message string) Message {
return Message{
Message: openaigo.Message{
Role: "assistant",
Content: message,
},
}
}

0 comments on commit 55062f1

Please sign in to comment.