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

GPT response Issues json? #11

Open
dborup opened this issue Jan 3, 2024 · 2 comments
Open

GPT response Issues json? #11

dborup opened this issue Jan 3, 2024 · 2 comments

Comments

@dborup
Copy link

dborup commented Jan 3, 2024

I get this error when trying to run mqtt_client

Process-6: GPT response {'id': 'chatcmpl-8czygzVl7Lj5qCTxZgonYcBVxwzQQ', 'object': 'chat.completion', 'created': 1704305398, 'model': 'gpt-4-1106-vision-preview', 'usage': {'prompt_tokens': 623, 'completion_tokens': 147, 'total_tokens': 770}, 'choices': [{'message': {'role': 'assistant', 'content': "It appears that you've shown a series of images that seem to be captured from a security camera or a webcam, with timestamps indicating they're from January 3, 2024. The scene is of an interior room that includes items such as a couch, television, and decorative items like a vase with flowers. There's also a person in what seems to be casual attire, who appears to be engaged in some sort of activity, possibly on a phone or another handheld device. The person is situated to the right in the frame, and their actions don't seem to vary much across the different images. The room is primarily lit by artificial lighting from the ceiling and maybe some natural light coming from the adjacent room visible through the doorway."}, 'finish_reason': 'stop', 'index': 0}]}
Process-6: Error processing video for event 1704305371.856069-gdkc6c
Traceback (most recent call last):
File "/home/dborup/./mqtt_client.py", line 304, in process_message
result = json.loads(json_str)
File "/usr/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@mhaowork
Copy link
Owner

mhaowork commented Jan 5, 2024

Thanks for reporting the issue. This should be an transient error. Retrying usually fixes it. I will improve on the error message to make it clearer.

@ttopholm
Copy link

ttopholm commented Feb 2, 2024

@dborup delete the prompt from the config.yml and try again.

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

3 participants