Send temperature settings to server
(self, token_temp=None, categorical_temp=None, gaussian_temp=None, echo_testing = False)
| 26 | self.output_queue = queue.Queue() |
| 27 | |
| 28 | def set_temperature_and_echo(self, token_temp=None, categorical_temp=None, gaussian_temp=None, echo_testing = False): |
| 29 | """Send temperature settings to server""" |
| 30 | params = {} |
| 31 | if token_temp is not None: |
| 32 | params['token_temp'] = token_temp |
| 33 | if categorical_temp is not None: |
| 34 | params['categorical_temp'] = categorical_temp |
| 35 | if gaussian_temp is not None: |
| 36 | params['gaussian_temp'] = gaussian_temp |
| 37 | |
| 38 | response = requests.post(f"{self.base_url}/set_temperature", params=params) |
| 39 | print(response.json()['message']) |
| 40 | |
| 41 | def audio_callback(self, indata, frames, time, status): |
| 42 | """This is called for each audio block""" |