Add chat message role const (#111)
This commit is contained in:
7
chat.go
7
chat.go
@@ -8,6 +8,13 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Chat message role defined by the OpenAI API.
|
||||||
|
const (
|
||||||
|
ChatMessageRoleSystem = "system"
|
||||||
|
ChatMessageRoleUser = "user"
|
||||||
|
ChatMessageRoleAssistant = "assistant"
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrChatCompletionInvalidModel = errors.New("currently, only gpt-3.5-turbo and gpt-3.5-turbo-0301 are supported")
|
ErrChatCompletionInvalidModel = errors.New("currently, only gpt-3.5-turbo and gpt-3.5-turbo-0301 are supported")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user