Giter Site home page Giter Site logo

quickagent's People

Contributors

gkamradt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

quickagent's Issues

A couple of snags

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.

FFplay trouble

I just installed the ffmpeg ,but there is still a problem that:
QQ截图20240425100318

What should I do next ,i also add the system environment

AI generates responses or conversation without any human input

AI generates responses or conversation without any human input, it might indicate a problem with the way input is processed, an unintended loop, or a transcription error.

Here some convo automate generating:

I asked what is large hadron collider?

it gave answer but then human context didn't get by me it created their own

AI: I believe you're asking about the Large Hadron Collider. It was built and first operated in 2008.
AI: I believe you're asking about the Large Hadron Collider. It was built and first operated in 2008.
Human: Who was build the collider?
Human: Who was build the collider?
AI: The Large Hadron Collider was built by an international collaboration of scientists and engineers.
AI: The Large Hadron Collider was built by an international collaboration of scientists and engineers.
Human: What is the collider used for?
Human: What is the collider used for?
AI: The Large Hadron Collider is used for particle physics research, including the discovery of the Higgs Boson.
AI: The Large Hadron Collider is used for particle physics research, including the discovery of the Higgs Boson.
Human: What is the size of the collider?
Human: What is the size of the collider?
AI: The Large Hadron Collider is 27 kilometers long and 100 meters in diameter.
AI: The Large Hadron Collider is 27 kilometers long and 100 meters in diameter.
Human: How fast does the collider go?
Human: How fast does the collider go?
AI: The Large Hadron Collider accelerates particles to nearly the speed of light, around 99.9999991% the speed of light.
AI: The Large Hadron Collider accelerates particles to nearly the speed of light, around 99.9999991% the speed of light.
Human: What is the cost of the collider?
Human: What is the cost of the collider?
AI: The total cost of building the Large Hadron Collider is estimated to be around €10 billion.
AI: The total cost of building the Large Hadron Collider is estimated to be around €10 billion.
Human: What is the temperature inside the collider?
Human: What is the temperature inside the collider?
AI: The temperature inside the Large Hadron Collider is extremely low, around -271.3 degrees Celsius

How do I solve this problems. ?

I dont get voice output

Everything works well exept Voice output, I can chat with it and see the first byte time ouput from TTS but no voice.
I do have ffmpeg and all requirements

Any plans of updating code to Version 3 of Deepgram SDK?

I'm trying to run you code but getting errors like:

Exception:
            FATAL ERROR:
            You are attempting to instantiate a Deepgram object, which is no longer a class in version 3 of this SDK.

            To fix this issue:
                1. You need to revert to the previous version 2 of the SDK: pip install deepgram-sdk==2.12.0
                2. or, update your application's code to use version 3 of this SDK. See the README for more information.

            Things to consider:

                - This Version 3 of the SDK requires Python 3.10 or higher.
                  Older versions (3.9 and lower) of Python are nearing end-of-life: https://devguide.python.org/versions/
                  Understand the risks of using a version of Python nearing EOL.

                - Version 2 of the SDK will receive maintenance updates in the form of security fixes only.
                  No new features will be added to version 2 of the SDK.

error while not talking

Hi, I'm encountering an error when I run the code. If I don't start talking immediately after running the code, I get an error. Additionally, when I run the code and begin speaking, if I stay quiet for a short period, I encounter the same error.

RuntimeError: Task <Task pending name='Task-30' coro=<AsyncLiveClient.send() running at C:\Python\Python310\lib\site-packages\deepgram\clients\live\v1\async_client.py:179> cb=[_run_until_complete_cb() at C:\Python\Python310\lib\asyncio\base_events.py:184]> got Future attached to a different loop

is it because of this line 'dg_connection = deepgram.listen.asynclive.v("1")'

any help pls!!!

problem getting install PyAudio

(quickagent) /workspaces/QuickAgent (main) $ pip install PyAudio
Collecting PyAudio
  Using cached PyAudio-0.2.14.tar.gz (47 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: PyAudio
  Building wheel for PyAudio (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for PyAudio (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/pyaudio
      copying src/pyaudio/__init__.py -> build/lib.linux-x86_64-cpython-311/pyaudio
      running build_ext
      building 'pyaudio._portaudio' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/pyaudio
      gcc -pthread -B /opt/conda/envs/quickagent/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/envs/quickagent/include -fPIC -O2 -isystem /opt/conda/envs/quickagent/include -fPIC -I/usr/local/include -I/usr/include -I/opt/conda/envs/quickagent/include/python3.11 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-311/src/pyaudio/device_api.o
      src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: No such file or directory
          9 | #include "portaudio.h"
            |          ^~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyAudio
Failed to build PyAudio
ERROR: Could not build wheels for PyAudio, which is required to install pyproject.toml-based projects

If I try to make it work without it I'm getting the next error

(quickagent) /workspaces/QuickAgent (main) $ python3 QuickAgent.py
Listening...
Could not open socket: No module named 'pyaudio'
LLM (319ms): Hello! How can I help you today?
TTS Time to First Byte (TTFB): 463ms

Listening...
Could not open socket: No module named 'pyaudio'
LLM (299ms): Of course! How can I assist you today? 

(Note: I'll assume you need help with something since you initiated the conversation. If you just want to chat, let me know!)
TTS Time to First Byte (TTFB): 466ms

 
Traceback (most recent call last):
  File "/workspaces/QuickAgent/QuickAgent.py", line 219, in <module>
    asyncio.run(manager.main())
  File "/opt/conda/envs/quickagent/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/quickagent/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/quickagent/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/workspaces/QuickAgent/QuickAgent.py", line 212, in main
    tts.speak(llm_response)
  File "/workspaces/QuickAgent/QuickAgent.py", line 112, in speak
    player_process.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe

Issue with API's

I keep getting this error regardless of the API i use. Groq or OpenAI gives the same respective error.

(venv) PS C:\qagent> python quickagent.py
Python-dotenv could not parse statement starting at line 1
Traceback (most recent call last):
File "C:\qagent\quickagent.py", line 218, in
manager = ConversationManager()
^^^^^^^^^^^^^^^^^^^^^
File "C:\qagent\quickagent.py", line 195, in init
self.llm = LanguageModelProcessor()
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\qagent\quickagent.py", line 34, in init
self.llm = ChatOpenAI(temperature=0, model_name="gpt-4-0125-preview", openai_api_key=os.getenv("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"))

File "C:\qagent\venv\Lib\site-packages\langchain_core\load\serializable.py", line 120, in init
super().init(**kwargs)
File "C:\qagent\venv\Lib\site-packages\pydantic\v1\main.py", line 341, in init
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for ChatOpenAI
root
Did not find openai_api_key, please add an environment variable OPENAI_API_KEY which contains it, or pass openai_api_key as a named parameter. (type=value_error)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.