Update app.py
Browse files
app.py
CHANGED
|
@@ -76,8 +76,7 @@ def text_to_speech(input_text: TextInput):
|
|
| 76 |
@app.post("/chat/")
|
| 77 |
async def chat_with_llm(file: UploadFile = File(...)):
|
| 78 |
"""Process input WAV, send text to LLM, and return generated response as WAV."""
|
| 79 |
-
|
| 80 |
-
instance = ggwave.init()
|
| 81 |
# Read the file content into memory without saving to disk
|
| 82 |
file_content = await file.read()
|
| 83 |
|
|
@@ -151,8 +150,7 @@ async def continuous_chat(
|
|
| 151 |
chat_history: Optional[str] = Form(None)
|
| 152 |
):
|
| 153 |
"""Process input WAV with chat history, send text to LLM, and return response as WAV."""
|
| 154 |
-
|
| 155 |
-
#instance = ggwave.init()
|
| 156 |
|
| 157 |
# Parse chat history if provided
|
| 158 |
messages = [{"role": "system", "content": "you are a helpful assistant. answer always in one sentence"}]
|
|
|
|
| 76 |
@app.post("/chat/")
|
| 77 |
async def chat_with_llm(file: UploadFile = File(...)):
|
| 78 |
"""Process input WAV, send text to LLM, and return generated response as WAV."""
|
| 79 |
+
global instance
|
|
|
|
| 80 |
# Read the file content into memory without saving to disk
|
| 81 |
file_content = await file.read()
|
| 82 |
|
|
|
|
| 150 |
chat_history: Optional[str] = Form(None)
|
| 151 |
):
|
| 152 |
"""Process input WAV with chat history, send text to LLM, and return response as WAV."""
|
| 153 |
+
global instance
|
|
|
|
| 154 |
|
| 155 |
# Parse chat history if provided
|
| 156 |
messages = [{"role": "system", "content": "you are a helpful assistant. answer always in one sentence"}]
|