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

Error in step1_simpleVQA in v0.2.3 #203

Open
ruspaul013 opened this issue Jan 28, 2025 · 0 comments
Open

Error in step1_simpleVQA in v0.2.3 #203

ruspaul013 opened this issue Jan 28, 2025 · 0 comments

Comments

@ruspaul013
Copy link

I upgraded OmAgent to the latest version and when I tried to run the step1 example I got the following error:

Please tell me a question and a image.(Waiting for input. Your input can only be text or image path each time, you can press Enter once to input multiple times. Press Enter twice to finish the entire input.):
>>>/root/github/OmAgent/docs/images/app_album.png
>>>what is inside the image?
>>>
INFO | 2025-01-28 09:37:58,566 | /root/github/OmAgent/examples/step1_simpleVQA/run_cli.py:50 | <module> | User input lines: ['/root/github/OmAgent/docs/images/app_album.png', 'what is inside the image?']
INFO | 2025-01-28 09:37:59,556 | /root/github/OmAgent/omagent-core/src/omagent_core/clients/devices/app/input.py:79 | read_input | Received message: {'payload': '{"agent_id": "c5f7e4e2-054f-445c-aa89-d3b4fd1c48e1", "messages": [{"role": "user", "content": [{"type": "image_url", "data": "/root/github/OmAgent/docs/images/app_album.png"}, {"type": "text", "data": "what is inside the image?"}]}], "kwargs": {}}'}
INFO | 2025-01-28 09:37:59,586 | /root/github/OmAgent/omagent-core/src/omagent_core/engine/worker/base.py:141 | execute | User_instruction: what is inside the image?
Image_path: /root/github/OmAgent/docs/images/app_album.png
INFO | 2025-01-28 09:38:03,664 | /root/github/OmAgent/omagent-core/src/omagent_core/engine/automator/task_runner.py:69 | run_once | Executing task, id: 88c661d0-fe71-43cf-b77b-699cd6e4ee88, workflow_instance_id: c5f7e4e2-054f-445c-aa89-d3b4fd1c48e1, task_definition_name: SimpleVQA
2025-01-28 09:38:03,691 [840291] omagent_core.engine.worker.base ERROR    Error executing task SimpleVQA with id 88c661d0-fe71-43cf-b77b-699cd6e4ee88.  error = Traceback (most recent call last):
  File "/root/github/OmAgent/omagent-core/src/omagent_core/engine/worker/base.py", line 141, in execute
    task_output = self._run(**task_input)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/github/OmAgent/examples/step1_simpleVQA/agent/simple_vqa/simple_vqa.py", line 57, in _run
    chat_complete_res = self.llm.generate(records=chat_message)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/github/OmAgent/omagent-core/src/omagent_core/models/llms/base.py", line 63, in generate
    return self._call(records, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/github/OmAgent/omagent-core/src/omagent_core/models/llms/openai_gpt.py", line 111, in _call
    messages = self._msg2req(records)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/root/github/OmAgent/omagent-core/src/omagent_core/models/llms/openai_gpt.py", line 211, in _msg2req
    messages = [
               ^
  File "/root/github/OmAgent/omagent-core/src/omagent_core/models/llms/openai_gpt.py", line 212, in <listcomp>
    {"role": message.role, "content": get_content(message.content)}
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/github/OmAgent/omagent-core/src/omagent_core/models/llms/openai_gpt.py", line 209, in get_content
    raise ValueError("Invalid message type")
ValueError: Invalid message type

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

No branches or pull requests

1 participant