Update chat model initialization in main.py to use "qwen-qwq-32b" and add a new ping function in ping.gs for testing the chatbot API response.
ec59be7
| function pingChatbot() { | |
| // Your FastAPI endpoint URL | |
| var url = "https://amanm10000-mlsc-coherence-25-faq-chatbot-api.hf.space/chat"; | |
| // Create query parameters | |
| var params = { | |
| "question": "Who are the sponsors baby?" | |
| }; | |
| // Build URL with query parameters | |
| var queryString = Object.keys(params) | |
| .map(key => key + '=' + encodeURIComponent(params[key])) | |
| .join('&'); | |
| var fullUrl = url + '?' + queryString; | |
| // Request options | |
| var options = { | |
| "method": "get", | |
| "muteHttpExceptions": true | |
| }; | |
| try { | |
| // Make the request | |
| var response = UrlFetchApp.fetch(fullUrl, options); | |
| // Get response code and content | |
| var responseCode = response.getResponseCode(); | |
| var responseText = response.getContentText(); | |
| // Log the response | |
| Logger.log("Response Code: " + responseCode); | |
| Logger.log("Response: " + responseText); | |
| return responseText; | |
| } catch (error) { | |
| Logger.log("Error: " + error.toString()); | |
| return "Error: " + error.toString(); | |
| } | |
| } |