You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @OvidijusParsiunas ! First off thanks for the great package! I'm running on a little issue though.
I've implemented the deep-chat component on my Vue 3 app, as follows:
On my frontend request it seems like the audio format is fine, but when I save it on my back-end (running locally) even though the extension shows as .mp3, if I upload the downloaded file into a file type checking website, it shows video/webm:
Which is also why my request to transcribe the audio file to ChatGPT isn't working with the downloaded file.
On my server side, utilizing Golang, nothing seems odd and I'm testing it pretty straightforward:
func GenerateChatCompletion(c *gin.Context) {
isAudioMessage := false
audioTranscription := ""
// try to get formData files from the request
files, header, _ := c.Request.FormFile("files")
// if has files, save it and return the path
if files != nil {
isAudioMessage = true
fileName := header.Filename
// print header content-type
print("Content-Type: ", header.Header.Get("Content-Type"), "\n")
// File path
var filePath string
if os.Getenv("AWS_LAMBDA_RUNTIME_API") == "" {
// Save the file to ./files directory
filePath = filepath.Join("./files", fileName)
destFile, err := os.Create(filePath)
if err != nil {
c.JSON(500, gin.H{
"error": true,
"data": nil,
"message": "Failed to create file: " + err.Error(),
"code": 500,
})
return
}
defer destFile.Close()
}
Program ends after that with the file saved, but with video/webm MIME type though.
The text was updated successfully, but these errors were encountered:
Hello @OvidijusParsiunas ! First off thanks for the great package! I'm running on a little issue though.
I've implemented the deep-chat component on my Vue 3 app, as follows:
<deep-chat
ref="deepChat"
style="width: 100%; height: 100%"
:audio=true
:connect="chatConnection"
:avatars="avatars"
:textInput="textInputStyle"
:submitButtonStyles="submitButtonStyles"
:messageStyles="messageStyles"
:requestInterceptor="requestInterceptor"
:microphone="microphoneStyles"
:history="chatHistory"
@message="formatSpecificMessage"
>
On my frontend request it seems like the audio format is fine, but when I save it on my back-end (running locally) even though the extension shows as .mp3, if I upload the downloaded file into a file type checking website, it shows video/webm:
Which is also why my request to transcribe the audio file to ChatGPT isn't working with the downloaded file.
On my server side, utilizing Golang, nothing seems odd and I'm testing it pretty straightforward:
func GenerateChatCompletion(c *gin.Context) {
isAudioMessage := false
audioTranscription := ""
// try to get formData files from the request
files, header, _ := c.Request.FormFile("files")
// if has files, save it and return the path
if files != nil {
isAudioMessage = true
fileName := header.Filename
Program ends after that with the file saved, but with video/webm MIME type though.
The text was updated successfully, but these errors were encountered: