Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'llm_response_interval' #229

Open
steventangbc opened this issue Jun 3, 2024 · 9 comments
Open

KeyError: 'llm_response_interval' #229

steventangbc opened this issue Jun 3, 2024 · 9 comments

Comments

@steventangbc
Copy link

I was able to run the app before but it seems like recent changes have made it stop working.

C:\Users\Alyssa\Documents\transcribe\app\transcribe>python main.py
Directory 'C:\Users\Alyssa\AppData\Roaming\viveku\Transcribe\/logs' already exists.
[INFO] Using default microphone.
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
[INFO] Completed ambient noise adjustment for Default Mic.
[INFO] Using default speaker.
[INFO] Listening to sound from Speaker: #25 - Headphones (Bose QC Headphones) [Loopback]
[INFO] Speech To Text - Whisper using GPU: True
Traceback (most recent call last):
  File "C:\Users\Alyssa\Documents\transcribe\app\transcribe\main.py", line 77, in <module>
    main()
  File "C:\Users\Alyssa\Documents\transcribe\app\transcribe\main.py", line 64, in main
    aui = AppUI(config=config)
          ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Alyssa\Documents\transcribe\app\transcribe\appui.py", line 41, in __init__
    self.create_ui_components(config=config)
  File "C:\Users\Alyssa\Documents\transcribe\app\transcribe\appui.py", line 143, in create_ui_components
    self.update_interval_slider.set(config['General']['llm_response_interval'])
                                    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'llm_response_interval'

C:\Users\Alyssa\Documents\transcribe\app\transcribe>
@mang0sw33t
Copy link
Collaborator

Please elaborate what you mean by recent changes have made it stop working.
The latest version of the app while running using latest code in Github does not have this issue, at least not in my environment.

If you are running at a specific git version besides the latest version, please provide further details.
Also please share the file parameters.yaml, override.yaml.
The issue seems to be that the parameter llm_response_interval is not correctly defined in parameters.
For an accurate definition of this parameter see this link -

llm_response_interval: 10

Please note that spaces are important in the yaml file.

@steventangbc
Copy link
Author

Initially, I thought the recent UI update changed several variable names. But after reading your reply, I realized that I have been using an older parameters.yaml file because it contained my model and prompt preferences. I hadn't notice that new variables like llm_response_interval were added. When using the parameters.yaml file from the latest version, I am able to run the app successfully again. (I would share the files requested, but the latest files I am using contain all default values and my API key which I wish to redact.)

This led to another problem however. I am not receiving any replies or inference and there are no error messages in the command line.

image

@steventangbc
Copy link
Author

The latest working version with inference that I tried was 7f66a2b, presumably before the UI update.

image

@mang0sw33t
Copy link
Collaborator

The recommended workflow for changing parameters is to use override.yaml file. Out of the box, override.yaml file is empty.
Any parameters that need to be altered in parameters,yaml should be added to override.yaml in the same section, with the same parameter name.

E.g. If you want to change the parameter llm_response_interval to a different value add the following section to it

General:
  llm_response_interval: 20

Based on the description, I am fairly certain issue is in parameters.yaml file.
Recommended next steps are

  • Compare the default parameters.yaml file to your copy of parameters.yaml file
  • Any differences in the two can be added to override.yaml.
  • Restore the default parameters.yaml file

@steventangbc
Copy link
Author

I followed your recommended steps and only modified override.yaml with the differences while restoring parameters.yaml to the default file. However, I still am not getting any responses. Also, is the new UI supposed to be missing the old buttons like "Suggest Responses Continuously" and "Suggest Response Now"?

image

@mang0sw33t
Copy link
Collaborator

is the new UI supposed to be missing the old buttons like "Suggest Responses Continuously" and "Suggest Response Now"?

Seems like the application is not completely visible at the moment. Increase the size of the window, both in width and height and you will see the complete application.

@steventangbc
Copy link
Author

Increasing the size of the window revealed all of the buttons. Many thanks! A suggestion I have is to make each section of the UI resizable and responsive so that on all screen sizes, the relevant information can be displayed according to preference.

@mang0sw33t
Copy link
Collaborator

make each section of the UI resizable and responsive so that on all screen sizes, the relevant information can be displayed according to preference

Great suggestion.
We need a tcl UI expert to help us achieve that.

@GuinanGuo
Copy link

make each section of the UI resizable and responsive so that on all screen sizes, the relevant information can be displayed according to preference

Great suggestion. We need a tcl UI expert to help us achieve that.
Hi bro
1,Has the issue of the UI not automatically displaying all buttons been resolved?
2,I would like to ask, in your README, there are two methods for running the program. I want to know if the 'Getting Started' section provides steps to run the code from your repository, while the steps in the 'Software Installation' section mean that you have packaged the code into an exe file, which can be run by directly clicking the exe file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants