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

Truncation of Message - Developer Tools and App #182

Open
loca5790 opened this issue Jan 23, 2025 · 4 comments
Open

Truncation of Message - Developer Tools and App #182

loca5790 opened this issue Jan 23, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@loca5790
Copy link

loca5790 commented Jan 23, 2025

Bug Description

Response is truncated to what appears to be a set number of characters.

Version: 1.3.6

Service Call

Directly from blueprint

    choose:
      - conditions:
          - condition: template
            value_template: "{{ mode == 'Frigate' }}"
        sequence:
          - action: llmvision.video_analyzer
            data:
              event_id: "{{ trigger.payload_json['after']['id'] }}"
              provider: 
              model: llava-phi3
              message: >-
                Summarize what's happening in the camera feed (one sentence
                max). Don't describe the scene! If there is a person, describe
                what they're doing and what they look like. If they look like a
                courier mention that! If nothing is happening, say so.
              remember: true
              generate_title: true
              include_filename: true
              max_frames: 3
              target_width: 1280
              detail: low
              max_tokens: 20
              temperature: 0.1
            response_variable: response

Recreated in developer tools

action: llmvision.image_analyzer
metadata: {}
data:
  remember: false
  include_filename: false
  target_width: 1280
  max_tokens: 3000
  temperature: 0.2
  generate_title: true
  expose_images: false
  expose_images_persist: false
  provider: 
  model: llava-phi3
  message: >-
    Summarize what's happening in the camera feed (one sentence max). Don't
    describe the scene! If there is a person, describe what they're doing
    and what they look like. If they look like a courier mention that! If
    nothing is happening, say so. Don't use emojis!
  image_file: /config/www/llmvision/front_door_person.jpg
response_variable: response

In this condition it will not post anything after the automation even when I created my own automation. I was trying to write system log even post notify to capture the response variable but it would not write it despite the trace showing complete.

Logs

Paste relevant logs here

Additional context

Please see above. The response is being tructated when a title is being generated. Adding delays does not change it. Even on manual snapshot events it will force truncation of responses.

Does not fix frigate 404 issue. I can access the same link via my local network will try adding longer delay.

@loca5790 loca5790 added the bug Something isn't working label Jan 23, 2025
@loca5790
Copy link
Author

Separate issue I am running Beta Frigate... opened an bug over there.

The video is accessible but automation failed with the following:
Error: Error: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 8294400 and the array at index 1 has size 4915200

Reverting to own automation using camera snapshot. I see previously you had discussed adding snapshot feature would help with this.

@valentinfrlch
Copy link
Owner

Is the truncation only for the title? There is a limit for how many tokens should be generated for the title. I will increase it for the next release.

@valentinfrlch
Copy link
Owner

The other issue you're seeing has been mentioned a couple of times in different bug reports so you're not the only one... I have so far however not been able to reproduce it. It seems to be from the similarity score function where numpy arrays are compared. I'll try to figure out why exactly this happens tomorrow.

@loca5790
Copy link
Author

Is the truncation only for the title? There is a limit for how many tokens should be generated for the title. I will increase it for the next release.

Hey! Sorry for the delay! It was truncating title and message response.

Image

Image

only change was unchecking generate title. This was done from developer tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants