Estructura para funciones, fix bug de encoding, mensajes normales#1
Open
LeonelAlcazar wants to merge 1 commit intoringa-tech:mainfrom
Open
Estructura para funciones, fix bug de encoding, mensajes normales#1LeonelAlcazar wants to merge 1 commit intoringa-tech:mainfrom
LeonelAlcazar wants to merge 1 commit intoringa-tech:mainfrom
Conversation
…sponder mensajes no correspondientes a ninguna orden
Owner
|
Le quitaste lo malhablado jajaja, gracias, hay cosas seguras como la parte de webm, agregar el nocache, y en general separarlo en componentes más abstractos/agnósticos de comandos me gusta. Lo revisaré con más detalle en cuanto pueda |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deberia estar mas separado, pero me deje llevar editando el codigo.
Nuevas features:
Estructura unica de funciones para que sea mas dinamico el agregado de nuevas
ejemplo
Aca definimos una clase que sera nuestra funcion para gpt, en su constructor definimos sus propiedades basicas y tiene una funcion "execute" que, valga redundancia, ejecuta la funcion con los parametros
Luego esta funcion se agrega al modelo en el array "functions" en el archivo app.py
Agregue 4 funciones, ejecutar un comando, ejecutar una sequencia de comandos, crear un archivo con contenido y decir algo
La funcion de decir algo realmente no la reconocio bien gpt asi que decidi agregar la funcionalidad de responder como chatgpt normal en caso de no llamar a ninguna funcion
Fix:
Cuando el frontend manda el blob del audio, el servidor lo guarda como un .mp3 y este no tiene una codificacion .mp3, esta incongruencia producia un error al mandar el archivo a whisper. Se arreglo definiendo explicitamente la codificacion del audio (audio/webm) y a la hora de guardar el audio, guardarlo como .webm