This commit is contained in:
user
2024-03-21 06:18:10 -05:00
parent b81682edf1
commit 235fb4288b

View File

@@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"github.com/gin-gonic/gin"
@@ -106,7 +106,7 @@ func (c *Controller) createChatCompletion(message string, model string) (string,
defer response.Body.Close()
// Read the response body
responseBody, err := ioutil.ReadAll(response.Body)
responseBody, err := io.ReadAll(response.Body)
if err != nil {
return "", fmt.Errorf("error reading response body: %v", err)
}