feat(chat): support function call api (#369)
* feat(chat): support function call api * rename struct & add const ChatMessageRoleFunction
This commit is contained in:
@@ -40,7 +40,7 @@ func (c *Client) CreateChatCompletionStream(
|
||||
ctx context.Context,
|
||||
request ChatCompletionRequest,
|
||||
) (stream *ChatCompletionStream, err error) {
|
||||
urlSuffix := "/chat/completions"
|
||||
urlSuffix := chatCompletionsSuffix
|
||||
if !checkEndpointSupportsModel(urlSuffix, request.Model) {
|
||||
err = ErrChatCompletionInvalidModel
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user