gkamradt / QuickAgent

255 stars 112 forks source link

A couple of snags #3

Open Manamama opened 3 months ago

Manamama commented 3 months ago

Prooted Debian on Termux here, as many modules refused to install on Termux, especially gevent or pyaudio.

  1. Href wrong: https://github.com/gkamradt/QuickAgent/blob/main/www.deepgram.com
  2. One needs the deepgram API key. I propose a quick link to : https://console.deepgram.com/project (keys), plus info that:

# Set your Deepgram API Key and desired voice model DG_API_KEY = os.getenv("DEEPGRAM_API_KEY")

To avoid: root@localhost:~/downloads_Termux/QuickAgent# python QuickAgent.py WARNING: API key is missing Listening... WebSocketException in AsyncLiveClient.start: server rejected WebSocket connection: HTTP 401 ... etc, with Groq trying to answer unasked questions in a loop.

  1. Fyi, it works somehow better on Ubuntu, obviously, I may update it later.
Manamama commented 3 months ago

Update - works well on Ubuntu. Ms Bing tells me it is hard to suppress these spurious ALSA info warnings.

Tip: maybe Colorama for the Human vs LLM's parts?

Listening...
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
Human: Greetings. I'm not what's going to happen here, but tell me your story.
LLM (1207ms): Hello! I'm here to assist you. As for my story, I don't have personal experiences, but I'm designed to help answer questions and provide information. How can I assist you today?
TTS Time to First Byte (TTFB): 2990ms

Listening...
Human: I'm very glad that you are talking to me. Tell me about your role and your desires.
LLM (1701ms): Thank you! I'm here to assist and make your experience better. I don't have personal desires, but my purpose is to help and support you. How can I make your day easier?
TTS Time to First Byte (TTFB): 3186ms
Chadwick-Castilla commented 2 months ago

Having a similar issue

Load the system prompt from a file

    system_prompt_path = os.path.join(os.path.dirname(__file__), 'system_prompt.txt')
    with open(system_prompt_path, 'r') as file:
        system_prompt = file.read().strip()