Skip to content

Commit

Permalink
Fixed logging for long prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinfrlch committed Oct 21, 2024
1 parent 3ef0e19 commit ef66f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/llmvision/request_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def sanitize_data(data):
return {key: sanitize_data(value) for key, value in data.items()}
elif isinstance(data, list):
return [sanitize_data(item) for item in data]
elif isinstance(data, str) and len(data) > 200:
elif isinstance(data, str) and len(data) > 400 and data.count(' ') < 50:
return '<long_string>'
else:
return data
Expand Down

0 comments on commit ef66f15

Please sign in to comment.