Spaces:
Build error
Build error
Update main.py
Browse files74 unmodified lines757677787879808125 unmodified lines10710810911011011111211311411574 unmodified lines max_new_tokens = min(max_new_tokens, 29500 - len(input_text)) history = [] generated_response = generate(input_text, history, temperature, max_new_tokens, top_p, repetition_penalty) if input_data.telegramChatId != '' && input_data.telegramUrlBot != '' && input_data.telegramUrlPost != '': if input_data.telegramChatId != '' and input_data.telegramUrlBot != '' and input_data.telegramUrlPost != '': call_telegram_api(input_data, generated_response) LoggaTesto("RISPOSTA", {"response": generated_response}) return {"response": generated_response}25 unmodified lines "telegramUrl": input_data.telegramUrlBot } response = requests.post(input_data.telegramUrlPost, json=payload) if response.status_code != 200: if response.status_code == 200: print("Invio messaggio TELEGRAM") else: print("Errore nella richiesta POST. Codice di stato:", response.status_code)
def generate_input_text(input_data):main.py+4-2